fix menu
This commit is contained in:
parent
9668ac1c6b
commit
1e72fd7c0e
|
|
@ -52,6 +52,7 @@ googleAnalytics = "UA-12671637-1"
|
|||
[[menu.footer]]
|
||||
identifier = "left"
|
||||
weight = -200
|
||||
url = "#"
|
||||
|
||||
[[menu.footer]]
|
||||
identifier = "copyright"
|
||||
|
|
@ -63,6 +64,7 @@ googleAnalytics = "UA-12671637-1"
|
|||
[[menu.footer]]
|
||||
identifier = "mid"
|
||||
weight = -100
|
||||
url = "#"
|
||||
|
||||
[[menu.footer]]
|
||||
identifier = "kontakt"
|
||||
|
|
@ -75,6 +77,7 @@ googleAnalytics = "UA-12671637-1"
|
|||
[[menu.footer]]
|
||||
identifier = "right"
|
||||
weight = 0
|
||||
url = "#"
|
||||
|
||||
[[menu.footer]]
|
||||
identifier = "sitemap"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{{ .item }}
|
||||
{{- $currentPage := .ctx -}}
|
||||
{{- $link := .item -}}
|
||||
{{- if (eq .item.Identifier "copyright") -}}
|
||||
<li>
|
||||
<a href="{{ .item.URL }}">
|
||||
|
|
@ -7,9 +9,11 @@
|
|||
</li>
|
||||
{{- else -}}
|
||||
<li class="{{ if $currentPage.HasMenuCurrent .item.Menu .item }}active{{ end }}">
|
||||
{{- if ne .item.Title "" -}}
|
||||
<a href="{{ .item.URL }}">
|
||||
{{ .item.Pre }}
|
||||
<span>{{ .item.Name }}</span>
|
||||
{{ $link.Pre }}
|
||||
<span>{{ $link.Name }}</span>
|
||||
</a>
|
||||
{{- end -}}
|
||||
</li>
|
||||
{{- end -}}
|
||||
|
|
|
|||
|
|
@ -3,10 +3,14 @@
|
|||
<ul>
|
||||
{{- if .HasChildren -}}
|
||||
<li class="{{ if $currentPage.HasMenuCurrent .Menu . }}active{{ end }}">
|
||||
<a href="{{ .URL }}">
|
||||
{{ .Pre }}
|
||||
<span>{{ .Name }}</span>
|
||||
{{- $pre := .Pre -}}
|
||||
{{- $name := .Name -}}
|
||||
{{- with .URL }}
|
||||
<a href="{{ . }}">
|
||||
{{ $pre }}
|
||||
<span>{{ $name }}</span>
|
||||
</a>
|
||||
{{- end -}}
|
||||
<ul class="sub-menu">
|
||||
{{- range .Children -}}
|
||||
{{ partial "menu-item.html" (dict "item" . "ctx" $currentPage)}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue