diff options
Diffstat (limited to 'generators/hugo/themes/tdro/layouts/shortcodes/marginimage.html')
-rw-r--r-- | generators/hugo/themes/tdro/layouts/shortcodes/marginimage.html | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/generators/hugo/themes/tdro/layouts/shortcodes/marginimage.html b/generators/hugo/themes/tdro/layouts/shortcodes/marginimage.html new file mode 100644 index 0000000..b880adb --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/shortcodes/marginimage.html @@ -0,0 +1,14 @@ +{{ $id := md5 (printf (.Get `mark`) .Inner) }} +{{ $imageFile := print "public" (.Get `source`) }} +{{ $image := imageConfig $imageFile }} + +<span class="marginnote-container"> + <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 sideimage {{ .Get `set` }}note"> + <a href="{{.Get `source`}}" onclick="return false;"> + <img data-image-zoom src="{{ .Get `source`}}" alt="{{ .Inner }}" title="{{ .Get `title`}}" width="{{ $image.Width }}" height="{{ $image.Height }}"/> + </a> + <span class="sideimage-footer is-block has-text-centered has-text-grey-dark"><mark>{{ .Inner }}</mark></span> + </span> +</span> |