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

Fix bad target id

This commit is contained in:
Rohan Kumar 2022-07-13 17:33:42 -07:00
parent 152219f2e8
commit af5380e236
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479

View file

@ -11,7 +11,11 @@
To achieve all these properties, I had to break the first rule of ARIA and misuse <aside>.
I'm a markup criminal now.
-->
<h{{ .Level }} id="{{ .Anchor | safeURL }}" tabindex="-1">{{ .Text | safeHTML -}}</h{{ .Level }}>
{{- $id := .Anchor | safeURL -}}
{{- if eq .Level 1 -}}
{{- $id = "h1" -}}
{{- end -}}
<h{{ .Level }} id="{{ $id }}" tabindex="-1">{{ .Text | safeHTML -}}</h{{ .Level }}>
{{- if and (eq .Level 2) (.Page.Section) (ne .Page.Section "notes") -}}
<!--crimes-->
<aside role="none"><a