Adding HTML5 audio (using image markdown)
This commit is contained in:
parent
a11a7f791c
commit
e920fbfaf4
|
@ -35,6 +35,15 @@
|
|||
{{- else -}}
|
||||
<a href="{{- $t_destination -}}/{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}">{{- $text_link -}}⦚<span class="text-xs font-bold p-1 bg-AuChico text-CoconutCream">topic:{{- $t_destination -}} not found</span></a>
|
||||
{{- end -}}
|
||||
{{- else if strings.HasPrefix .Destination "audio:" -}}
|
||||
{{- $a_destination := (substr .Destination 6) -}}
|
||||
{{- if findRE "^.*static" $a_destination -}}
|
||||
<div>{{ .Text }}</div>
|
||||
<audio src="{{- (replaceRE "^.*static" "" $a_destination ) | safeURL -}}" preload="metadata" controls="true"></audio>
|
||||
{{- else -}}
|
||||
<div>{{ .Text }}</div>
|
||||
<audio src="{{- $a_destination | safeURL -}}" preload="metadata" controls="true"></audio>
|
||||
{{- end -}}
|
||||
{{- else if findRE "^.*static" .Destination -}}
|
||||
<img src="{{- (replaceRE "^.*static" "" .Destination ) | safeURL -}}" alt="{{- .Text -}}" {{- with .Title}} title="{{- . -}}"{{- end -}} />
|
||||
{{- else -}}
|
||||
|
|
Loading…
Reference in New Issue