feat: Mise à jour du design
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing

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

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="{{ .Site.Language.Lang }}">
{{ 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" . }}
{{ block "all" . }}
<main role="main" id="content" class="container">

View File

@ -4,19 +4,5 @@
<div class="container md">
{{ .Content }}
</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>
{{ end }}

View File

@ -1,25 +1,48 @@
{{ define "main" }}
<div class="container">
<h1>Le fil <strong>des actualités</strong></h1>
<div class="infos">
<div class="news">
{{ $headless := .Site.GetPage "/actualites/" }}
{{ $lastnews := first 4 (sort $headless.Pages "Date" "desc") }}
{{ $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>
<p class="bandeau">
<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 !
</p>
<div class="containerGrid">
<div class="actus">
{{ $actualites := sort (.Site.GetPage "/actualites/").Pages "Date" "desc" }}
<div class="news viemunicipale">
<h1>Le fil <strong>des actualités</strong></h1>
{{ $lastnews := first 4 (where $actualites "Params.event" false) }}
{{ $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 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 class="opening">
{{ .Content }}
<div class="infos">
<div class="nouveautes">
{{ .Content }}
</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">