mirror of
https://github.com/loikein/hugo-tufte.git
synced 2024-12-23 13:59:44 +01:00
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 -}}
|
{{- $ind := .Get "ind" | default .Site.Params.marginNoteInd -}}
|
||||||
<label for="marginnote-{{ $label }}" class="margin-toggle marginnote-ind">{{ $ind }}</label>
|
<label for="marginnote-{{ $label }}" class="margin-toggle marginnote-ind">{{ $ind }}</label>
|
||||||
<input type="checkbox" id="marginnote-{{ $label }}" class="margin-toggle"/>
|
<input type="checkbox" id="marginnote-{{ $label }}" class="margin-toggle"/>
|
||||||
|
|
Loading…
Reference in a new issue