hugo-labs/layouts/partials/sidebar.html

96 lines
4.1 KiB
HTML
Raw Permalink Normal View History

2018-06-07 14:28:01 +02:00
{{ $currentPage := . }}
<ul>
2018-10-11 13:40:58 +02:00
<div class="sidebar-header">
2018-10-13 17:15:51 +02:00
{{ if eq .Lang "en"}}
<a class="sidebar-brand" href="/en/">
2018-11-13 17:23:30 +01:00
<img src="/page-resources/wmi_transparent.png">
2018-10-11 13:40:58 +02:00
{{ .Site.Title }}
2018-10-13 17:15:51 +02:00
</a>
{{else}}
<a class="sidebar-brand" href="/">
2018-11-13 17:23:30 +01:00
<img src="/page-resources/wmi_transparent.png">
2018-10-13 17:15:51 +02:00
{{ .Site.Title }}
</a>
{{end}}
2018-10-11 13:40:58 +02:00
<form class="sidebar-header sidebar-brand" action="https://szukaj.wmi.amu.edu.pl/search/" method="GET">
<div class="input-group">
2018-11-20 17:28:09 +01:00
<input type="text" class="form-control" name="q" placeholder="Search" aria-label="Search field, Search field, Text"/>
2018-10-11 13:40:58 +02:00
<span class="input-group-btn">
<button type="submit" class="btn btn-default">
<span class="glyphicon glyphicon-search"></span>
</button>
</span>
</div>
</form>
2019-01-24 13:24:51 +01:00
</div>
2018-10-11 13:40:58 +02:00
2019-01-24 13:24:51 +01:00
{{ if eq .Lang "en"}}
2018-11-05 18:43:17 +01:00
<div class="sidebar-menu">
2018-10-05 17:18:03 +02:00
{{ 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>
2019-01-24 13:24:51 +01:00
{{ 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 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 sort .Children ".Name" }}
<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>
{{ 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" }}
2018-10-05 17:18:03 +02:00
<li class="sub-item{{ if $currentPage.IsMenuCurrent "main" . }} active{{ end }}"><a href="{{ .URL }}">{{ .Name }}</a>
2018-06-07 14:28:01 +02:00
{{ if or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .) }}
2018-10-05 17:18:03 +02:00
<ul>
2019-01-24 13:24:51 +01:00
{{ range sort .Children ".KeyName" }}
2018-10-05 17:18:03 +02:00
<li class="subsub-item{{ if $currentPage.IsMenuCurrent "main" . }} active{{ end }}"><a href="{{ .URL }}">{{ .Name }}</a>
{{ if or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .) }}
<ul>
2019-01-24 13:24:51 +01:00
{{ range sort .Children ".KeyName" }}
<li class="subsubsub-item{{ if $currentPage.IsMenuCurrent "main" . }} active{{ end }}"><a href="{{ .URL }}">{{ .Name }}</a></li>
2018-10-05 17:18:03 +02:00
{{ end }}
</ul>
2018-06-07 14:28:01 +02:00
{{ end }}
2018-10-05 17:18:03 +02:00
</li>
{{ end }}
</ul>
2018-06-07 14:28:01 +02:00
{{ end }}
2018-10-05 17:18:03 +02:00
</li>
{{ end }}
</ul>
2018-06-07 14:28:01 +02:00
{{ end }}
2018-10-05 17:18:03 +02:00
</li>
2018-06-07 14:28:01 +02:00
{{ end }}
2018-10-05 17:18:03 +02:00
{{ end }}
2018-11-05 18:43:17 +01:00
</div>
2018-06-07 14:28:01 +02:00
</ul>
2019-01-24 13:24:51 +01:00
{{ end }}