summaryrefslogtreecommitdiff
path: root/layouts/library/yearlist.html
blob: 8250046d2cdee336c1b755b72115b3fdb39ceb31 (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 }}
                <div data-tooltip="{{ .Title }}">{{ partial "items/book" . }}</div>
              {{ end }}
            {{ end }}
          </div>
      </div>
    </article>
    {{ partial "footer.html" . }}
{{ end }}