From 7baf433b53342ab55a32e74f3e3241ed5119032f Mon Sep 17 00:00:00 2001 From: Thedro Neely Date: Sat, 5 Jun 2021 23:05:48 -0400 Subject: 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. --- .../themes/tdro/layouts/shortcodes/sideimage.html | 33 ++++++++-------------- 1 file changed, 12 insertions(+), 21 deletions(-) (limited to 'generators/hugo/themes/tdro/layouts/shortcodes/sideimage.html') diff --git a/generators/hugo/themes/tdro/layouts/shortcodes/sideimage.html b/generators/hugo/themes/tdro/layouts/shortcodes/sideimage.html index 39e22a4..3e4966c 100644 --- a/generators/hugo/themes/tdro/layouts/shortcodes/sideimage.html +++ b/generators/hugo/themes/tdro/layouts/shortcodes/sideimage.html @@ -1,23 +1,14 @@ - - - - - - - -{{ safeHTML " 100) ? $height . 'px' : $height / $width * 100 . '%'; -{{ safeHTML "?>" }} - - - {{ .Inner }}` }} - {{ safeHTMLAttr `` }} /> - - - {{ .Inner }} - +{{ $id := md5 (printf (.Get `mark`) .Inner) }} +{{ $imageFile := print "public" (.Get `source`) }} +{{ $image := imageConfig $imageFile }} + + + + + + {{ .Inner }} + + {{ .Inner }} + -- cgit v1.2.3