diff options
| author | eltrac <hi@eltr.ac> | 2026-03-08 14:41:19 +0800 |
|---|---|---|
| committer | eltrac <hi@eltr.ac> | 2026-03-08 14:41:19 +0800 |
| commit | fe0bafba4a126fef9c169bfefa09201a6ea400ca (patch) | |
| tree | 66b77deef5773a56f5f962ed3b65d8ac1330203c /layouts/article | |
| parent | 5ccd892f23ba9cfa7145fec7137a49eb2077a447 (diff) | |
| parent | c09ffa2e5b0db615f4a4614da7d4811616afdf4f (diff) | |
merge branch restructure
Diffstat (limited to 'layouts/article')
| -rw-r--r-- | layouts/article/page.html | 3 | ||||
| -rw-r--r-- | layouts/article/section.html | 42 |
2 files changed, 45 insertions, 0 deletions
diff --git a/layouts/article/page.html b/layouts/article/page.html new file mode 100644 index 00000000..e093e810 --- /dev/null +++ b/layouts/article/page.html @@ -0,0 +1,3 @@ +{{ define "main" }} + {{ partial "template/post-page" . }} +{{ end }} diff --git a/layouts/article/section.html b/layouts/article/section.html new file mode 100644 index 00000000..b56b30eb --- /dev/null +++ b/layouts/article/section.html @@ -0,0 +1,42 @@ +{{ define "main" }} + + {{ $pages := .Pages }} + {{ $categories := slice }} + + <article> + {{ partial "header.html" . }} + {{ partial "home/home-nav" . }} + <div class="posts-list pagefind-exclude"> + <div class="markdown-body">{{ .Content }}</div> + + {{ $remainingMonthsToOpen := 3 }} + {{ range $pages.GroupByDate "2006" -}} + <section class="w-full"> + {{ partial "components/section-title" (dict + "Left" .Key + "Right" (T "archivePage.postCountAnnual" (len .Pages)) + )}} + + {{ range .Pages.GroupByDate "January" }} + <details class="lazy-render"{{ if gt $remainingMonthsToOpen 0 }} open{{ end }}> + <summary class="flex items-center border-b border-b-dashed border-[var(--border-color)] py-2 px-1"> + <h2 class="text-size-lg inline-block w-full m-0 + flex justify-between items-center"> + {{ .Key }} + <small class="font-mono text-secondary text-3">{{ T "archivePage.postCountMonthly" (len .Pages) }}</small> + </h2> + </summary> + <ul class="ps-0 flex flex-col gap-2 list-none leading-relaxed"> + {{ range .Pages }} + {{ partial "items/post-small" . }} + {{ end }} + </ul> + </details> + {{ $remainingMonthsToOpen = sub $remainingMonthsToOpen 1 }} + {{ end }} + </section> + {{ end }} + </div> + </article> + {{ partial "footer.html" . }} +{{ end }} |
