feat: Modification des images dans les actualités
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -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" }}
|
||||
<header class="header{{ if $isBig }} home{{ end }}">
|
||||
{{ $isActualites := eq .Page.CurrentSection.Path "/actualites" }}
|
||||
<header class="header{{ if $isBig }} home{{ end }}{{ if $isActualites }} actu{{ end }}">
|
||||
{{ 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 }}
|
||||
<nav class="nav" id="nav" data-open="false">
|
||||
<div class="container">
|
||||
<div class="logo">
|
||||
|
Reference in New Issue
Block a user