mirror of
https://github.com/loikein/hugo-tufte.git
synced 2025-08-04 10:32:45 +02:00
new features for margin/side note
This commit is contained in:
parent
233074c9bf
commit
a1b9b7dcbd
3 changed files with 11 additions and 8 deletions
layouts/shortcodes
|
@ -1,4 +1,7 @@
|
|||
{{ $marginnoteDomIdSuffix := .Ordinal }}
|
||||
<label for="marginnote-{{.Page.File.UniqueID}}-{{ $marginnoteDomIdSuffix }}" class="margin-toggle marginnote-ind">💬</label>
|
||||
<input type="checkbox" id="marginnote-{{.Page.File.UniqueID}}-{{ $marginnoteDomIdSuffix }}" class="margin-toggle"/>
|
||||
<span class="marginnote"><span class="marginnote-ind">💬</span> {{ .Inner | markdownify}}</span>
|
||||
{{- $marginnoteDomIdSuffix := (add .Ordinal 1) -}}
|
||||
{{- $ind := .Get "ind" | default .Site.Params.marginNoteInd -}}
|
||||
<label for="marginnote-{{ $marginnoteDomIdSuffix }}" class="margin-toggle marginnote-ind">{{ $ind }}</label>
|
||||
<input type="checkbox" id="marginnote-{{ $marginnoteDomIdSuffix }}" class="margin-toggle"/>
|
||||
<span class="marginnote">
|
||||
{{ .Inner | markdownify}}
|
||||
</span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue