36 lines
1.2 KiB
HTML
36 lines
1.2 KiB
HTML
<!-- image -->
|
|
<figure {{ with .Get "class" }}class="{{.}}"{{ end }}>
|
|
{{ with .Get "link" }}<a href="{{ . }}">{{ end }}
|
|
<img src="{{ .Get "src" }}"
|
|
{{ if or (.Get "alt") (.Get "caption") }}alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" }}{{ end }}"{{ end }} />
|
|
{{ if .Get "link" }}</a>{{ end }}
|
|
|
|
{{ if or (or (.Get "title") (.Get "caption")) (.Get "attr") }}
|
|
<figcaption>
|
|
{{ if isset .Params "title" }}
|
|
{{ .Get "title" }}
|
|
{{ end }}
|
|
|
|
{{ if or (.Get "caption") (.Get "attr") }}
|
|
<p style="margin: -0.5rem 0 0 0;">
|
|
{{ .Get "caption" }}
|
|
|
|
|
|
{{ with .Get "attrlink" }}
|
|
<a href="{{ . }}">
|
|
{{ end }}
|
|
{{ if .Get "attr" }}
|
|
<small style="margin: -0.5rem 0 0 0;">
|
|
[{{ .Get "attr" }}]
|
|
</small>
|
|
{{ end }}
|
|
{{ if .Get "attrlink" }}</a>
|
|
{{ end }}
|
|
|
|
</p>
|
|
{{ end }}
|
|
</figcaption>
|
|
{{ end }}
|
|
</figure>
|
|
<!-- image -->
|