1
Files
2025/themes/2026/layouts/_partials/footer.html
2026-04-05 15:07:57 +02:00

72 lines
3.2 KiB
HTML

{{- $site := .Site -}}
{{- $logoPath := $site.Params.logo | default "logo-large.png" -}}
{{- $logo := resources.GetMatch $logoPath -}}
{{- $htmlValidationURL := printf "https://validator.w3.org/nu/?doc=%s" (.Permalink | urlquery) -}}
{{- $cssValidationURL := printf "https://jigsaw.w3.org/css-validator/validator?uri=%s&profile=css3svg&usermedium=all&warning=0&lang=fr" (.Permalink | urlquery) -}}
{{- $rssValidationURL := "" -}}
{{- with $site.Home.OutputFormats.Get "RSS" -}}
{{- $rssValidationURL = printf "https://validator.w3.org/feed/check.cgi?url=%s" (.Permalink | urlquery) -}}
{{- end -}}
<footer>
<section aria-label="Informations du site">
{{- with $logo -}}
<img src="{{ .RelPermalink }}" alt="" width="{{ .Width }}" height="{{ .Height }}">
{{- else -}}
<strong>{{ $site.Title }}</strong>
{{- end -}}
<p>{{ $site.Copyright | safeHTML }}</p>
<p>
Sauf mention contraire, l'intégralité du contenu de ce site est disponible sous licence
<a href="https://creativecommons.org/licenses/by-nc-nd/4.0/deed.fr" title="Consulter la licence Creative Commons CC BY-NC-ND 4.0">CC BY-NC-ND</a>.
</p>
</section>
<nav aria-label="Navigation principale">
<ul>
{{- range site.Menus.main -}}
<li>
<h2>
{{- if .PageRef -}}
<a href="{{ .PageRef }}" title="{{ .Title }}">{{ .Name }}</a>
{{- else -}}
<span>{{ .Name }}</span>
{{- end -}}
</h2>
{{- $children := .Children -}}
{{- if gt (len $children) 0 -}}
<div>
{{- range $index, $child := $children -}}
{{- if eq (mod $index 5) 0 -}}
<ul>
{{- end -}}
<li>
{{- if $child.PageRef -}}
<a href="{{ $child.PageRef }}" title="{{ $child.Title }}">{{ $child.Name }}</a>
{{- else -}}
<span title="{{ $child.Title }}">{{ $child.Name }}</span>
{{- end -}}
</li>
{{- if or (eq (mod (add $index 1) 5) 0) (eq (add $index 1) (len $children)) -}}
</ul>
{{- end -}}
{{- end -}}
</div>
{{- end -}}
</li>
{{- end -}}
</ul>
<ul class="footer-antipixels" aria-label="Validité des standards du site">
<li><a class="footer-antipixel footer-antipixel-html" href="{{ $htmlValidationURL }}" title="Valider cette page HTML5" target="_blank" rel="noreferrer noopener">HTML5 OK</a></li>
<li><a class="footer-antipixel footer-antipixel-css" href="{{ $cssValidationURL }}" title="Valider le CSS utilisé par cette page" target="_blank" rel="noreferrer noopener">CSS3 OK</a></li>
{{- if ne $rssValidationURL "" -}}
<li><a class="footer-antipixel footer-antipixel-rss" href="{{ $rssValidationURL }}" title="Valider le flux RSS principal" target="_blank" rel="noreferrer noopener">RSS OK</a></li>
{{- end -}}
</ul>
{{- with .GitInfo -}}
<p>
Dernière modification de cette page :
<time datetime="{{ .CommitDate.Format "2006-01-02T15:04:05Z07:00" }}">{{ printf "%s à %s" (.CommitDate | time.Format ":date_long") (.CommitDate | time.Format "15:04") }}</time>
</p>
{{- end -}}
</nav>
</footer>