1
0
forked from BgLUG/bglug.it

Piccoli fi

This commit is contained in:
amreo 2025-02-04 22:45:00 +01:00
parent 8d3f758755
commit 2b9362aef6

View File

@ -1,23 +1,24 @@
<figcaption>
<div>
<img src="{{ .Get "src" }}" alt="{{ .Get "alt" }}" title="{{ .Get "title" }}">
{{ 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 }}
{{ if ne (.Get "license-text") "" }}
{{ if strings.HasPrefix (.Get "license-url") "http" }}
<small class="image-source">📄 {{ T "license" }}: <a href="{{ .Get "license-url" }}" target="_blank">{{ .Get "license-text" }}</a></small>
{{ else }}
<small class="image-source">📄 {{ T "license" }}: {{ .Get "license-text" }}</small>
<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 }}
{{ end }}
</figcaption>
{{ if ne (.Get "author") "" }}
<small class="image-source">🧑‍🎨 {{ T "author" }}: {{ .Get "author" }}</small>
{{ end }}
{{ if ne (.Get "license-text") "" }}
{{ if strings.HasPrefix (.Get "license-url") "http" }}
<small class="image-source">📄 {{ T "license" }}: <a href="{{ .Get "license-url" }}" target="_blank">{{ .Get "license-text" }}</a></small>
{{ else }}
<small class="image-source">📄 {{ T "license" }}: {{ .Get "license-text" }}</small>
{{ end }}
{{ end }}
</figcaption>
</div>