cremeaux/layouts/home.html

50 lines
1.8 KiB
HTML
Raw Permalink Normal View History

2020-11-09 12:36:28 +01:00
{{ define "main" }}
<div class="container">
{{/* <p class="bandeau">
2023-06-08 21:12:15 +02:00
<a href="/actualites/2023/06/sauvons-la-pharmacie/">Signez</a> pour sauver la pharmacie de Crémeaux ! Nous avons besoin de votre soutien !
</p> */}}
2023-06-06 16:54:45 +02:00
<div class="containerGrid">
<div class="actus">
{{ $actualites := sort (.Site.GetPage "/actualites/").Pages "Date" "desc" }}
<div class="news viemunicipale">
2023-07-04 10:51:46 +02:00
<h1>Le fil des <strong>actualités</strong></h1>
2023-06-06 16:54:45 +02:00
{{ $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">
2023-07-04 10:51:46 +02:00
<h2 class="h1">Le fil des <strong>Évènements</strong></h2>
2023-06-06 16:54:45 +02:00
{{ $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>
2023-07-04 10:51:46 +02:00
<a href="/actualites/">Voir tous les évènements</a>
2023-06-06 16:54:45 +02:00
</p>
</div>
2020-11-09 12:36:28 +01:00
</div>
2023-06-06 16:54:45 +02:00
<div class="infos">
2024-01-29 15:30:06 +01:00
<div class="opening2">
2023-06-06 16:54:45 +02:00
{{ .Content }}
</div>
2020-11-09 12:36:28 +01:00
</div>
</div>
</div>
{{ end }}