feat(article list): make featured image clickable

This commit is contained in:
Jimmy Cai 2020-08-25 21:16:47 +02:00
parent 415b8a7a0a
commit 9cb3115914

View file

@ -4,9 +4,11 @@
{{- $thumbnailNotDesktop := $image.Resize "x500 smart" -}} {{- $thumbnailNotDesktop := $image.Resize "x500 smart" -}}
<div class="article-image"> <div class="article-image">
<a href="{{ .Permalink }}">
<img src="{{ $thumbnailNotDesktop.RelPermalink }}" <img src="{{ $thumbnailNotDesktop.RelPermalink }}"
width="{{ $thumbnailNotDesktop.Width }}" height="{{ $thumbnailNotDesktop.Height }}" loading="lazy" width="{{ $thumbnailNotDesktop.Width }}" height="{{ $thumbnailNotDesktop.Height }}" loading="lazy"
alt="Featured image of post {{ .Title }}" /> alt="Featured image of post {{ .Title }}" />
</a>
</div> </div>
{{ end }} {{ end }}