summaryrefslogtreecommitdiff
path: root/layouts/index.html
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-04-24 16:51:48 +0800
committerEltrac <hi@guhub.cn>2025-04-24 16:51:48 +0800
commit9207dc6c57f99a42b522eb86bd2f0bcbb1a7bb7a (patch)
tree0c5b1fc45d547abe0271bcf94a03486d2f0d1d2d /layouts/index.html
parentd8e62892c512c013ff4af462efac37482467380b (diff)
feat: display book reviews on index page
Diffstat (limited to 'layouts/index.html')
-rw-r--r--layouts/index.html14
1 files changed, 11 insertions, 3 deletions
diff --git a/layouts/index.html b/layouts/index.html
index 8ec76d08..19ac50fa 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -20,7 +20,13 @@
<a
href="{{ .Permalink }}"
data-umami-event="Click post link from index"
- >{{ .Title }}</a>
+ >
+ {{ if eq .Section "library" }}
+ 读《{{ .Title }}》
+ {{ else }}
+ {{ .Title }}
+ {{ end }}
+ </a>
{{ if eq .Section "fictions" }}
<span class="posts-item-title-pill">小说</span>
{{ end }}
@@ -43,9 +49,11 @@
{{ $firstPost = false }} <!-- 更新为非第一篇 -->
{{ end }}
<!-- 如果是小说,则显示图标 -->
- {{ if eq .Section "fictions" }}
+ {{ if or (eq .Section "fictions") (eq .Section "library") }}
<div class="posts-item-icon invert-if-dark">
- <img src="/img/skull-slices.svg" />
+ <img src="{{ if eq .Section "fictions" }}
+ {{ .Site.BaseURL }}img/skull-slices.svg{{ else }}
+ {{ .Site.BaseURL }}img/book-storm.svg{{ end }}" />
</div>
{{ end }}
</div>