summaryrefslogtreecommitdiffstats
path: root/themes/danix-xyz-hacker/layouts/taxonomy/list.html
blob: fd4b5d976e00336bd513548e89675b7644b625f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{{ define "main" }}
<div class="mx-auto px-4 py-12 max-w-4xl">
  <!-- Page title with taxonomy name -->
  <h1 class="text-4xl md:text-5xl font-bold text-accent mb-12">
    {{ i18n .Data.Plural }}
  </h1>

  <!-- Articles list -->
  <div class="space-y-2 max-w-2xl">
    {{ $pinned := where .Pages "Params.pinned" true }}
    {{ $unpinned := where .Pages "Params.pinned" false }}

    <!-- Pinned posts first -->
    {{ range (sort $pinned "Date" "desc") }}
      {{ partial "article-list-item.html" . }}
    {{ end }}

    <!-- Regular posts -->
    {{ range (sort $unpinned "Date" "desc") }}
      {{ partial "article-list-item.html" . }}
    {{ end }}

    <!-- Empty state -->
    {{ if eq (len .Pages) 0 }}
      <div class="py-12 text-center text-text-dim">
        {{ i18n "noRelated" }}
      </div>
    {{ end }}
  </div>
</div>
{{ end }}