diff options
author | Thedro Neely <thedroneely@gmail.com> | 2022-03-20 02:31:00 -0400 |
---|---|---|
committer | Thedro Neely <thedroneely@gmail.com> | 2022-03-20 02:31:00 -0400 |
commit | e2aff35eb02e501640987e72a08b40a32120204d (patch) | |
tree | a27ae9f41720d6a0ceb26fd2e981bc8c79860327 /generators/hugo/themes/tdro/layouts/_default/_markup/render-image.html | |
parent | bf3d2b054388da125568f23b64509a9ec8e939b9 (diff) | |
download | thedroneely.com-e2aff35eb02e501640987e72a08b40a32120204d.tar.gz thedroneely.com-e2aff35eb02e501640987e72a08b40a32120204d.tar.bz2 thedroneely.com-e2aff35eb02e501640987e72a08b40a32120204d.zip |
generators/hugo/layouts/_markup/render-image: Deprecate image shortcodes
Add render image hook and carefully slip figures into content.
Image shortcodes can now be replaced with markdown and eventually
removed.
Diffstat (limited to 'generators/hugo/themes/tdro/layouts/_default/_markup/render-image.html')
-rw-r--r-- | generators/hugo/themes/tdro/layouts/_default/_markup/render-image.html | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/generators/hugo/themes/tdro/layouts/_default/_markup/render-image.html b/generators/hugo/themes/tdro/layouts/_default/_markup/render-image.html new file mode 100644 index 0000000..b5deec5 --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/_default/_markup/render-image.html @@ -0,0 +1,18 @@ +{{ $imageFile := print "public" (.Destination | safeURL) }} +{{ $image := imageConfig $imageFile }} +{{- /* This comment removes trailing newlines. */ -}} +<figure> + <a href="{{ .Destination | safeURL }}" onclick="return false;"> + <img data-image-zoom + src="{{ .Destination | safeURL }}" + alt="{{ $.Text }}" + title="{{ $.Text }}" + width="{{ $image.Width }}" + height="{{ $image.Height }}" + /> + </a> + <figcaption class="has-text-centered has-text-grey-dark"> + {{ $.Title | markdownify }} + </figcaption> +</figure> +{{- /* This comment removes trailing newlines. */ -}} |