mirror of
https://github.com/naoufalzerai/zerai.xyz.git
synced 2025-11-09 15:05:55 +00:00
21 lines
875 B
HTML
21 lines
875 B
HTML
{{- $nav := . -}}
|
|
{{- if or $nav.showCategories $nav.showTags $nav.custom -}}
|
|
<div class="nav wrap"><nav class="nav">
|
|
{{- range $nav.custom -}}
|
|
{{- $url := replace .url "#" "%23" -}}
|
|
{{- $url = replace $url "." "%2e" -}}
|
|
{{- $url = $url | safeURL -}}
|
|
{{- if strings.HasPrefix $url "/" -}}{{- $url = $url | relLangURL -}}{{- end -}}
|
|
<a class="nav item" href="{{- $url -}}"
|
|
{{- if strings.HasPrefix $url "http" -}}target="_blank" rel="noopener noreferrer"
|
|
{{- end -}}>{{- .title -}}</a>
|
|
{{- end -}}
|
|
{{- if $nav.showCategories -}}
|
|
<a class="nav item" href="{{- `/categories/` | relLangURL -}}">{{- T "Categories" -}}</a>
|
|
{{- end -}}
|
|
{{- if $nav.showTags -}}
|
|
<a class="nav item" href="{{- `/tags/` | relLangURL -}}">{{- T "Tags" -}}</a>
|
|
{{- end -}}
|
|
</nav></div>
|
|
{{- end -}}
|