alex.racine/themes/portfoliGor/layouts/shortcodes/img.html

14 lines
536 B
HTML
Raw Permalink Normal View History

<figure>
{{ with .Get "src" }}
<img src="{{ . }}" />
{{ end }}
{{ if and (.Get "licence") (.Get "author") (.Get "url") }}
<figcaption>
<h4>{{ .Get "licence" }} <a href="{{ .Get `url` }}">{{ .Get "author" }}</a></h4>
</figcaption>
{{ else if and (.Get "author") (.Get "url") (.Get "service") (.Get "service_url") }}
<figcaption>
<h4>Image de <a href="{{ .Get `url` }}">{{ .Get "author" }}</a> sur <a href="{{ .Get `service_url` }}">{{ .Get "service" }}</a></h4>
</figcaption>
{{ end }}
</figure>