summaryrefslogtreecommitdiff
path: root/layouts/weekly/section.html
diff options
context:
space:
mode:
authoreltrac <hi@eltr.ac>2026-03-08 11:48:55 +0800
committereltrac <hi@eltr.ac>2026-03-08 11:48:55 +0800
commit66eb897d4d812a76831e6113a1a2ecce0e53be43 (patch)
tree2dc66c25aa1424fc7903193593e4aa7197992469 /layouts/weekly/section.html
parentc121a4ef8792f9bc40d3700608dcd2e492d8033b (diff)
docs: move /posts/weekly -> /weekly, a standalone section
Diffstat (limited to 'layouts/weekly/section.html')
-rw-r--r--layouts/weekly/section.html45
1 files changed, 45 insertions, 0 deletions
diff --git a/layouts/weekly/section.html b/layouts/weekly/section.html
new file mode 100644
index 00000000..14bb4db4
--- /dev/null
+++ b/layouts/weekly/section.html
@@ -0,0 +1,45 @@
+{{ 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>
+
+ <!-- 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="text-size-lg">
+ <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 }}