mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-12-22 12:13:19 -06:00
27 lines
764 B
HTML
27 lines
764 B
HTML
<figure>
|
|
|
|
{{ $img := $.Page.Resources.GetMatch (.Get "resrc") | resources.Fingerprint "sha512" }}
|
|
|
|
{{ if .Get "href" }}<a href="{{ .Get "href" }}">{{ end }}
|
|
<img src="{{ $img.Permalink }}"
|
|
{{ if or (.Get "alt") (.Get "caption") }}
|
|
alt="{{ with .Get "alt" -}}
|
|
{{ . -}}
|
|
{{ else -}}
|
|
{{ .Get "caption" | markdownify -}}
|
|
{{ end -}}"
|
|
{{ end }}
|
|
|
|
{{ with .Get "width" }} width="{{ . }}" {{ end }}
|
|
{{ with .Get "height" }} height="{{ . }}" {{ end }}
|
|
/>
|
|
{{ if .Get "href" }}</a>{{ end }}
|
|
|
|
{{ with .Get "caption" }}
|
|
<figcaption>
|
|
{{ . | markdownify }}
|
|
</figcaption>
|
|
{{ end }}
|
|
|
|
</figure>
|