New attempt at sidenotes using strategy found in scripter.co

This commit is contained in:
2022-04-05 19:09:01 -04:00
parent a5bf8896f1
commit 109abe6600
4 changed files with 54 additions and 14 deletions

View File

@ -1,8 +0,0 @@
{{ $loc := .Get 0 }}
{{ if .IsNamedParams }}
<div {{with .Get "class"}} class="{{.}}"{{end}}{{with .Get "id"}} id="{{.}}"{{end}}>
{{ else if or (eq $loc "") (eq $loc "begin") }}
<div>
{{ else if eq $loc "end" }}
</div>
{{ end }}

View File

@ -1,3 +0,0 @@
{{ $marginnoteDomIdSuffix := .Ordinal }}<label for="marginnote-{{.Page.File.UniqueID}}-{{ $marginnoteDomIdSuffix }}" class="margin-toggle">&#8853;</label>
<input type="checkbox" id="marginnote-{{.Page.File.UniqueID}}-{{ $marginnoteDomIdSuffix }}" class="margin-toggle"/>
<span class="marginnote">{{ .Inner }}</span>

View File

@ -1,3 +1 @@
{{ $sidenoteDomIdSuffix := .Ordinal }}<label for="sidenote-{{.Page.File.UniqueID}}-{{ $sidenoteDomIdSuffix }}" class="margin-toggle sidenote-number"></label>
<input type="checkbox" id="sidenote-{{.Page.File.UniqueID}}-{{ $sidenoteDomIdSuffix }}" class="margin-toggle"/>
<span class="sidenote">{{ .Inner }}</span>
<span class="sidenote-number"><small class="sidenote">{{ .Inner }}</small></span>