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

github.com/heyeshuang/hugo-theme-tokiwa.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/shortcodes/fluid_img.html')
-rw-r--r--layouts/shortcodes/fluid_img.html7
1 files changed, 7 insertions, 0 deletions
diff --git a/layouts/shortcodes/fluid_img.html b/layouts/shortcodes/fluid_img.html
new file mode 100644
index 0000000..6930dd9
--- /dev/null
+++ b/layouts/shortcodes/fluid_img.html
@@ -0,0 +1,7 @@
+{{ 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