mirror of
https://github.com/loikein/hugo-tufte.git
synced 2024-11-15 04:46:58 +01:00
4299d3bfdb
* Removing dom ID requirement for margin/sidenotes Prior to this commit, when using the `marginnote` or `sidenote` shortcodes, you would need to pass a domId parameter to the shortcode. With this change you no longer need to pass a parameter, and any parameter passed is ignored. The pre-amble creates a unique domID for the shortcodes. * Replacing convoluted Scratch with Ordinal I was leveraging the Scratch function of Hugo, when I could instead rely on `.Ordinal`
3 lines
306 B
HTML
3 lines
306 B
HTML
{{ $marginnoteDomIdSuffix := .Ordinal }}<label for="marginnote-{{.Page.UniqueID}}-{{ $marginnoteDomIdSuffix }}" class="margin-toggle">⊕</label>
|
|
<input type="checkbox" id="marginnote-{{.Page.UniqueID}}-{{ $marginnoteDomIdSuffix }}" class="margin-toggle"/>
|
|
<span class="marginnote">{{ .Inner }}</span>
|