1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-09-19 20:02:10 +00:00
seirdy.one/layouts/shortcodes/indieweb-icon.html
Rohan Kumar 7bd9784653
Microdata: fix relative urls, add a11y metadata
- Add a11y metadata to transcribed images to communicate the presence of
  a transcript
- Fix relative urls in navigation: make them absolute urls, so that the
  parsed navigation elements have the correct destinations.

This also switches image transcripts from a section with a heading to a
div with an ARIA label. That should reduce duplication between the
<summary> content and the heading while still being semantically sound.
2022-06-29 18:05:48 -07:00

10 lines
491 B
HTML

{{ $favicon := resources.Get "/favicon.png" -}}
{{- $favicon_base64 := $favicon.Content | base64Encode -}}
{{- $favicon_svg := resources.Get "/favicon.svg" | resources.Fingerprint "md5" -}}
{{- if in site.BaseURL ".onion" -}}
<img itemprop="image" class="u-photo photo" width="16" height="16" alt=""
src="data:image/png;base64,{{ $favicon_base64 }}" />
{{- else -}}
<img itemprop="image" class="u-photo photo" width="16" height="16" alt=""
src="{{ $favicon_svg.Permalink }}" />
{{- end }}