summaryrefslogtreecommitdiff
path: root/layouts/library/yearlist.html
blob: ed62f01423cae7fe79d353dcfefaee302517ebcd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{{ 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 }}
              {{ partial "items/book" . }}
              {{ end }}
            {{ end }}
          </div>
      </div>
    </article>
    {{ partial "footer.html" . }}
{{ end }}