1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-23 21:02:09 +00:00

Remove deprecated ARIA, unused classes

This commit is contained in:
Rohan Kumar 2022-04-06 17:49:25 -07:00
parent aab9356cf2
commit 47106441f7
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479

View file

@ -3,12 +3,16 @@
{{ $references := `(<section class="footnotes" role="doc-endnotes">
<hr>)` -}}
{{ $heading := .Params.footnote_heading -}}
{{ $referencesWithHeading := printf `<section class="footnotes" role="doc-endnotes" aria-labelledby="note-hd">
{{ $referencesWithHeading := printf `<section role="doc-endnotes" aria-labelledby="note-hd">
<h2 id="note-hd">%s</h2>` ($heading) -}}
{{ $endnote := `(role="doc-endnote")` }}
{{ $noEndnote := printf "" }}
{{ .Content | replaceRE $references $referencesWithHeading | replaceRE $endnote $noEndnote | safeHTML -}}
{{ $preWithTabIndex := `<pre tabindex="0">` }}
{{ $preWithoutTabIndex := `<pre>` }}
{{ .Content | replaceRE $references $referencesWithHeading | replaceRE $endnote $noEndnote | replaceRE $preWithTabIndex $preWithoutTabIndex | safeHTML -}}
{{ else -}}
{{ .Content -}}
{{ end -}}