mirror of
https://github.com/Vimux/Binario.git
synced 2024-11-23 22:48:35 +00:00
Make thumbnail image clickable on list partial
This commit is contained in:
parent
6b3d4c831c
commit
290d1cb0ae
3 changed files with 11 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
<article class="post card__box block">
|
||||
{{- partial "post_thumbnail.html" (dict "page" . ) }}
|
||||
{{- partial "post_thumbnail.html" (dict "page" . "link" .RelPermalink) }}
|
||||
<h1 class="post__title title-excerpt"><a class="post__title-link" href="{{ .RelPermalink }}">{{ .Title }}</a></h1>
|
||||
<div class="post__content">{{- .Summary }}</div>
|
||||
{{- partial "post_meta.html" (dict "dot" . "class" "mt tar") }}
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
{{- $img := (.page.Resources.ByType "image").GetMatch "thumbnail.*" }}
|
||||
{{- $link := .link }}
|
||||
{{- with $img }}
|
||||
<figure class="post__thumbnail thumbnail">
|
||||
{{- with $link }}
|
||||
<a class="thumbnail__link" href="{{ . }}">
|
||||
<img class="thumbnail__img" src="{{ $img.RelPermalink }}" alt="{{ $img.Title }}">
|
||||
</a>
|
||||
{{- else }}
|
||||
<img class="thumbnail__img" src="{{ $img.RelPermalink }}" alt="{{ $img.Title }}">
|
||||
{{- end }}
|
||||
</figure>
|
||||
{{- end }}
|
Loading…
Reference in a new issue