fix: Recherche seulement les images

This commit is contained in:
Simon 2021-04-08 17:27:37 +02:00
parent 5a8c467fac
commit e35802b829
2 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@
{{ $truncateSize := cond $isBig 180 90}}
<div class="post{{ if $isBig }} big{{ end }}">
<div class="picture">
{{ $image := .Resources.GetMatch (default "*" .Params.image) }}
{{ $image := .Resources.GetMatch (default "**.jpg" .Params.image) }}
<a href="{{ .RelPermalink }}">
{{ if $image }}
{{ $resized := $image.Fill $pictureSize}}

View File

@ -3,7 +3,7 @@
{{ $imageSizeBig := cond $isBig "1920x850 Top" "1920x450 Center" }}
<header class="header{{ if $isBig }} home{{ end }}">
{{ $headless := .Site.GetPage "/" }}
{{ $image := default ($headless.Resources.GetMatch "*") (.Resources.GetMatch (default "*" .Params.image)) }}
{{ $image := default ($headless.Resources.GetMatch "**.jpg") (.Resources.GetMatch (default "**.jpg" .Params.image)) }}
{{ if $image }}
{{ $resizedSmall := $image.Fill $imageSizeSmall }}
{{ $resizedBig := $image.Fill $imageSizeBig }}