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,8 +43,16 @@ fn view(post: CompiledPost, is_full: Bool, _db: Database, config: Configuration)
|
|||
article([class("post"), ..language], [
|
||||
header([], [
|
||||
wrap_heading(h2([], [text(post.orig.title)]), post_url, is_full),
|
||||
p([class("post__time")], post_time(post.orig, config.l10n.context)),
|
||||
nav([attribute("aria-label", g_(config.l10n.context, "Tags"))], [
|
||||
p(
|
||||
[class("post__time"), attribute("lang", config.l10n.language)],
|
||||
post_time(post.orig, config.l10n.context),
|
||||
),
|
||||
nav(
|
||||
[
|
||||
attribute("lang", config.l10n.language),
|
||||
attribute("aria-label", g_(config.l10n.context, "Tags")),
|
||||
],
|
||||
[
|
||||
ul(
|
||||
[],
|
||||
list.map(post.orig.tags, fn(tag) {
|
||||
|
@ -60,13 +68,14 @@ fn view(post: CompiledPost, is_full: Bool, _db: Database, config: Configuration)
|
|||
])
|
||||
}),
|
||||
),
|
||||
]),
|
||||
],
|
||||
),
|
||||
]),
|
||||
div([attribute("dangerous-unescaped-html", content)], []),
|
||||
case is_full, post.content.short {
|
||||
True, _ | False, option.None -> element.none()
|
||||
False, option.Some(_) ->
|
||||
footer([], [
|
||||
footer([attribute("lang", config.l10n.language)], [
|
||||
a([href(post_url)], [text(g_(config.l10n.context, "Read more…"))]),
|
||||
])
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue