alphabetical sorting
This commit is contained in:
parent
c1e5e89506
commit
e2664c70a6
@ -12,7 +12,6 @@
|
||||
{{ .Site.Title }}
|
||||
</a>
|
||||
{{end}}
|
||||
|
||||
<form class="sidebar-header sidebar-brand" action="https://szukaj.wmi.amu.edu.pl/search/" method="GET">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="q" placeholder="Search" aria-label="Search field, Search field, Text"/>
|
||||
@ -21,26 +20,27 @@
|
||||
<span class="glyphicon glyphicon-search"></span>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ if eq .Lang "en"}}
|
||||
<div class="sidebar-menu">
|
||||
{{ range .Site.Menus.main }}
|
||||
{{ if .HasChildren }}
|
||||
<li class="item {{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}"><a href="{{ .URL }}">{{ .Name }}</a>
|
||||
{{ if or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .) }}
|
||||
<ul>
|
||||
{{ range .Children }}
|
||||
{{ range sort .Children ".Name" }}
|
||||
<li class="sub-item{{ if $currentPage.IsMenuCurrent "main" . }} active{{ end }}"><a href="{{ .URL }}">{{ .Name }}</a>
|
||||
{{ if or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .) }}
|
||||
<ul>
|
||||
{{ range .Children }}
|
||||
{{ range sort .Children ".Name" }}
|
||||
<li class="subsub-item{{ if $currentPage.IsMenuCurrent "main" . }} active{{ end }}"><a href="{{ .URL }}">{{ .Name }}</a>
|
||||
{{ if or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .) }}
|
||||
<ul>
|
||||
{{ range .Children }}
|
||||
<li class="subsubsub-item{{ if $currentPage.IsMenuCurrent "main" . }} active{{ end }}"><a href="{{ .URL }}">{{ .Name }}</a></li>
|
||||
{{ range sort .Children ".Name" }}
|
||||
<li class="subsubsub-item{{ if $currentPage.IsMenuCurrent "main" . }} active{{ end }}"><a href="{{ .URL }}">{{ .Name }}</a></li>
|
||||
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
@ -57,3 +57,38 @@
|
||||
{{ end }}
|
||||
</div>
|
||||
</ul>
|
||||
{{ else }}
|
||||
<div class="sidebar-menu">
|
||||
{{ range .Site.Menus.main }}
|
||||
{{ if .HasChildren }}
|
||||
<li class="item {{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}"><a href="{{ .URL }}">{{ .Name }}</a>
|
||||
{{ if or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .) }}
|
||||
<ul>
|
||||
{{ range sort .Children ".KeyName" }}
|
||||
<li class="sub-item{{ if $currentPage.IsMenuCurrent "main" . }} active{{ end }}"><a href="{{ .URL }}">{{ .Name }}</a>
|
||||
{{ if or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .) }}
|
||||
<ul>
|
||||
{{ range sort .Children ".KeyName" }}
|
||||
<li class="subsub-item{{ if $currentPage.IsMenuCurrent "main" . }} active{{ end }}"><a href="{{ .URL }}">{{ .Name }}</a>
|
||||
{{ if or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .) }}
|
||||
<ul>
|
||||
{{ range sort .Children ".KeyName" }}
|
||||
<li class="subsubsub-item{{ if $currentPage.IsMenuCurrent "main" . }} active{{ end }}"><a href="{{ .URL }}">{{ .Name }}</a></li>
|
||||
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
Loading…
Reference in New Issue
Block a user