mirror of
https://git.qoto.org/fedipage/fedipage.git
synced 2024-09-28 15:20:38 +02:00
Added ability to click on and expand images through figure shortcode
This commit is contained in:
parent
a2f6896b7e
commit
2cfca058d5
2 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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>
|
||||
</figure>
|
||||
|
|
Loading…
Reference in a new issue