forked from mirrors/hugo-tufte
use scratch method for marginnote as well
This commit is contained in:
parent
7595e2e6b9
commit
263ec827c7
1 changed files with 6 additions and 1 deletions
|
@ -1,4 +1,9 @@
|
|||
{{- $label := (add .Ordinal 1) -}}
|
||||
{{- with $.Page.Scratch.Get "marginnoteCounter" -}}
|
||||
{{- $.Page.Scratch.Set "marginnoteCounter" (add . 1) -}}
|
||||
{{- else -}}
|
||||
{{- $.Page.Scratch.Set "marginnoteCounter" 1 -}}
|
||||
{{- end -}}
|
||||
{{- $label := $.Page.Scratch.Get "marginnoteCounter" -}}
|
||||
{{- $ind := .Get "ind" | default .Site.Params.marginNoteInd -}}
|
||||
<label for="marginnote-{{ $label }}" class="margin-toggle marginnote-ind">{{ $ind }}</label>
|
||||
<input type="checkbox" id="marginnote-{{ $label }}" class="margin-toggle"/>
|
||||
|
|
Loading…
Reference in a new issue