The fixed items of posts are in the blog language instead of post language
This commit is contained in:
parent
61e5023d2e
commit
23c966bce6
1 changed files with 28 additions and 19 deletions
|
@ -43,30 +43,39 @@ fn view(post: CompiledPost, is_full: Bool, _db: Database, config: Configuration)
|
||||||
article([class("post"), ..language], [
|
article([class("post"), ..language], [
|
||||||
header([], [
|
header([], [
|
||||||
wrap_heading(h2([], [text(post.orig.title)]), post_url, is_full),
|
wrap_heading(h2([], [text(post.orig.title)]), post_url, is_full),
|
||||||
p([class("post__time")], post_time(post.orig, config.l10n.context)),
|
p(
|
||||||
nav([attribute("aria-label", g_(config.l10n.context, "Tags"))], [
|
[class("post__time"), attribute("lang", config.l10n.language)],
|
||||||
ul(
|
post_time(post.orig, config.l10n.context),
|
||||||
[],
|
),
|
||||||
list.map(post.orig.tags, fn(tag) {
|
nav(
|
||||||
li([], [
|
[
|
||||||
a(
|
attribute("lang", config.l10n.language),
|
||||||
[
|
attribute("aria-label", g_(config.l10n.context, "Tags")),
|
||||||
href(config.paths.html(
|
],
|
||||||
config.paths.root <> config.paths.tag(tag),
|
[
|
||||||
)),
|
ul(
|
||||||
],
|
[],
|
||||||
[text(tag)],
|
list.map(post.orig.tags, fn(tag) {
|
||||||
),
|
li([], [
|
||||||
])
|
a(
|
||||||
}),
|
[
|
||||||
),
|
href(config.paths.html(
|
||||||
]),
|
config.paths.root <> config.paths.tag(tag),
|
||||||
|
)),
|
||||||
|
],
|
||||||
|
[text(tag)],
|
||||||
|
),
|
||||||
|
])
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
]),
|
]),
|
||||||
div([attribute("dangerous-unescaped-html", content)], []),
|
div([attribute("dangerous-unescaped-html", content)], []),
|
||||||
case is_full, post.content.short {
|
case is_full, post.content.short {
|
||||||
True, _ | False, option.None -> element.none()
|
True, _ | False, option.None -> element.none()
|
||||||
False, option.Some(_) ->
|
False, option.Some(_) ->
|
||||||
footer([], [
|
footer([attribute("lang", config.l10n.language)], [
|
||||||
a([href(post_url)], [text(g_(config.l10n.context, "Read more…"))]),
|
a([href(post_url)], [text(g_(config.l10n.context, "Read more…"))]),
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue