thrrgilag.net/themes/blackburn/layouts/shortcodes/fluid_img.html

7 lines
357 B
HTML
Raw Normal View History

2018-11-24 21:02:48 +00:00
{{ 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 }}