diff options
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/shortcodes/fluid_img.html | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/layouts/shortcodes/fluid_img.html b/layouts/shortcodes/fluid_img.html index 6d3d66a..6930dd9 100644 --- a/layouts/shortcodes/fluid_img.html +++ b/layouts/shortcodes/fluid_img.html @@ -1 +1,7 @@ -<img src="{{ index .Params 0 }}" alt="" class="pure-img" > +{{ if .IsNamedParams }} +<div class="{{ if .Get "class" }}{{ .Get "class" }}{{ else }}pure-u-1{{ end }}"> + <img class="pure-img" src="{{ .Get "src" }}" {{ if or (.Get "alt") (.Get "caption") }}alt="{{ with .Get "alt"}}{{.}}{{else}}{{ .Get "caption" }}{{ end }}"{{ end }}> +</div> +{{ else }} +<img class="pure-img" src="{{ index .Params 0 }}" alt=""> +{{ end }}
\ No newline at end of file |