diff --git a/assets/styles/header.sass b/assets/styles/header.sass index 9a508d8..7da6fea 100644 --- a/assets/styles/header.sass +++ b/assets/styles/header.sass @@ -3,6 +3,21 @@ .header height: 40vh position: relative + z-index: 0 + + &.actu + background-color: var(--color-green) + height: calc(106px + 4rem + 2rem) + .nav + top: 2rem + + @media screen and (max-width: $size-md) + height: calc(86px + 4rem + 2rem) + + @media screen and (max-width: $size-sm) + height: calc(86px + 3rem + 2rem) + .nav + top: 1.5rem &.home height: 60vh @@ -73,6 +88,9 @@ margin: 0 height: $nav-height + li + padding-bottom: 0 + .viemunicipale, .viemunicipale a color: var(--color-green) font-weight: bold diff --git a/assets/styles/main.sass b/assets/styles/main.sass index 744fc1d..c8ff35a 100644 --- a/assets/styles/main.sass +++ b/assets/styles/main.sass @@ -93,7 +93,7 @@ li margin: 0 padding: 1rem @media screen and (max-width: $size-xs) - padding: 1rem .5rem + padding: .5rem .containerGrid display: flex @@ -162,6 +162,12 @@ li a color: white +.actu + #content + margin-top: -4rem + @media screen and (max-width: $size-md) + .container + + .nouveautes border: 1px solid black padding: 20px diff --git a/layouts/actualites/single.html b/layouts/actualites/single.html index 16afa65..749a337 100644 --- a/layouts/actualites/single.html +++ b/layouts/actualites/single.html @@ -1,5 +1,17 @@ {{ define "main" }}
+ {{ $headless := site.GetPage "/" }} + {{ $imageSize := "1208x459 Center webp" }} + {{ $image := default ($headless.Resources.GetMatch "**.jpg") (.Resources.GetMatch (default "**.jpg" .Params.image)) }} + {{ if $image }} + {{ $resized := $image.Fill $imageSize }} + {{ or .Params.image_ .Params.image_credit }} + {{ end }}

{{ .RenderString .Title }}

diff --git a/layouts/partials/header.html b/layouts/partials/header.html index f8d2a03..5748210 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,8 +1,10 @@ {{ $isBig := (default .IsHome .Params.big) }} -{{ $imageSizeSmall := cond $isBig "600x600 Top webp" "600x400 Center webp" }} -{{ $imageSizeBig := cond $isBig "1920x850 Top webp" "1920x450 Center webp" }} -
+{{ $isActualites := eq .Page.CurrentSection.Path "/actualites" }} +
+ {{ if not $isActualites }} {{ $headless := .Site.GetPage "/" }} + {{ $imageSizeSmall := cond $isBig "600x600 Top webp" "600x400 Center webp" }} + {{ $imageSizeBig := cond $isBig "1920x850 Top webp" "1920x450 Center webp" }} {{ $image := default ($headless.Resources.GetMatch "**.jpg") (.Resources.GetMatch (default "**.jpg" .Params.image)) }} {{ if $image }} {{ $resizedSmall := $image.Fill $imageSizeSmall }} @@ -16,6 +18,7 @@ title="{{ or .Params.image_ .Params.image_credit }}" /> {{ end }} + {{ end }}