30 lines
1.3 KiB
HTML
30 lines
1.3 KiB
HTML
<div
|
|
class="sans w-full px-2 lg:max-w-full lg:flex mt-3 lg:px-0 duration-500 transform hover:-translate-y-1 hover:shadow-md">
|
|
{{- $image := "" -}}
|
|
{{- if .Params.image -}}
|
|
{{- $image = .Resources.GetMatch .Params.image -}}
|
|
{{- end -}}
|
|
|
|
{{- if $image -}}
|
|
<!-- Wenn Bild im Artikelordner -->
|
|
<img id="thumb" alt="{{.Title}}" class="aspect-video object-cover w-auto lg:h-44"
|
|
src="{{ $image.RelPermalink }}" />
|
|
{{- else if .Params.image -}}
|
|
<!-- externer Link oder im static-Ordner -->
|
|
<img id="thumb" alt="{{.Title}}" class="aspect-video object-cover w-auto lg:h-44"
|
|
src="{{ .Params.image | relURL }}" />
|
|
{{- else -}}
|
|
<!-- Fallback-Bild -->
|
|
<img id="thumb" alt="{{.Title}}" class="aspect-video object-cover w-auto lg:h-44"
|
|
src='{{ "/img/default.jpg" | relURL }}'>
|
|
{{- end -}}
|
|
<div
|
|
class="border-r border-b border-l border-green-custom lg:border-l-0 lg:border-t lg:border-green-custom relative pl-4 p-6 justify-between leading-normal max-w-full w-full">
|
|
<div class="text-green-custom font-bold text-xl mb-2">{{ .Title }}</div>
|
|
<p class="text-white-custom text-base pb-5">{{ substr .Summary 0 130 | plainify | htmlUnescape }}...</p>
|
|
<p class="text-sm text-lightgray-custom items-center">
|
|
<time>{{ .Date.Format "02.01.2006" }}</time>
|
|
</p>
|
|
</div>
|
|
</div>
|