aboutsummaryrefslogtreecommitdiff
path: root/generators/hugo/themes/tdro/layouts/shortcodes/marginnote.html
diff options
context:
space:
mode:
authorThedro Neely <thedroneely@gmail.com>2021-06-05 23:05:48 -0400
committerThedro Neely <thedroneely@gmail.com>2021-06-05 23:12:45 -0400
commit7baf433b53342ab55a32e74f3e3241ed5119032f (patch)
tree2599f315b3eafa2f2256af19ac9c8d4e4d63d18c /generators/hugo/themes/tdro/layouts/shortcodes/marginnote.html
parente2c59edb858a03ac44c2440c2a1d571e785b2301 (diff)
downloadthedroneely.com-7baf433b53342ab55a32e74f3e3241ed5119032f.tar.gz
thedroneely.com-7baf433b53342ab55a32e74f3e3241ed5119032f.tar.bz2
thedroneely.com-7baf433b53342ab55a32e74f3e3241ed5119032f.zip
generators/shortcodes: Footnote and image enhancements
Defensive; hash footnote content and mark ids to ensure no conflicts on side-notes and images. Decouple PHP from image short-codes. Add margin images. Ensure consistency between foot-notes, side-notes, and side-images.
Diffstat (limited to 'generators/hugo/themes/tdro/layouts/shortcodes/marginnote.html')
-rw-r--r--generators/hugo/themes/tdro/layouts/shortcodes/marginnote.html12
1 files changed, 7 insertions, 5 deletions
diff --git a/generators/hugo/themes/tdro/layouts/shortcodes/marginnote.html b/generators/hugo/themes/tdro/layouts/shortcodes/marginnote.html
index 12f74be..7718cb3 100644
--- a/generators/hugo/themes/tdro/layouts/shortcodes/marginnote.html
+++ b/generators/hugo/themes/tdro/layouts/shortcodes/marginnote.html
@@ -1,7 +1,9 @@
+{{ $id := md5 (printf (.Get `mark`) .Inner) }}
+
<span class="marginnote-container">
-<label for="{{ .Get `mark` }}" class="marginnote-toggle marginnote-mark" title="{{ .Inner }}">{{ .Get `mark` }}</label>
-<input type="checkbox" id="{{ .Get `mark` }}" class="marginnote-toggle">
-<span class="sans-serif marginnote {{ .Get `set` }}note">
-<mark>{{ .Inner }}</mark>
-</span>
+ <label for="{{ $id }}" class="marginnote-toggle marginnote-mark" title="{{ .Inner }}"><span>{{ .Get `mark` }}</span></label>
+ <input type="checkbox" id="{{ $id }}" class="marginnote-toggle">
+ <span class="sans-serif marginnote {{ .Get `set` }}note">
+ <mark>{{ .Inner }}</mark>
+ </span>
</span>