revises layouts
This commit is contained in:
parent
aabdea8e07
commit
bb990c4380
10 changed files with 30 additions and 134 deletions
15
layouts/shortcodes/fig.html
Normal file
15
layouts/shortcodes/fig.html
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue