feat: Modification des images dans les actualités
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
dc26afe2cb
commit
99722d5857
|
@ -3,6 +3,21 @@
|
||||||
.header
|
.header
|
||||||
height: 40vh
|
height: 40vh
|
||||||
position: relative
|
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
|
&.home
|
||||||
height: 60vh
|
height: 60vh
|
||||||
|
@ -73,6 +88,9 @@
|
||||||
margin: 0
|
margin: 0
|
||||||
height: $nav-height
|
height: $nav-height
|
||||||
|
|
||||||
|
li
|
||||||
|
padding-bottom: 0
|
||||||
|
|
||||||
.viemunicipale, .viemunicipale a
|
.viemunicipale, .viemunicipale a
|
||||||
color: var(--color-green)
|
color: var(--color-green)
|
||||||
font-weight: bold
|
font-weight: bold
|
||||||
|
|
|
@ -93,7 +93,7 @@ li
|
||||||
margin: 0
|
margin: 0
|
||||||
padding: 1rem
|
padding: 1rem
|
||||||
@media screen and (max-width: $size-xs)
|
@media screen and (max-width: $size-xs)
|
||||||
padding: 1rem .5rem
|
padding: .5rem
|
||||||
|
|
||||||
.containerGrid
|
.containerGrid
|
||||||
display: flex
|
display: flex
|
||||||
|
@ -162,6 +162,12 @@ li
|
||||||
a
|
a
|
||||||
color: white
|
color: white
|
||||||
|
|
||||||
|
.actu + #content
|
||||||
|
margin-top: -4rem
|
||||||
|
@media screen and (max-width: $size-md)
|
||||||
|
.container
|
||||||
|
|
||||||
|
|
||||||
.nouveautes
|
.nouveautes
|
||||||
border: 1px solid black
|
border: 1px solid black
|
||||||
padding: 20px
|
padding: 20px
|
||||||
|
|
|
@ -1,5 +1,17 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
{{ $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 }}
|
||||||
|
<img
|
||||||
|
class="hero no-print"
|
||||||
|
src="{{ $resized.RelPermalink }}"
|
||||||
|
alt="{{ or .Params.image_ .Params.image_credit }}"
|
||||||
|
title="{{ or .Params.image_ .Params.image_credit }}"
|
||||||
|
/>
|
||||||
|
{{ end }}
|
||||||
<h1>{{ .RenderString .Title }}</h1>
|
<h1>{{ .RenderString .Title }}</h1>
|
||||||
<div class="container news md">
|
<div class="container news md">
|
||||||
<small>
|
<small>
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
{{ $isBig := (default .IsHome .Params.big) }}
|
{{ $isBig := (default .IsHome .Params.big) }}
|
||||||
{{ $imageSizeSmall := cond $isBig "600x600 Top webp" "600x400 Center webp" }}
|
{{ $isActualites := eq .Page.CurrentSection.Path "/actualites" }}
|
||||||
{{ $imageSizeBig := cond $isBig "1920x850 Top webp" "1920x450 Center webp" }}
|
<header class="header{{ if $isBig }} home{{ end }}{{ if $isActualites }} actu{{ end }}">
|
||||||
<header class="header{{ if $isBig }} home{{ end }}">
|
{{ if not $isActualites }}
|
||||||
{{ $headless := .Site.GetPage "/" }}
|
{{ $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)) }}
|
{{ $image := default ($headless.Resources.GetMatch "**.jpg") (.Resources.GetMatch (default "**.jpg" .Params.image)) }}
|
||||||
{{ if $image }}
|
{{ if $image }}
|
||||||
{{ $resizedSmall := $image.Fill $imageSizeSmall }}
|
{{ $resizedSmall := $image.Fill $imageSizeSmall }}
|
||||||
|
@ -16,6 +18,7 @@
|
||||||
title="{{ or .Params.image_ .Params.image_credit }}"
|
title="{{ or .Params.image_ .Params.image_credit }}"
|
||||||
/>
|
/>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
<nav class="nav" id="nav" data-open="false">
|
<nav class="nav" id="nav" data-open="false">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="logo">
|
<div class="logo">
|
||||||
|
|
Loading…
Reference in New Issue