diff options
| author | BigCoke233 <hi@guhub.cn> | 2025-12-06 16:10:43 +0800 |
|---|---|---|
| committer | BigCoke233 <hi@guhub.cn> | 2025-12-06 16:10:43 +0800 |
| commit | e7e01fedce0c4a5b7e6e5eec41ed5e97a1bf1979 (patch) | |
| tree | 4b947238e4ce4c6c285acec4e0840bdab193602a /layouts/library/yearlist.html | |
| parent | 59eb9da5f80cccb3578d30bd0565283e9643fd9f (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.html | 18 |
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 }} |
