:wrench:💄 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

@@ -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>