diff options
author | mms <michal@sapka.me> | 2024-02-23 19:47:04 +0100 |
---|---|---|
committer | mms <michal@sapka.me> | 2024-02-23 19:47:04 +0100 |
commit | 41c1176a8aaebad7c5f9b11d06edafd885f5d9c7 (patch) | |
tree | 1de3dae368303157fd98cad70fe43d1ba0ee2a90 /layouts/shortcodes | |
parent | ff441268a8442ccba6cbf094bb09521c0a4230e9 (diff) |
feat: add link to full img
Diffstat (limited to 'layouts/shortcodes')
-rw-r--r-- | layouts/shortcodes/img-c.html | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/layouts/shortcodes/img-c.html b/layouts/shortcodes/img-c.html index 3da2c5c..a05617f 100644 --- a/layouts/shortcodes/img-c.html +++ b/layouts/shortcodes/img-c.html @@ -7,17 +7,19 @@ {{- $img1x := $img.Resize "800x webp q90"}} {{- $img2x := $img.Resize "1600x webp q90"}} <figure> - <img - class="center {{ $imgclass }}" - alt="{{ $caption }}" - src="{{ $img1x.RelPermalink }}" - srcset=" - {{ $img1x.RelPermalink }} 1x, - {{ $img2x.RelPermalink }} 2x - " - width="{{ $img1x.Width }}" - height="{{ $img1x.Height }}" - > + <a href="{{ $img.RelPermalink }}"> + <img + class="center {{ $imgclass }}" + alt="{{ $caption }}" + src="{{ $img1x.RelPermalink }}" + srcset=" + {{ $img1x.RelPermalink }} 1x, + {{ $img2x.RelPermalink }} 2x + " + width="{{ $img1x.Width }}" + height="{{ $img1x.Height }}" + > + </a> <figcaption> {{ $caption }} |