1

Création d'un partial pour les liens

This commit is contained in:
2025-11-11 22:33:55 +01:00
parent 39dbd89397
commit 61e9537c62
5 changed files with 109 additions and 75 deletions

View File

@@ -1,7 +1,15 @@
{{ if .Params.links }}
{{- $page := . -}}
{{- with .Params.links }}
<nav id="page-links">
{{ range .Params.links }}
<a href="{{ .url }}" rel="noopener noreferer norelated">{{ .name }}</a>
{{ end }}
{{- range . }}
{{- $text := default .name .text -}}
{{- $title := default $text .title -}}
{{- partial "render/link.html" (dict
"Destination" .url
"Title" $title
"Text" $text
"Page" $page
) -}}
{{- end }}
</nav>
{{ end }}
{{- end }}