Création d'un partial pour les liens
This commit is contained in:
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user