diff options
Diffstat (limited to 'layouts/shortcodes/img-center.html')
-rw-r--r-- | layouts/shortcodes/img-center.html | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/layouts/shortcodes/img-center.html b/layouts/shortcodes/img-center.html index c247cc6..e3e3a4b 100644 --- a/layouts/shortcodes/img-center.html +++ b/layouts/shortcodes/img-center.html @@ -5,24 +5,23 @@ {{- $source := .Get 2 }} {{- $img1x := $img.Resize "450x webp q90"}} {{- $img2x := $img.Resize "900x webp q90"}} -<center> <figure> <img class="center" alt="{{ $caption }}" src="{{ $img1x.RelPermalink }}" srcset=" - {{ $img1x.RelPermalink }} 1x, - {{ $img2x.RelPermalink }} 2x, - " + {{ $img1x.RelPermalink }} 1x, + {{ $img2x.RelPermalink }} 2x + " width="{{ $img1x.Width }}" - height="{{ $img1x.Height }}"> - <figcaption> + height="{{ $img1x.Height }}" + > + <figcaption> {{ $caption }} {{- if $source }} - <a href="{{ $source }}" target="_blank" title="source">[source]</a> + <a href="{{ $source }}" target="_blank" title="source">[source]</a> {{ end }} - </figcaption> + </figcaption> </figure> -</center> |