commit e7dc35cb209c65331a3bb1ade286e7d5ccf1fcb4
parent daa935f44fdba7b2c175ee02e35065f41dab58fc
Author: David Eisinger <[email protected]>
Date: Thu, 9 Jan 2025 14:29:15 -0500
Progress on archive page
Diffstat:
3 files changed, 42 insertions(+), 0 deletions(-)
diff --git a/content/archive/_index.md b/content/archive/_index.md
@@ -0,0 +1,5 @@
+---
+title: "Archive"
+date: 2023-10-17T10:50:41-04:00
+draft: false
+---
diff --git a/themes/v2/assets/css/style.scss b/themes/v2/assets/css/style.scss
@@ -222,4 +222,19 @@ pre {
audio::-webkit-media-controls-panel {
background-color: rgba(0, 0, 0, 0.05);
+}
+
+@media print {
+ body {
+ padding: 0
+ }
+
+ footer {
+ display: none;
+ }
+
+ a:not(:has(img), [href^="#"])::after {
+ content: " (" attr(href) ")";
+ font-size: 0.8em;
+ }
}
\ No newline at end of file
diff --git a/themes/v2/layouts/archive/list.html b/themes/v2/layouts/archive/list.html
@@ -0,0 +1,22 @@
+{{ define "main" }}
+ <section>
+ {{ .Content }}
+
+ {{ range (sort (.Site.RegularPages.RelatedTo (keyVals "tags" "dispatch")) "Date" "asc") }}
+ {{ $page := . }}
+
+ <h2>
+ {{ .Title }}
+ </h2>
+
+ <h3>
+ Posted {{ .Date | time.Format "2006-01-02" }}
+ </h3>
+
+ {{ $audioLink := printf "<a href=\"%s$1\">$3</a>" (substr .Site.BaseURL 0 -1) }}
+ {{ replaceRE `<audio controls src="((.*)/(.*).mp3)"></audio>` $audioLink .Content | safeHTML }}
+
+ <div style="page-break-after: always"></div>
+ {{ end }}
+ </section>
+{{ end }}