source: tanzpartie-hugo/themes/bilberry-hugo-theme/layouts/partials/featured-image.html @ 17727

Last change on this file since 17727 was 16971, checked in by Henrik Bettermann, 2 years ago
File size: 751 bytes
Line 
1{{ if .Resources.GetMatch "featuredImage.*" }}
2    <div class="featured-image">
3        <a href="{{ .Permalink }}">
4            {{ if and (.Site.Params.resizeImages | default true) (.Params.resizeImages | default true) }}
5                <img src="{{ ((.Resources.GetMatch "featuredImage.*").Fill "700x350 q95").RelPermalink }}" alt="">
6            {{ else }}
7                <img src="{{ (.Resources.GetMatch "featuredImage.*").RelPermalink }}" alt="">
8            {{ end }}
9        </a>
10    </div>
11{{ else if and (isset .Params "featuredimage") (ne .Params.featuredImage "") }}
12    <div class="featured-image">
13        <a href="{{ .Permalink }}">
14            <img src="{{ .Params.featuredImage | relURL }}" alt="">
15        </a>
16    </div>
17{{ end }}
Note: See TracBrowser for help on using the repository browser.