This repository has been archived on 2020-05-21. You can view files and clone it, but cannot push or open issues or pull requests.
2019-11-24 10:09:39 +00:00
|
|
|
{{ $src := .Page.Resources.GetMatch (printf "*%s*" (.Get "src")) }}
|
2019-11-24 19:44:24 +00:00
|
|
|
{{ $thumb := $src.Fill "500x500" }}
|
2019-11-24 10:09:39 +00:00
|
|
|
<div class="box">
|
|
|
|
<figure itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">
|
|
|
|
<div class="img"{{ if .Parent }} style="background-image: url('{{ $thumb.RelPermalink }}');"{{ end }}>
|
2019-12-01 19:25:57 +00:00
|
|
|
<img itemprop="thumbnail" src="{{ $thumb.RelPermalink }}" {{ with .Get "caption" }}alt="{{ . | markdownify }}"{{ end }}/>
|
2019-11-24 10:09:39 +00:00
|
|
|
</div>
|
|
|
|
<a href="{{ $src.RelPermalink }}" itemprop="contentUrl" data-size="{{ $src.Width }}x{{ $src.Height }}"></a>
|
|
|
|
{{ with .Get "caption" }}
|
2019-11-24 20:07:01 +00:00
|
|
|
<figcaption><p>{{ . | markdownify }}</p></figcaption>
|
2019-11-24 10:09:39 +00:00
|
|
|
{{ end }}
|
|
|
|
</figure>
|
|
|
|
</div>
|