1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-30 15:22:09 +00:00
seirdy.one/layouts/shortcodes/transcribed-image.html
Rohan Kumar a8057aa8e8
Add support for <audio> elements
- Adjust transcript shortcodes to also support <audio> elements.
- Add audio element shortcode based on <picture> shortcode
- Make <audio> elements match container width.
2022-06-30 20:12:06 -07:00

24 lines
662 B
HTML

{{- $type := "image" -}}
{{- $itemtype := "CreativeWork" -}}
{{- $itemtype2 := "ImageObject" -}}
{{- $itemprop := "mentions" -}}
{{- with .Get "type" -}}
{{- $type = . -}}
{{- end -}}
{{- with .Get "itemtype" -}}
{{- $itemtype = . -}}
{{- end -}}
{{- with .Get "itemtype2" -}}
{{- $itemtype2 = . -}}
{{- end -}}
{{- with .Get "itemprop" -}}
{{- $itemprop = . -}}
{{- end -}}
<hr />
<section
aria-label="{{ $type }}, caption, and transcript"
itemprop="{{ $itemprop }}" itemscope="" itemtype="https://schema.org/{{ $itemtype }} https://schema.org/{{ $itemtype2 }}"
id="{{ .Get "id" }}" tabindex="-1">
{{ .Inner | markdownify | safeHTML }}
</section>
<hr />