Aggiunto shortcode img per didascalie fatte meglio #365

Merged
amreo merged 4 commits from amreo/bglug.it:main into main 2025-04-08 20:05:12 +00:00
Showing only changes of commit 2b9362aef6 - Show all commits

View File

@ -1,13 +1,13 @@
<figcaption>
<div>
<img src="{{ .Get "src" }}" alt="{{ .Get "alt" }}" title="{{ .Get "title" }}">
<figcaption>
{{ if strings.HasPrefix (.Get "source") "http" }}
<small class="image-source">🛈 {{ T "source" }}: <a href="{{ .Get "source" }}" target="_blank">{{ .Get "source" }}</a></small>
{{ else if ne (.Get "source") "" }}
<small class="image-source">🛈 {{ T "source" }}: {{ .Get "source" }}</small>
{{ end }}
{{ if ne (.Get "author") "" }}
<small class="image-source">🧑‍🎨 {{ T "author" }}: {{ .Get "author" }}</small>
{{ end }}
@ -20,4 +20,5 @@
<small class="image-source">📄 {{ T "license" }}: {{ .Get "license-text" }}</small>
{{ end }}
{{ end }}
</figcaption>
</figcaption>
</div>