Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/yoshiharuyamashita/blackburn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts')
-rw-r--r--layouts/shortcodes/fluid_img.html8
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