Merge pull request 'Fix #967 Fix comment link' (#974) from fix-comment-link into main

Reviewed-on: https://git.joinplu.me/Plume/Plume/pulls/974
This commit is contained in:
KitaitiMakoto 2022-01-02 17:08:10 +00:00
commit 637bd3347b
9 changed files with 18 additions and 16 deletions

14
Cargo.lock generated
View file

@ -2966,7 +2966,7 @@ dependencies = [
[[package]]
name = "plume"
version = "0.7.0"
version = "0.7.1-dev"
dependencies = [
"activitypub",
"askama_escape",
@ -3008,7 +3008,7 @@ dependencies = [
[[package]]
name = "plume-api"
version = "0.7.0"
version = "0.7.1-dev"
dependencies = [
"serde 1.0.130",
"serde_derive",
@ -3016,7 +3016,7 @@ dependencies = [
[[package]]
name = "plume-cli"
version = "0.7.0"
version = "0.7.1-dev"
dependencies = [
"clap",
"diesel",
@ -3027,7 +3027,7 @@ dependencies = [
[[package]]
name = "plume-common"
version = "0.7.0"
version = "0.7.1-dev"
dependencies = [
"activitypub",
"activitystreams-derive",
@ -3055,7 +3055,7 @@ dependencies = [
[[package]]
name = "plume-front"
version = "0.7.0"
version = "0.7.1-dev"
dependencies = [
"console_error_panic_hook",
"gettext",
@ -3072,7 +3072,7 @@ dependencies = [
[[package]]
name = "plume-macro"
version = "0.7.0"
version = "0.7.1-dev"
dependencies = [
"proc-macro2 0.4.30",
"quote 0.6.13",
@ -3081,7 +3081,7 @@ dependencies = [
[[package]]
name = "plume-models"
version = "0.7.0"
version = "0.7.1-dev"
dependencies = [
"activitypub",
"ammonia",

View file

@ -1,7 +1,7 @@
[package]
authors = ["Plume contributors"]
name = "plume"
version = "0.7.0"
version = "0.7.1-dev"
repository = "https://github.com/Plume-org/Plume"
edition = "2018"

View file

@ -1,6 +1,6 @@
[package]
name = "plume-api"
version = "0.7.0"
version = "0.7.1-dev"
authors = ["Plume contributors"]
edition = "2018"

View file

@ -1,6 +1,6 @@
[package]
name = "plume-cli"
version = "0.7.0"
version = "0.7.1-dev"
authors = ["Plume contributors"]
edition = "2018"

View file

@ -1,6 +1,6 @@
[package]
name = "plume-common"
version = "0.7.0"
version = "0.7.1-dev"
authors = ["Plume contributors"]
edition = "2018"

View file

@ -1,6 +1,6 @@
[package]
name = "plume-front"
version = "0.7.0"
version = "0.7.1-dev"
authors = ["Plume contributors"]
edition = "2018"

View file

@ -1,6 +1,6 @@
[package]
name = "plume-macro"
version = "0.7.0"
version = "0.7.1-dev"
authors = ["Trinity Pointard <trinity.pointard@insa-rennes.fr>"]
edition = "2018"
description = "Plume procedural macros"

View file

@ -1,6 +1,6 @@
[package]
name = "plume-models"
version = "0.7.0"
version = "0.7.1-dev"
authors = ["Plume contributors"]
edition = "2018"

View file

@ -6,6 +6,7 @@
@if let Some(comm) = Some(&comment_tree.comment) {
@if let Ok(author) = comm.get_author(ctx.0) {
@* comment-@comm.id is used for link *@
<div class="comment u-comment h-cite" id="comment-@comm.id">
<main class="content">
<header>
@ -15,8 +16,9 @@
<small>@author.fqn</small>
</a>
<p class="dt-published" datetime="@comm.creation_date.format("%F %T")">
@if let Some(ref ap_url) = comm.ap_url {
<a class="u-url" href="@ap_url">@comm.creation_date.format("%B %e, %Y %H:%M")</a>
@if let Ok(post) = comm.get_post(ctx.0) {
@* comment-@comm.id is same to this div's id attribute *@
<a class="u-url" href="@post.ap_url#comment-@comm.id">@comm.creation_date.format("%B %e, %Y %H:%M")</a>
}
</p>