|
@@ -1,22 +1,15 @@
|
|
<div class="pub-list-item card-simple" itemscope itemtype="http://schema.org/CreativeWork">
|
|
<div class="pub-list-item card-simple" itemscope itemtype="http://schema.org/CreativeWork">
|
|
|
|
|
|
- {{ if .Params.image_preview }}
|
|
|
|
- {{ .Scratch.Set "image" .Params.image_preview }}
|
|
|
|
- {{ else if .Params.header.image }}
|
|
|
|
- {{ .Scratch.Set "image" .Params.header.image }}
|
|
|
|
- {{ end }}
|
|
|
|
- {{ if .Scratch.Get "image" }}
|
|
|
|
|
|
+ {{ $resource := (.Resources.ByType "image").GetMatch "*featured*" }}
|
|
|
|
+ {{ $anchor := .Params.image.focal_point | default "Smart" }}
|
|
|
|
+ {{ with $resource }}
|
|
|
|
+ {{ $image := .Fill (printf "918x517 q90 %s" $anchor) }}
|
|
<div>
|
|
<div>
|
|
- <a href="{{ .RelPermalink }}">
|
|
|
|
- {{ $img_src := urls.Parse (.Scratch.Get "image") }}
|
|
|
|
- {{ if $img_src.Scheme }}
|
|
|
|
- <img src="{{ .Scratch.Get "image" }}" class="article-banner" itemprop="image">
|
|
|
|
- {{ else }}
|
|
|
|
- <img src="{{ "/img/" | relURL }}{{ .Scratch.Get "image" }}" class="article-banner" itemprop="image">
|
|
|
|
- {{ end }}
|
|
|
|
|
|
+ <a href="{{ $.RelPermalink }}">
|
|
|
|
+ <img src="{{ $image.RelPermalink }}" class="article-banner" itemprop="image" alt="">
|
|
</a>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
- {{ end }}
|
|
|
|
|
|
+ {{end}}
|
|
|
|
|
|
<h3 class="article-title" itemprop="name">
|
|
<h3 class="article-title" itemprop="name">
|
|
<a href="{{ .RelPermalink }}" itemprop="url">{{ .Title }}</a>
|
|
<a href="{{ .RelPermalink }}" itemprop="url">{{ .Title }}</a>
|