forked from mirrors/hugo-tufte
Implement side + margin note shortcodes.
This commit is contained in:
parent
bb0310ec65
commit
7584401279
3 changed files with 15 additions and 0 deletions
|
@ -29,6 +29,15 @@ The site specific parameters that this theme :wrecognizes are:
|
|||
(i.e., pages of type "post") ignore this parameter.
|
||||
- `toc` boolean: if true, display the table of contents for the page.
|
||||
|
||||
## Shortcodes
|
||||
|
||||
- `sidenote`: Wrap text to produce an automatically numbered sidenote.
|
||||
The single positional argument is a required unique identifier.
|
||||
Example: `{{% sidenote "sn-example" %}}Some sidenote{{% /sidenote %}}`
|
||||
- `marginnote`: Wrap text to produce a numberless margin note.
|
||||
The single positional argument is a required unique identifier.
|
||||
Example: `{{% marginnote"mn-example" %}}Some marginnote{{% /marginnote%}}`
|
||||
|
||||
## Templates
|
||||
TODO
|
||||
- [ ] Describe the role of each template file, as commenting within the files
|
||||
|
|
3
layouts/shortcodes/marginnote.html
Normal file
3
layouts/shortcodes/marginnote.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
<label for="{{ .Get 0 }}" class="margin-toggle">⊕</label>
|
||||
<input type="checkbox" id="{{ .Get 0 }}" class="margin-toggle"/>
|
||||
<span class="marginnote">{{ .Inner }}</span>
|
3
layouts/shortcodes/sidenote.html
Normal file
3
layouts/shortcodes/sidenote.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
<label for="{{ .Get "id" }}" class="margin-toggle sidenote-number"></label>
|
||||
<input type="checkbox" id="{{ .Get "id" }}" class="margin-toggle"/>
|
||||
<span class="sidenote">{{ .Inner }}</span>
|
Loading…
Reference in a new issue