diff options
| author | Nicholas Johnson <> | 2026-09-06 00:00:00 +0000 |
|---|---|---|
| committer | Nicholas Johnson <> | 2026-09-06 00:00:00 +0000 |
| commit | 151b5149973594233512d27dba434184665e398827f7da361a644501a16b1e58 (patch) | |
| tree | d11ad0a621b40dd144926471c02734e6272f44580bc5a19f075962520565e703 /layouts/single.html | |
| parent | 47f8f43cab34bc4048fb93124c13df9643befb4d5abb4a9e97cff064a97e342d (diff) | |
| download | hugo-theme-journal-151b5149973594233512d27dba434184665e398827f7da361a644501a16b1e58.tar.gz hugo-theme-journal-151b5149973594233512d27dba434184665e398827f7da361a644501a16b1e58.zip | |
Add audio support for entries on website
Diffstat (limited to 'layouts/single.html')
| -rw-r--r-- | layouts/single.html | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/layouts/single.html b/layouts/single.html index 9a8c8ae..e7522a0 100644 --- a/layouts/single.html +++ b/layouts/single.html @@ -7,6 +7,12 @@ <h1 id="{{ .File.TranslationBaseName }}" class="entry__heading">{{ .Title }}</h1> {{- if (.Page.Params.pageinfo | default true) }} <p class="entry__pageinfo">{{ partial "pageinfo.html" . }}</p> + {{- end -}} + {{ with index (where .Resources "MediaType.MainType" "audio") 0 }} + <audio class="entry__audio" controls preload="metadata" aria-label="{{ i18n "audioVersion" $.Title }}"> + <source src="{{ .RelPermalink }}" type="{{ .MediaType }}"> + {{ i18n "audioUnsupported" }} + </audio> {{- end }} </div> {{ chomp (.Content) }} |
