27 lines
760 B
HTML
27 lines
760 B
HTML
{{ $relperm := .RelPermalink | replaceRE "^/~hedy/" "/" -}}
|
|
{{ $home := .Site.Title -}}
|
|
{{ if (ne $relperm "/") -}}
|
|
{{ if .Site.Params.navHomeUsePFPName -}}
|
|
{{ $home = partial "pfp-name.html" . -}}
|
|
{{ else -}}
|
|
{{ $home = .Site.Params.shortTitle -}}
|
|
{{ end -}}
|
|
{{ end -}}
|
|
<nav>
|
|
<strong><a rel="home" href="{{ .Site.BaseURL }}">{{ $home }}</a></strong>
|
|
<ul>
|
|
{{- $currentPage := . }}
|
|
{{- range .Site.Menus.main.ByWeight }}
|
|
{{- $url := printf "%s%s" $.Site.BaseURL .URL }}
|
|
|
|
{{ .Pre -}}
|
|
<li>
|
|
<a href="{{ $url }}"
|
|
{{- if hasPrefix $currentPage.Permalink $url }}class="selected"{{ end -}}
|
|
title="{{ .Title }}">{{- .Name -}}</a>
|
|
</li>
|
|
{{ .Post }}
|
|
{{- end }}
|
|
</ul>
|
|
</nav>
|