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/shortcodes/fluid_imgs.html')
-rw-r--r--layouts/shortcodes/fluid_imgs.html21
1 files changed, 21 insertions, 0 deletions
diff --git a/layouts/shortcodes/fluid_imgs.html b/layouts/shortcodes/fluid_imgs.html
new file mode 100644
index 0000000..f899772
--- /dev/null
+++ b/layouts/shortcodes/fluid_imgs.html
@@ -0,0 +1,21 @@
+{{ $paramCount := len .Params }}
+{{ if gt $paramCount 0 }}
+<div class="pure-g">
+{{ range $param := .Params }}
+ {{ $items := split $param "|" }}
+ {{ $itemCount := len $items }}
+ <!-- Item count must be at least 2 as
+ "class" and "src" must be specified -->
+ {{ if ge $itemCount 2 }}
+ <div class="{{ index $items 0 }}">
+ <div style="padding: 0 .2em">
+ <img
+ class="pure-img-responsive"
+ src="{{ index $items 1 }}"
+ alt="{{ if ge $itemCount 3 }}{{ index $items 2 }}{{ else }}{{ "" }}{{ end }}">
+ </div>
+ </div>
+ {{ end }}
+{{ end }}
+</div>
+{{ end }} \ No newline at end of file