diff options
author | notcarbide <41094677+notcarbide@users.noreply.github.com> | 2020-11-05 19:49:51 +0300 |
---|---|---|
committer | notcarbide <41094677+notcarbide@users.noreply.github.com> | 2020-11-05 19:57:31 +0300 |
commit | 14772332f824a0bebd1db888648a6b81c0ba6de5 (patch) | |
tree | 351c291555ba04f4ec1134e70f65e9288d0cb6de | |
parent | aa2ede49a357a8fa66256ad98925f8c92602142e (diff) |
layouts: shortcodes: Add shortcode to allow CSS to apply to post images
-rw-r--r-- | layouts/shortcodes/image.html | 8 |
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 }} + |