aboutsummaryrefslogtreecommitdiff
path: root/generators/hugo/themes/tdro/layouts/shortcodes/image.html
diff options
context:
space:
mode:
authorThedro Neely <thedroneely@gmail.com>2019-05-17 22:56:00 -0400
committerThedro Neely <thedroneely@gmail.com>2019-05-17 22:56:00 -0400
commit51c0cc199f30e195eafbf04e6be09dd8b2561574 (patch)
treeeac3c7950a8855b3f38c1bb9d7744f5a60e2a4f8 /generators/hugo/themes/tdro/layouts/shortcodes/image.html
parent48e0d578c7f65e6a0ab8d293217983ba8bb21c00 (diff)
downloadthedroneely.com-51c0cc199f30e195eafbf04e6be09dd8b2561574.tar.gz
thedroneely.com-51c0cc199f30e195eafbf04e6be09dd8b2561574.tar.bz2
thedroneely.com-51c0cc199f30e195eafbf04e6be09dd8b2561574.zip
generators/hugo: Add Hugo theme source files
Diffstat (limited to 'generators/hugo/themes/tdro/layouts/shortcodes/image.html')
-rw-r--r--generators/hugo/themes/tdro/layouts/shortcodes/image.html13
1 files changed, 13 insertions, 0 deletions
diff --git a/generators/hugo/themes/tdro/layouts/shortcodes/image.html b/generators/hugo/themes/tdro/layouts/shortcodes/image.html
new file mode 100644
index 0000000..cc2ce0b
--- /dev/null
+++ b/generators/hugo/themes/tdro/layouts/shortcodes/image.html
@@ -0,0 +1,13 @@
+{{ safeHTML "<?php" }}
+$width = '"' . getimagesize($_SERVER['DOCUMENT_ROOT'] . '{{.Get `source`}}')[0] . '"';
+$height = '"' . getimagesize($_SERVER['DOCUMENT_ROOT'] . '{{.Get `source`}}')[1] . '"';
+{{ safeHTML "?>" }}
+
+<figure>
+ <a href="{{.Get `source`}}" onclick="return false;">
+ <img data-image-zoom src="{{.Get `source`}}" alt="{{.Get `title`}}" title="{{.Get `title`}}"
+ {{ safeHTMLAttr "<?php echo 'width=' . $width; ?>" }}
+ {{ safeHTMLAttr "<?php echo 'height=' . $height; ?>" }} />
+ </a>
+ <figcaption class="has-text-centered has-text-grey-dark">{{ .Inner }}</figcaption>
+</figure>