Progress on archive page

This commit is contained in:
David Eisinger
2025-01-09 14:29:15 -05:00
parent daa935f44f
commit e7dc35cb20
3 changed files with 42 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
---
title: "Archive"
date: 2023-10-17T10:50:41-04:00
draft: false
---

View File

@@ -223,3 +223,18 @@ 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;
}
}

View File

@@ -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 }}