diff options
author | Friedrich Beckmann <friedrich.beckmann@gmx.de> | 2025-06-14 13:48:40 +0200 |
---|---|---|
committer | Friedrich Beckmann <friedrich.beckmann@gmx.de> | 2025-06-14 13:48:40 +0200 |
commit | e4a8a804aa5353bcaa4403da291e02bd9fcd22db (patch) | |
tree | 140e3b62e66c10952392c6c1bb36104d40d4e24a /themes/fredo/layouts/_markup |
initial version
Diffstat (limited to 'themes/fredo/layouts/_markup')
-rw-r--r-- | themes/fredo/layouts/_markup/render-image.html | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/themes/fredo/layouts/_markup/render-image.html b/themes/fredo/layouts/_markup/render-image.html new file mode 100644 index 0000000..86891e7 --- /dev/null +++ b/themes/fredo/layouts/_markup/render-image.html @@ -0,0 +1,12 @@ +{{ $myimg := resources.Get .Destination }} +{{ if $myimg }} + {{ $myimg := $myimg.Resize "1024x" }} + <figure class="small-figure"> + <picture> + <img alt="{{ .PlainText }}" src="{{ $myimg.RelPermalink }}"> + </picture> + <figcaption class="gallery-caption">{{ .Title }}</figcaption> + </figure> +{{ else }} + {{ errorf "Can not find image: %s" .Destination }} +{{ end }}
\ No newline at end of file |