mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-11-17 13:25:57 -06:00
25 lines
662 B
HTML
25 lines
662 B
HTML
|
<figure>
|
||
|
|
||
|
{{ if .Get "href" }}<a href="{{ .Get "href" }}">{{ end }}
|
||
|
<img src="{{ .Get "src" }}"
|
||
|
{{ 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>
|