diff options
| -rw-r--r-- | i18n/zh.toml | 1 | ||||
| -rw-r--r-- | layouts/_partials/term/term-fictions.html | 10 | ||||
| -rw-r--r-- | layouts/term.html | 1 |
3 files changed, 12 insertions, 0 deletions
diff --git a/i18n/zh.toml b/i18n/zh.toml index 193b5112..09cd26b9 100644 --- a/i18n/zh.toml +++ b/i18n/zh.toml @@ -40,6 +40,7 @@ cards = "所有卡片" [termPage] books = "我读过的相关书籍" weeklies = "提及此主题的周刊" +fictions = "我写过的关于这个主题的小说" [library] viewAllThisYear = "查看今年完整书单" diff --git a/layouts/_partials/term/term-fictions.html b/layouts/_partials/term/term-fictions.html new file mode 100644 index 00000000..3e3fd4a9 --- /dev/null +++ b/layouts/_partials/term/term-fictions.html @@ -0,0 +1,10 @@ +{{ $fictions := where .Pages "Section" "fiction" }} +{{ if gt (len $fictions) 0 }} +<h2>{{ T "termPage.fictions" }}</h2> +<ul id="term-fictions" + class="animate-duration-100 ps-0 flex flex-col gap-2 list-none leading-relaxed"> + {{ range $fictions }} + {{ partial "items/post-small" . }} + {{ end }} +</ul> +{{ end }} diff --git a/layouts/term.html b/layouts/term.html index b45a3b5c..130dea01 100644 --- a/layouts/term.html +++ b/layouts/term.html @@ -10,6 +10,7 @@ {{ end }} {{ partial "term/term-posts" . }} {{ partial "term/term-weeklies" . }} + {{ partial "term/term-fictions" . }} {{ partial "term/term-books" . }} </section> </article> |
