Add smallimg shortcode for adding images that arent the full size

This commit is contained in:
Joe Hutchinson
2019-01-11 14:00:35 -05:00
parent fbca10e2a1
commit 87e672cb24
2 changed files with 27 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
<img src="{{ index .Params "src" }}"
{{- if isset .Params "alt" }} alt="{{ index .Params "alt"}}" {{ end -}}
class="small-img {{ if isset .Params "smartfloat" -}}
{{- if eq .Params.smartfloat "left" -}}
smartfloat-left
{{- else if eq .Params.smartfloat "right" -}}
smartfloat-right
{{- end -}}
{{- end }}"
{{- if isset .Params "width" }} style="width: {{ index .Params "width" }};" {{- end -}}
/>