summaryrefslogtreecommitdiff
path: root/layouts/article/section.html
diff options
context:
space:
mode:
authoreltrac <hi@eltr.ac>2026-03-08 12:18:35 +0800
committereltrac <hi@eltr.ac>2026-03-08 12:18:35 +0800
commit8d0dacf29e34d27c78e3a6da9f9ac100a662792f (patch)
treeaded13b4cbdeb0f4c2ccd65bf26138b96544e8de /layouts/article/section.html
parentca75c4d65e37936433f90d8e04ee3fc7316d37bc (diff)
refactor: remove generic section template
Diffstat (limited to 'layouts/article/section.html')
-rw-r--r--layouts/article/section.html52
1 files changed, 52 insertions, 0 deletions
diff --git a/layouts/article/section.html b/layouts/article/section.html
new file mode 100644
index 00000000..5b5cb33a
--- /dev/null
+++ b/layouts/article/section.html
@@ -0,0 +1,52 @@
+{{ 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>
+
+ {{ partial "section-categories" $pages }}
+
+ <!-- Post Archive List -->
+ {{ $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" }}
+ <div class="lazy-render"{{ if gt $remainingMonthsToOpen 0 }} open{{ end }}>
+ <h2 class="text-size-lg inline-block w-full m-0
+ flex justify-between items-center">
+ {{ .Key }}
+ </h2>
+ <ul class="ps-0 flex flex-col gap-2 list-none leading-relaxed">
+ {{ range .Pages }}
+ <li class="flex gap-4 text-size-lg">
+ <span class="text-size-xs h-5 font-mono text-secondary flex-shrink-0
+ inline-block border-1 border-solid border-t-5 px-1
+ border-neutral-200 dark:border-neutral-700">
+ {{ .Date.Format "02" }}
+ </span>
+ <a href="{{ .RelPermalink }}">
+ {{ .Title }}{{ with .Params.subtitle }}:<span class="text-secondary">{{. }}</span>
+ {{ end }}
+ </a>
+ </li>
+ {{ end }}
+ </ul>
+ </div>
+ {{ $remainingMonthsToOpen = sub $remainingMonthsToOpen 1 }}
+ {{ end }}
+ </section>
+ {{ end }}
+ </div>
+ </article>
+ {{ partial "footer.html" . }}
+{{ end }}