diff options
| author | Nicholas Johnson <> | 2026-09-06 00:00:00 +0000 |
|---|---|---|
| committer | Nicholas Johnson <> | 2026-09-06 00:00:00 +0000 |
| commit | 3630afdfdf5f69343d1d4a85e4888b904c9d682984ee9fd9eaefa6b822661572 (patch) | |
| tree | 7368635d5b02335fe3f0fd233ead8ebaf3c8884fb9fe62652f40e359af679af9 /layouts | |
| parent | f017963dd7f40371bcfe6b75446e8c69d651b1759ea194b11ec22aa1c0d70e05 (diff) | |
| download | hugo-theme-journal-3630afdfdf5f69343d1d4a85e4888b904c9d682984ee9fd9eaefa6b822661572.tar.gz hugo-theme-journal-3630afdfdf5f69343d1d4a85e4888b904c9d682984ee9fd9eaefa6b822661572.zip | |
Add audio support for entries on capsule
Diffstat (limited to 'layouts')
| -rw-r--r-- | layouts/_partials/pageinfo.gmi | 6 | ||||
| -rw-r--r-- | layouts/single.gmi | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/layouts/_partials/pageinfo.gmi b/layouts/_partials/pageinfo.gmi index 7c822f3..f68fa2f 100644 --- a/layouts/_partials/pageinfo.gmi +++ b/layouts/_partials/pageinfo.gmi @@ -15,4 +15,8 @@ {{ $nonBreakingTags = $nonBreakingTags | append $nonBreakingTag -}} {{ end -}} -{{ emojify ":calendar:" }} {{ $nonBreakingPublishDate }} {{ emojify ":stopwatch:" }} {{ $nonBreakingReadingTime }}{{ if $nonBreakingTags }} {{ emojify ":label:" }} {{ end }}{{ range $key, $val := $nonBreakingTags }}{{ if $key }}, {{ end }}{{ $val }}{{ end }}
\ No newline at end of file +{{ $nonBreakingAudioAvailable := i18n "audioAvailable" -}} +{{ $nonBreakingAudioAvailable = replace $nonBreakingAudioAvailable " " " " -}} +{{ $nonBreakingAudioAvailable = replace $nonBreakingAudioAvailable "-" "‑" -}} + +{{ emojify ":calendar:" }} {{ $nonBreakingPublishDate }} {{ emojify ":stopwatch:" }} {{ $nonBreakingReadingTime }}{{ if where .Resources "MediaType.MainType" "audio" }} {{ emojify ":headphones:" }} {{ $nonBreakingAudioAvailable }}{{ end }}{{ if $nonBreakingTags }} {{ emojify ":label:" }} {{ end }}{{ range $key, $val := $nonBreakingTags }}{{ if $key }}, {{ end }}{{ $val }}{{ end }}
\ No newline at end of file diff --git a/layouts/single.gmi b/layouts/single.gmi index 26c8cee..2cf53a4 100644 --- a/layouts/single.gmi +++ b/layouts/single.gmi @@ -6,6 +6,10 @@ # {{ .Title }} {{- if (.Page.Params.pageinfo | default true) }} {{ partial "pageinfo.gmi" . }} +{{- end -}} + +{{ with index (where .Resources "MediaType.MainType" "audio") 0 }} +=> {{ .RelPermalink }} {{ emojify ":link:" }} {{ i18n "downloadAudio" $.Title }} {{- end }} {{ $content := chomp (.RawContent) -}} |
