diff --git a/CHANGELOG.md b/CHANGELOG.md index f1e7da501f2d71f7825b1719f4b48dcb9bf56576..31bff3723c14c23cccdf3dc78850a9ece92b5571 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * When a post has an `image_header` parameter this image is set as an attachment to ActivityPub posts * Fixed some poor CSS rendering for quote-box. +* the `figure` shortcode will now make images clickable to see the full size. ## 2.1.0 diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html index eeb792d0f44c23082d0201e63bcce005f5017571..6a2cd5c579c62fbe457315cbd13392ca44a4bf4e 100644 --- a/layouts/shortcodes/figure.html +++ b/layouts/shortcodes/figure.html @@ -1,4 +1,5 @@ <figure> + {{- if .Get "src" }}<a href="{{ .Get "src" }}">{{ end }} <img {{ with .Get "src" }}src="{{ . }}"{{ end }} {{ with .Get "alt" }}alt="{{ range (split . " ") }}{{ . }} {{ end }}"{{ end }} @@ -9,5 +10,6 @@ {{ with .Get "width" }}width="{{ . }}"{{ end }} {{ with .Get "height" }}height="{{ . }}"{{ end }} {{ with .Get "layout" }}layout="{{ . }}"{{ end }} /> + {{- if .Get "src" }}</a>{{ end }} {{ with .Get "caption" }}<figcaption>{{ . }}</figcaption>{{ end }} - </figure> \ No newline at end of file +</figure>