33 lines
987 B
HTML
33 lines
987 B
HTML
|
{{- $scratch := newScratch }}
|
||
|
{{- if isset .Params "image" }}
|
||
|
{{- $scratch.Set "image" .Params.image }}
|
||
|
{{- else }}
|
||
|
{{- if isset .Params "featured_image" }}
|
||
|
{{- $scratch.Set "image" .Params.featured_image }}
|
||
|
{{- else }}
|
||
|
{{ $scratch.Set "image" "thumbnail.svg" }}
|
||
|
{{- end }}
|
||
|
{{- end }}
|
||
|
{{- $image := $scratch.Get "image" }}
|
||
|
{{- $bg := ( $image | absLangURL) }}
|
||
|
<li class = 'post_item'>
|
||
|
<a class = 'post_card' href='{{ .RelPermalink }}' title = '{{ .Title }}' style = 'background-image: url({{ $bg }});'>
|
||
|
</a>
|
||
|
<div class = 'excerpt'>
|
||
|
<div class = 'excerpt_meta'>
|
||
|
{{- with .Params.tags -}}
|
||
|
{{- range first 1 . }}
|
||
|
{{- $tag := . | urlize }}
|
||
|
<a href = '{{ absURL (printf "tags/%s" $tag) }}' class = 'post_tag'>
|
||
|
{{- . }}
|
||
|
</a>
|
||
|
{{- end }}
|
||
|
{{- end }}
|
||
|
</div>
|
||
|
<h3 class = 'post_link'>
|
||
|
<a href='{{ .RelPermalink }}'>{{ .Title }}</a>
|
||
|
</h3>
|
||
|
<p class = 'pale'>{{ .Summary | truncate 90 }}</p>
|
||
|
</div>
|
||
|
</li>
|