summaryrefslogtreecommitdiff
path: root/layouts/library/yearlist.html
diff options
context:
space:
mode:
authorBigCoke233 <hi@guhub.cn>2025-12-06 16:10:43 +0800
committerBigCoke233 <hi@guhub.cn>2025-12-06 16:10:43 +0800
commite7e01fedce0c4a5b7e6e5eec41ed5e97a1bf1979 (patch)
tree4b947238e4ce4c6c285acec4e0840bdab193602a /layouts/library/yearlist.html
parent59eb9da5f80cccb3578d30bd0565283e9643fd9f (diff)
refactor: library section template
- use Context to get pages, instead of filter the whole site's pages - use one tempalte `section.html` for both library home and year lists
Diffstat (limited to 'layouts/library/yearlist.html')
-rw-r--r--layouts/library/yearlist.html18
1 files changed, 0 insertions, 18 deletions
diff --git a/layouts/library/yearlist.html b/layouts/library/yearlist.html
deleted file mode 100644
index 1405cb27..00000000
--- a/layouts/library/yearlist.html
+++ /dev/null
@@ -1,18 +0,0 @@
-{{ define "main" }}
- {{ partial "header.html" . }}
- <article class="pagefind-exclude">
- <div>
- <h2>{{ .Title }}</h2> <!-- 显示年份 -->
- <div class="grid grid-cols-4 md:grid-cols-6 items-center gap-4 my-4">
- {{ $year := .Title }}
- {{ range where .Site.RegularPages "Section" "library" }}
- {{ if eq (printf "%d" .Date.Year) $year }}
- <div data-tooltip="{{ .Title }}">
- {{ partial "items/book" (dict "ctx" .) }}</div>
- {{ end }}
- {{ end }}
- </div>
- </div>
- </article>
- {{ partial "footer.html" . }}
-{{ end }}