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
|
||||
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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,5 +1,17 @@
|
|||
{{ define "main" }}
|
||||
<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>
|
||||
<div class="container news md">
|
||||
<small>
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
{{ $isBig := (default .IsHome .Params.big) }}
|
||||
{{ $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" }}
|
||||
<header class="header{{ if $isBig }} home{{ end }}">
|
||||
{{ $headless := .Site.GetPage "/" }}
|
||||
{{ $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">
|
||||
|
|
Loading…
Reference in New Issue