fix: Recherche seulement les images
This commit is contained in:
parent
5a8c467fac
commit
e35802b829
|
@ -5,7 +5,7 @@
|
||||||
{{ $truncateSize := cond $isBig 180 90}}
|
{{ $truncateSize := cond $isBig 180 90}}
|
||||||
<div class="post{{ if $isBig }} big{{ end }}">
|
<div class="post{{ if $isBig }} big{{ end }}">
|
||||||
<div class="picture">
|
<div class="picture">
|
||||||
{{ $image := .Resources.GetMatch (default "*" .Params.image) }}
|
{{ $image := .Resources.GetMatch (default "**.jpg" .Params.image) }}
|
||||||
<a href="{{ .RelPermalink }}">
|
<a href="{{ .RelPermalink }}">
|
||||||
{{ if $image }}
|
{{ if $image }}
|
||||||
{{ $resized := $image.Fill $pictureSize}}
|
{{ $resized := $image.Fill $pictureSize}}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
{{ $imageSizeBig := cond $isBig "1920x850 Top" "1920x450 Center" }}
|
{{ $imageSizeBig := cond $isBig "1920x850 Top" "1920x450 Center" }}
|
||||||
<header class="header{{ if $isBig }} home{{ end }}">
|
<header class="header{{ if $isBig }} home{{ end }}">
|
||||||
{{ $headless := .Site.GetPage "/" }}
|
{{ $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 }}
|
{{ if $image }}
|
||||||
{{ $resizedSmall := $image.Fill $imageSizeSmall }}
|
{{ $resizedSmall := $image.Fill $imageSizeSmall }}
|
||||||
{{ $resizedBig := $image.Fill $imageSizeBig }}
|
{{ $resizedBig := $image.Fill $imageSizeBig }}
|
||||||
|
|
Loading…
Reference in New Issue