Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/your-identity/hugo-theme-dimension.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornotcarbide <41094677+notcarbide@users.noreply.github.com>2020-11-05 19:49:51 +0300
committernotcarbide <41094677+notcarbide@users.noreply.github.com>2020-11-05 19:57:31 +0300
commit14772332f824a0bebd1db888648a6b81c0ba6de5 (patch)
tree351c291555ba04f4ec1134e70f65e9288d0cb6de
parentaa2ede49a357a8fa66256ad98925f8c92602142e (diff)
layouts: shortcodes: Add shortcode to allow CSS to apply to post images
-rw-r--r--layouts/shortcodes/image.html8
1 files changed, 8 insertions, 0 deletions
diff --git a/layouts/shortcodes/image.html b/layouts/shortcodes/image.html
new file mode 100644
index 0000000..3611976
--- /dev/null
+++ b/layouts/shortcodes/image.html
@@ -0,0 +1,8 @@
+{{ if .IsNamedParams }}
+ <span class="image {{ .Get "set" }}">
+ <img src="{{ .Get "src" }}" alt="{{ .Get "alt" }}" />
+ </span>
+{{ else }}
+ <span class="image {{ .Get 1 }}"><img src="{{ .Get 0 }}" alt="" /></span>
+{{ end }}
+