cremeaux/layouts/home.html

50 lines
1.8 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{{ define "main" }}
<div class="container">
{{/* <p class="bandeau">
<a href="/actualites/2023/06/sauvons-la-pharmacie/">Signez</a> pour sauver la pharmacie de Crémeaux ! Nous avons besoin de votre soutien !
</p> */}}
<div class="containerGrid">
<div class="actus">
{{ $actualites := sort (.Site.GetPage "/actualites/").Pages "Date" "desc" }}
<div class="news viemunicipale">
<h1>Le fil des <strong>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">
<h2 class="h1">Le fil des <strong>Évènements</strong></h2>
{{ $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 tous les évènements</a>
</p>
</div>
</div>
<div class="infos">
<div class="nouveautes">
{{ .Content }}
</div>
</div>
</div>
</div>
{{ end }}