diff options
author | Davide Asnaghi <30296575+d-asnaghi@users.noreply.github.com> | 2020-12-14 02:22:51 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-14 02:22:51 +0300 |
commit | bfd73a84dd7ec119058bcad61e8bf46059288049 (patch) | |
tree | 351c291555ba04f4ec1134e70f65e9288d0cb6de | |
parent | aa2ede49a357a8fa66256ad98925f8c92602142e (diff) | |
parent | 14772332f824a0bebd1db888648a6b81c0ba6de5 (diff) |
Merge pull request #12 from carbideband/img-shortcode
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 }} + |