mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2024-11-23 10:21:46 +01:00
feat(article list): make featured image clickable
This commit is contained in:
parent
415b8a7a0a
commit
9cb3115914
1 changed files with 5 additions and 3 deletions
|
@ -4,9 +4,11 @@
|
|||
{{- $thumbnailNotDesktop := $image.Resize "x500 smart" -}}
|
||||
|
||||
<div class="article-image">
|
||||
<img src="{{ $thumbnailNotDesktop.RelPermalink }}"
|
||||
width="{{ $thumbnailNotDesktop.Width }}" height="{{ $thumbnailNotDesktop.Height }}" loading="lazy"
|
||||
alt="Featured image of post {{ .Title }}" />
|
||||
<a href="{{ .Permalink }}">
|
||||
<img src="{{ $thumbnailNotDesktop.RelPermalink }}"
|
||||
width="{{ $thumbnailNotDesktop.Width }}" height="{{ $thumbnailNotDesktop.Height }}" loading="lazy"
|
||||
alt="Featured image of post {{ .Title }}" />
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
|
|
Loading…
Reference in a new issue