1

Refond la page d’accueil

This commit is contained in:
2025-09-20 01:38:54 +02:00
parent 03943034ca
commit 52ac7de5bc
6 changed files with 423 additions and 26 deletions

View File

@@ -0,0 +1,56 @@
{{- $logo := .Logo -}}
{{- $title := .Title -}}
{{- $description := .Description -}}
{{- $content := .Content -}}
{{- $total := .TotalArticles -}}
{{- $sectionsCount := .SectionsCount -}}
{{- $lastUpdated := .LastUpdated -}}
{{- $menu := .HeroMenu -}}
<section id="hero">
<header>
{{- with $logo -}}
<figure>
<img src="{{ .RelPermalink }}" alt="Logo de {{ $title }}" />
</figure>
{{- end -}}
<div>
<h1>{{ $title }}</h1>
{{- with $description }}
<div class="site-description">{{ . }}</div>
{{- end }}
</div>
</header>
{{- with $content }}
<div>
{{ . }}
</div>
{{- end }}
<ul>
<li>
<strong>Articles publiés</strong>
<span>{{ $total }}</span>
</li>
<li>
<strong>Thématiques</strong>
<span>{{ $sectionsCount }}</span>
</li>
<li>
<strong>Dernière mise à jour</strong>
<time datetime="{{ $lastUpdated | time.Format "2006-01-02" }}">{{ $lastUpdated | time.Format "02/01/2006" }}</time>
</li>
</ul>
<hr class="hr-mirror">
{{- with $menu }}
<nav>
{{- range . }}
<a href="{{ .URL }}" title="{{ .Title }}">{{ .Name }}</a>
{{- end }}
</nav>
{{- end }}
<hr />
</section>