Implement side + margin note shortcodes.

This commit is contained in:
Shawn O'Hare 2015-12-29 20:41:07 -08:00
parent bb0310ec65
commit 7584401279
3 changed files with 15 additions and 0 deletions

View file

@ -29,6 +29,15 @@ The site specific parameters that this theme :wrecognizes are:
(i.e., pages of type "post") ignore this parameter. (i.e., pages of type "post") ignore this parameter.
- `toc` boolean: if true, display the table of contents for the page. - `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 ## Templates
TODO TODO
- [ ] Describe the role of each template file, as commenting within the files - [ ] Describe the role of each template file, as commenting within the files

View file

@ -0,0 +1,3 @@
<label for="{{ .Get 0 }}" class="margin-toggle">&#8853;</label>
<input type="checkbox" id="{{ .Get 0 }}" class="margin-toggle"/>
<span class="marginnote">{{ .Inner }}</span>

View 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>