feat: Mise à jour du design
continuous-integration/drone/push Build is passing Details
continuous-integration/drone Build is passing Details

This commit is contained in:
Simon 2023-06-06 16:54:45 +02:00
parent f1ca4bde2c
commit 66c8256a1f
8 changed files with 140 additions and 67 deletions

View File

@ -12,14 +12,14 @@ body
line-height: 1.2 line-height: 1.2
font-family: 'League Spartan Variable' font-family: 'League Spartan Variable'
.viemunicipale h1, .viemunicipale a .viemunicipale #content, #content .viemunicipale
color: var(--color-green) --color-title: var(--color-green)
.cadredevie h1, .cadredevie a .cadredevie #content, #content .cadredevie
color: var(--color-blue) --color-title: var(--color-blue)
.economie h1, .economie a .economie #content, #content .economie
color: var(--color-orange) --color-title: var(--color-orange)
.associations h1, .associations a .associations #content, #content .associations
color: var(--color-purple) --color-title: var(--color-purple)
h1, h2, h3, h4, h5 h1, h2, h3, h4, h5
font-weight: 600 font-weight: 600
@ -55,6 +55,9 @@ h3
@media screen and (max-width: $size-sm) @media screen and (max-width: $size-sm)
font-size: 1rem font-size: 1rem
h1, h2, h3
color: var(--color-title)
h4 h4
font-size: 1rem font-size: 1rem
@media screen and (max-width: $size-sm) @media screen and (max-width: $size-sm)

View File

@ -15,7 +15,7 @@ $size-xl: 1280px
body body
--color-green: #04874B --color-green: #04874B
--color-blue: #586994 --color-blue: #586994
--color-orange: #F0833C --color-orange: #D14200
--color-purple: #4C1036 --color-purple: #4C1036
--color-grey: #E8E9ED --color-grey: #E8E9ED
--color-primary: black --color-primary: black
@ -92,7 +92,14 @@ body
@media screen and (max-width: $size-xs) @media screen and (max-width: $size-xs)
padding: 1rem .5rem padding: 1rem .5rem
.containerGrid
display: flex
.actus
width: 75%
.infos
width: 25%
padding: 7rem 0 0 1rem
display: block
.infos .infos
display: flex display: flex
@ -103,26 +110,26 @@ body
margin: 1rem margin: 1rem
.news .news
width: 65% width: 75%
display: flex display: flex
flex-direction: column flex-direction: column
@media screen and (max-width: $size-xl) @media screen and (max-width: $size-xl)
width: 65% width: 70%
@media screen and (max-width: $size-md) @media screen and (max-width: $size-md)
width: 100% width: 100%
margin: 0 margin: 0
.opening .opening
background: var(--color-orange) background: var(--color-orange)
width: 35% width: 25%
padding: 20px padding: 20px
color: black color: white
background-image: url(/icons/horloge.svg) background-image: url(/icons/horloge.svg)
background-repeat: no-repeat background-repeat: no-repeat
background-position: center -50px background-position: center -50px
background-size: 70% background-size: 70%
@media screen and (max-width: $size-xl) @media screen and (max-width: $size-xl)
width: 35% width: 30%
@media screen and (max-width: $size-md) @media screen and (max-width: $size-md)
width: 100% width: 100%
margin: 0 margin: 0
@ -143,7 +150,46 @@ body
margin-bottom: 0 margin-bottom: 0
a a
color: black color: white
.nouveautes
border: 1px solid black
padding: 20px
ul
padding-left: 1rem
.opening2
background: var(--color-orange)
margin-top: 2rem
margin-bottom: 2rem
padding: 20px
color: white
background-image: url(/icons/horloge.svg)
background-repeat: no-repeat
background-position: center -50px
background-size: 70%
@media screen and (max-width: $size-md)
margin: 0
background-position-x: 120%
background-size: 50%
h2
margin: 1rem 0
h3
margin: 1rem 0 .4rem
text-transform: inherit
p
margin-top: 0
p:last-child
margin-bottom: 0
a
color: white
.news .news
aside h2 aside h2
text-align: center text-align: center
@ -167,10 +213,6 @@ hr
a a
color: white color: white
#content .commissions
h3, h4
color: var(--color-green)
#content .conseilmunicipal #content .conseilmunicipal
display: flex display: flex
flex-wrap: wrap flex-wrap: wrap
@ -225,7 +267,7 @@ details > summary
justify-content: center justify-content: center
.card .card
flex: 0 0 calc(100% * 3 / 12) flex: 0 0 calc(100% * 3 / 12)
background-color: var(--color-purple) border: 1px solid var(--color-purple)
margin: 1rem margin: 1rem
padding: 1rem padding: 1rem
border-radius: 4px border-radius: 4px
@ -288,3 +330,13 @@ blockquote span
font-style: normal font-style: normal
font-weight: bold font-weight: bold
margin-top: 1em margin-top: 1em
.bandeau
margin: 0;
font-size: 1rem;
margin-top: -.5rem;
text-align: center;
font-weight: bold;
#content .bandeau, #content .bandeau a
color: #e00000;

View File

@ -13,20 +13,17 @@ disableKinds:
menu: menu:
main: main:
- parent: economie - parent: economie
name: Commerçants name: Artisan & Entreprise
url: /economie/#commerçants url: /economie/#artisan--entreprise
- parent: economie - parent: economie
name: Artisans name: Commerce
url: /economie/#artisans url: /economie/#commerce
- parent: economie - parent: economie
name: Entreprises name: Hébergement
url: /economie/#entreprises url: /economie/#hébergement
- parent: economie - parent: economie
name: Itinérants name: Marché & itinérant
url: /economie/#itinérants url: /economie/#marché--itinérant
- parent: economie
name: Gîte
url: /economie/#gites-de-crémeaux
params: params:
debug: false debug: false

View File

@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{ .Site.Language.Lang }}"> <html lang="{{ .Site.Language.Lang }}">
{{ partial "head.html" . }} {{ partial "head.html" . }}
<body class="{{ default .Params.menu.main.identifier .Params.menu.main.parent }}"> <body class="{{ default (default .Params.menu.main.identifier .Params.menu.main.parent) }}">
{{ partial "header.html" . }} {{ partial "header.html" . }}
{{ block "all" . }} {{ block "all" . }}
<main role="main" id="content" class="container"> <main role="main" id="content" class="container">

View File

@ -4,19 +4,5 @@
<div class="container md"> <div class="container md">
{{ .Content }} {{ .Content }}
</div> </div>
<div class="cards">
{{ block "list" . }}
{{ range sort .Pages "Permalink" }}
{{ if .Params.bureau }}
<a href="{{ .Permalink }}" class="card {{ if isset .Params "theme" }}{{ .Params.theme }}{{ end }}">
<h2>{{ .RenderString .Title }}</h2>
</a>
{{ end }}
{{ end }}
{{ end }}
</div>
<div class="container md">
<p>Vous ne retrouvez pas votre association ? Une modification, faute, ou un changement de contact, n'hésitez pas à nous écrire à l'adresse {{ "[com@cremeaux.fr](mailto:com@cremeaux.fr)" | markdownify }}.</p>
</div>
</div> </div>
{{ end }} {{ end }}

View File

@ -1,25 +1,48 @@
{{ define "main" }} {{ define "main" }}
<div class="container"> <div class="container">
<h1>Le fil <strong>des actualités</strong></h1> <p class="bandeau">
<div class="infos"> <a href="/actualites/2023/06/sauvons-la-pharmacie/">Signez la pétition</a> pour sauver la pharmacie de Crémeaux ! Nous avons besoin de votre soutiens !
<div class="news"> </p>
{{ $headless := .Site.GetPage "/actualites/" }} <div class="containerGrid">
{{ $lastnews := first 4 (sort $headless.Pages "Date" "desc") }} <div class="actus">
{{ $first := index (first 1 $lastnews) 0 }} {{ $actualites := sort (.Site.GetPage "/actualites/").Pages "Date" "desc" }}
{{ $others := after 1 $lastnews }} <div class="news viemunicipale">
{{ with $first }} <h1>Le fil <strong>des actualités</strong></h1>
{{ .Scratch.Set "big" true }} {{ $lastnews := first 4 (where $actualites "Params.event" false) }}
{{ partial "article-preview.html" . }} {{ $first := index (first 1 $lastnews) 0 }}
{{ end }} {{ $others := after 1 $lastnews }}
{{ range $others }} {{ with $first }}
{{ partial "article-preview.html" . }} {{ .Scratch.Set "big" true }}
{{ end }} {{ partial "article-preview.html" . }}
<p> {{ end }}
<a href="/actualites/">Voir toutes les actualités</a> {{ range $others }}
</p> {{ partial "article-preview.html" . }}
{{ end }}
<p>
<a href="/actualites/">Voir toutes les actualités</a>
</p>
</div>
<div class="news associations">
<h1>Les <strong>Évènements</strong> des associations</h1>
{{ $lastnews := first 4 (where $actualites "Params.event" true) }}
{{ $first := index (first 1 $lastnews) 0 }}
{{ $others := after 1 $lastnews }}
{{ with $first }}
{{ .Scratch.Set "big" true }}
{{ partial "article-preview.html" . }}
{{ end }}
{{ range $others }}
{{ partial "article-preview.html" . }}
{{ end }}
<p>
<a href="/actualites/">Voir toutes les actualités</a>
</p>
</div>
</div> </div>
<div class="opening"> <div class="infos">
{{ .Content }} <div class="nouveautes">
{{ .Content }}
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -0,0 +1,12 @@
</div><div class="cards">
{{ block "list" . }}
{{ range sort .Page.Pages "Permalink" }}
{{ if .Params.bureau }}
<a href="{{ .Permalink }}" class="card {{ if isset .Params "theme" }}{{ .Params.theme }}{{ end }}">
<h2>{{ .RenderString .Title }}</h2>
</a>
{{ end }}
{{ end }}
{{ end }}
</div>
<div class="container md">

View File

@ -38,7 +38,7 @@ const config = {
}, },
actualites: { actualites: {
readByQueryOption: { readByQueryOption: {
fields: ['title', 'date', 'image', 'image_credit', 'vignette', 'vignette_credit', 'description', 'auteur', 'draft', 'content'], fields: ['title', 'date', 'image', 'image_credit', 'vignette', 'vignette_credit', 'description', 'auteur', 'draft', 'content', 'event'],
filterDraft filterDraft
}, },
pathBuilder: (article) => { pathBuilder: (article) => {