mirror of
https://github.com/loikein/hugo-tufte.git
synced 2024-12-23 22:09:44 +01:00
11 lines
582 B
HTML
11 lines
582 B
HTML
{{- with $.Page.Scratch.Get "sidenoteCounter" -}}
|
|
{{- $.Page.Scratch.Set "sidenoteCounter" (add . 1) -}}
|
|
{{- else -}}
|
|
{{- $.Page.Scratch.Set "sidenoteCounter" 1 -}}
|
|
{{- end -}}
|
|
{{- $sidenoteDomIdSuffix := $.Page.Scratch.Get "sidenoteCounter" -}}
|
|
<label for="sidenote-{{ $sidenoteDomIdSuffix }}" class="margin-toggle sidenote-number">({{ $sidenoteDomIdSuffix }})</label>
|
|
<input type="checkbox" id="sidenote-{{ $sidenoteDomIdSuffix }}" class="margin-toggle"/>
|
|
<span class="sidenote">
|
|
<span class="sidenote-number">({{ $sidenoteDomIdSuffix }})</span>{{ .Inner | markdownify }}
|
|
</span>
|