gallery masonry is mostly working now. Still needs some aestetical retouching and...
[theme-danix.xyz.git] / layouts / shortcodes / gal-img.html
diff --git a/layouts/shortcodes/gal-img.html b/layouts/shortcodes/gal-img.html
new file mode 100644 (file)
index 0000000..0693319
--- /dev/null
@@ -0,0 +1,7 @@
+{{- $src := .Get "src" -}}
+{{- $source := resources.Get $src -}}
+{{- $alt := .Get "alt" -}}
+{{- $icon := $source.Resize "400x webp" -}}
+<a class="gallery-item" href="{{ $source.RelPermalink }}" target="_blank">
+    <img src="{{ $icon.RelPermalink }}" alt="{{ $alt }}">
+</a>