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

github.com/your-identity/hugo-theme-dimension.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--layouts/shortcodes/image.html8
1 files changed, 8 insertions, 0 deletions
diff --git a/layouts/shortcodes/image.html b/layouts/shortcodes/image.html
new file mode 100644
index 0000000..3611976
--- /dev/null
+++ b/layouts/shortcodes/image.html
@@ -0,0 +1,8 @@
+{{ if .IsNamedParams }}
+ <span class="image {{ .Get "set" }}">
+ <img src="{{ .Get "src" }}" alt="{{ .Get "alt" }}" />
+ </span>
+{{ else }}
+ <span class="image {{ .Get 1 }}"><img src="{{ .Get 0 }}" alt="" /></span>
+{{ end }}
+