🔧💄 Update the post archive info.

This commit is contained in:
凡梦星尘 2023-01-02 14:58:17 +08:00
parent dca196c315
commit a2019876a2
3 changed files with 26 additions and 36 deletions

View File

@ -56,20 +56,15 @@ ArchiveCounterTitle:
zero: No posts.
other: "{{ .Count }} posts in total"
PostArchiveCheersUm:
other: Um..
PostArchiveCheersOk:
other: Ok
PostArchiveCheersNice:
other: Nice
PostArchiveCheersGood:
other: Good
PostArchiveCheersGreat:
other: Great
PostArchiveCheersExcellent:
other: Excellent
PostArchiveKeepOn:
other: Keep on posting.╰(*°▽°*)╯
PostArchive:
cheers:
um: Um...
ok: Ok
nice: Nice
good: Good
great: Greate
excellent: Excellent
keepOn: Keep on posting.╰(*°▽°*)╯
PostMeta:
sticky: Stickys

View File

@ -57,20 +57,15 @@ ArchiveCounterTitle:
zero: 暂无日志
other: "目前共计 <strong>{{ .Count }}</strong> 篇日志"
PostArchiveCheersUm:
other: 嗯..
PostArchiveCheersOk:
other: 还行
PostArchiveCheersNice:
other: 不错
PostArchiveCheersGood:
other: 很好
PostArchiveCheersGreat:
other: 非常好
PostArchiveCheersExcellent:
other: 太棒了
PostArchiveKeepOn:
other: 继续努力哟。╰(*°▽°*)╯
PostArchive:
cheers:
um: 嗯..
ok: 还行
nice: 不错
good: 很好
great: 非常好
excellent: 太棒了
keepOn: 继续努力哟。╰(*°▽°*)╯
PostMeta:
sticky: 置顶

View File

@ -6,25 +6,25 @@
<div class="post-block">
<div class="post-content">
<div class="collection-title">
{{ $cheers := "Um" }}
{{ $cheers := "um" }}
{{ $posts := .Scratch.Get "postsCount" }}
{{ if gt $posts 210 }}
{{ $cheers = "Excellent" }}
{{ $cheers = "excellent" }}
{{ else if gt $posts 130 }}
{{ $cheers = "Great" }}
{{ $cheers = "great" }}
{{ else if gt $posts 80 }}
{{ $cheers = "Good" }}
{{ $cheers = "good" }}
{{ else if gt $posts 50 }}
{{ $cheers = "Nice" }}
{{ $cheers = "nice" }}
{{ else if gt $posts 30 }}
{{ $cheers = "Ok" }}
{{ $cheers = "ok" }}
{{ end }}
<span class="collection-header">
{{ T (printf "PostArchiveCheers%s" $cheers) }}
{{ T (printf "PostArchive.cheers.%s" $cheers) }}
{{ T "SymbolComma" }}
{{ T "ArchiveCounterTitle" $posts | safeHTML }}
{{ T "SymbolComma" }}
{{ T "PostArchiveKeepOn" }}
{{ T "PostArchive.keepOn" }}
</span>
</div>