summaryrefslogtreecommitdiffstats
path: root/layouts/shortcodes/img-nz.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/shortcodes/img-nz.html')
-rw-r--r--layouts/shortcodes/img-nz.html7
1 files changed, 7 insertions, 0 deletions
diff --git a/layouts/shortcodes/img-nz.html b/layouts/shortcodes/img-nz.html
new file mode 100644
index 0000000..30ea28a
--- /dev/null
+++ b/layouts/shortcodes/img-nz.html
@@ -0,0 +1,7 @@
+{{ if (index .Params 2) }}
+<a href="{{ index .Params 2 }}" target="_blank">
+ <img src="{{ index .Params 1 }}" alt="{{ index .Params 0 }}" />
+</a>
+{{ else }}
+<img src="{{ index .Params 1 }}" alt="{{ index .Params 0 }}" />
+{{ end }}