mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-10 00:12:09 +00:00
Minor semantic tweaks
- Add missing p-name microformats to some citations - Add download link for audio element
This commit is contained in:
parent
d42f304f71
commit
c13e0fe690
3 changed files with 20 additions and 15 deletions
|
@ -813,7 +813,7 @@ Some users have trouble when controls have a different look, color, or shape tha
|
||||||
|
|
||||||
</blockquote>
|
</blockquote>
|
||||||
{{< quotecaption partOfType="TechArticle" >}}
|
{{< quotecaption partOfType="TechArticle" >}}
|
||||||
<cite itemprop="name headline">Making Content Usable for People with Cognitive and Learning Disabilities</cite>, section 4.2.5.3:
|
<cite itemprop="name headline" class="p-name">Making Content Usable for People with Cognitive and Learning Disabilities</cite>, section 4.2.5.3:
|
||||||
<a href="https://www.w3.org/TR/coga-usable/#how-it-helps-3">Clearly Identify Controls and Their Use: How it Helps</a>
|
<a href="https://www.w3.org/TR/coga-usable/#how-it-helps-3">Clearly Identify Controls and Their Use: How it Helps</a>
|
||||||
{{< /quotecaption >}}
|
{{< /quotecaption >}}
|
||||||
{{</quotation>}}
|
{{</quotation>}}
|
||||||
|
@ -842,7 +842,7 @@ When this is not possible, provide instructions that explain how to use the cont
|
||||||
|
|
||||||
</blockquote>
|
</blockquote>
|
||||||
{{< quotecaption partOfType="TechArticle" >}}
|
{{< quotecaption partOfType="TechArticle" >}}
|
||||||
<cite itemprop="name headline">Making Content Usable for People with Cognitive and Learning Disabilities</cite>, section 4.2.5.2:
|
<cite itemprop="name headline" class="p-name">Making Content Usable for People with Cognitive and Learning Disabilities</cite>, section 4.2.5.2:
|
||||||
<a href="https://www.w3.org/TR/coga-usable/#what-to-do-3">Clearly Identify Controls and Their Use: What to Do</a>
|
<a href="https://www.w3.org/TR/coga-usable/#what-to-do-3">Clearly Identify Controls and Their Use: What to Do</a>
|
||||||
{{< /quotecaption >}}
|
{{< /quotecaption >}}
|
||||||
{{</quotation>}}
|
{{</quotation>}}
|
||||||
|
@ -1169,7 +1169,7 @@ This includes:
|
||||||
|
|
||||||
</blockquote>
|
</blockquote>
|
||||||
{{< quotecaption partOfType="TechArticle" >}}
|
{{< quotecaption partOfType="TechArticle" >}}
|
||||||
<cite itemprop="name headline">Making Content Usable for People with Cognitive and Learning Disabilities</cite>, section 4.3.1:
|
<cite itemprop="name headline" class="p-name">Making Content Usable for People with Cognitive and Learning Disabilities</cite>, section 4.3.1:
|
||||||
<a href="https://www.w3.org/TR/coga-usable/#what-to-do-6">Make it Easy to Find the Most Important Tasks and Features of the Site</a>
|
<a href="https://www.w3.org/TR/coga-usable/#what-to-do-6">Make it Easy to Find the Most Important Tasks and Features of the Site</a>
|
||||||
{{< /quotecaption >}}
|
{{< /quotecaption >}}
|
||||||
{{</quotation>}}
|
{{</quotation>}}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
{{- $opus := resources.GetMatch (printf "/a/%s.opus" $name) -}}
|
{{- $opus := resources.GetMatch (printf "/a/%s.opus" $name) -}}
|
||||||
{{- $mp3 := resources.GetMatch (printf "/a/%s.mp3" $name) -}}
|
{{- $mp3 := resources.GetMatch (printf "/a/%s.mp3" $name) -}}
|
||||||
{{- $isTranscribed := false -}}
|
{{- $isTranscribed := false -}}
|
||||||
|
{{- $download_url := "" -}}
|
||||||
{{- /* preloading an in-page audio asset under 32 KiB is fine. */ -}}
|
{{- /* preloading an in-page audio asset under 32 KiB is fine. */ -}}
|
||||||
{{- $shouldPreload := lt (len $opus.Content) 32768 -}}
|
{{- $shouldPreload := lt (len $opus.Content) 32768 -}}
|
||||||
<audio
|
<audio
|
||||||
|
@ -19,21 +20,24 @@
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
>
|
>
|
||||||
{{ with $opus -}}
|
{{ with $opus -}}
|
||||||
|
{{- $download_url = $opus.RelPermalink -}}
|
||||||
{{ $opus_src := . | resources.Fingerprint "md5" -}}
|
{{ $opus_src := . | resources.Fingerprint "md5" -}}
|
||||||
<source
|
<source
|
||||||
src="{{ $opus_src.RelPermalink }}"
|
src="{{ $opus_src.RelPermalink }}"
|
||||||
type='audio/ogg; codecs="opus"' />
|
type='audio/ogg; codecs="opus"' />
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{ with $mp3 -}}
|
{{ with $mp3 -}}
|
||||||
|
{{- $download_url = $mp3.RelPermalink -}}
|
||||||
{{ $mp3_src := . | resources.Fingerprint "md5" -}}
|
{{ $mp3_src := . | resources.Fingerprint "md5" -}}
|
||||||
<source
|
<source
|
||||||
src="{{ $mp3_src.RelPermalink }}"
|
src="{{ $mp3_src.RelPermalink }}"
|
||||||
type="audio/mpeg" />
|
type="audio/mpeg" />
|
||||||
<p role="note">Your browser does not support HTML5 audio. Here’s a <a
|
<p role="note">Your browser does not support HTML5 audio.</p>
|
||||||
href="{{ $mp3_src.RelPermalink }}"
|
|
||||||
{{ if $isTranscribed -}}
|
|
||||||
itemprop="audio contentUrl"
|
|
||||||
{{- end -}}
|
|
||||||
>link to download the audio file <samp translate="no">{{ $name }}.mp3</samp></a> instead.</p>
|
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
</audio>{{- /* Strip trailing newline: https://github.com/gohugoio/hugo/issues/1753 */ -}}
|
</audio>
|
||||||
|
<a
|
||||||
|
href="{{ $download_url }}" download=""
|
||||||
|
{{ if $isTranscribed -}}
|
||||||
|
itemprop="audio contentUrl"
|
||||||
|
{{- end -}}>Download audio file <samp translate="no">{{ $name }}.mp3</samp></a>
|
||||||
|
{{- /* Strip trailing newline: https://github.com/gohugoio/hugo/issues/1753 */ -}}
|
||||||
|
|
|
@ -44,14 +44,15 @@
|
||||||
"ignore": [
|
"ignore": [
|
||||||
"time",
|
"time",
|
||||||
"picture",
|
"picture",
|
||||||
"meta[name=color-scheme]",
|
"a[download]",
|
||||||
"meta[name=theme-color]",
|
|
||||||
"img[decoding]",
|
|
||||||
"a[referrerpolicy]",
|
"a[referrerpolicy]",
|
||||||
"code[translate]",
|
|
||||||
"a[translate]",
|
"a[translate]",
|
||||||
|
"code[translate]",
|
||||||
|
"samp[translate]",
|
||||||
"span[translate]",
|
"span[translate]",
|
||||||
"samp[translate]"
|
"img[decoding]",
|
||||||
|
"meta[name=color-scheme]",
|
||||||
|
"meta[name=theme-color]"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in a new issue