revises layouts

This commit is contained in:
Huy Tran 2018-07-21 17:08:41 +10:00
parent aabdea8e07
commit bb990c4380
10 changed files with 30 additions and 134 deletions

View file

@ -0,0 +1,15 @@
<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>
{{ with .Get "title" }}
<span class="img--caption">{{ . }}</span>
{{ end }}
{{ with (.Get "caption")}}
<span class="img--caption">{{ . }}</span>
{{ end }}
</figcaption>
{{ end }}
</figure>