Move all the figure shortcodes to /layouts/shortcodes/figures; center all of them
This commit is contained in:
parent
ead979da00
commit
542866489d
12 changed files with 43 additions and 37 deletions
14
layouts/shortcodes/figures/image.html
Normal file
14
layouts/shortcodes/figures/image.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
{{ $img := (.Page.Resources.GetMatch (.Get "name")) }}
|
||||
{{ $resized_img := $img.Fit "1000x1000" }}
|
||||
<div class="centered">
|
||||
<figure>
|
||||
<a href="{{ $img.RelPermalink }}">
|
||||
<img src="{{ $resized_img.RelPermalink }}" />
|
||||
</a>
|
||||
{{ if $img.Title }}
|
||||
<figcaption>
|
||||
<p>{{ $img.Title }}</p>
|
||||
</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue