better URL linebreaks + MP3 refs

This commit is contained in:
David Eisinger
2025-01-10 00:30:28 -05:00
parent 434aff903d
commit 30cd4499f3
2 changed files with 2 additions and 3 deletions

View File

@@ -227,7 +227,6 @@ audio::-webkit-media-controls-panel {
@media print {
body {
background-color: white;
font-size: 24px;
padding: 0;
}
@@ -244,6 +243,7 @@ audio::-webkit-media-controls-panel {
color: #eee;
content: " [" attr(href) "]";
font-weight: normal;
word-break: break-all;
}
}

View File

@@ -24,8 +24,7 @@
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 }}
{{ replaceRE `<audio controls src="((.*)/(.*).mp3)"></audio>` "<a href=\"$1\">$3</a>" .Content | safeHTML }}
</section>
{{ end }}
{{ end }}