hugo-labs/layouts/partials/sidebar.html
2018-10-11 13:40:58 +02:00

51 lines
2.0 KiB
HTML

{{ $currentPage := . }}
<ul>
<div class="sidebar-header">
<a class="sidebar-brand" href="/">
{{ .Site.Title }}
</a>
<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">
<span class="input-group-btn">
<button type="submit" class="btn btn-default">
<span class="glyphicon glyphicon-search"></span>
</button>
</span>
</form>
</div>
</div>
{{ 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 }}
<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 }}
<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>
{{ end }}
</ul>
{{ end }}
</li>
{{ end }}
</ul>
{{ end }}
</li>
{{ end }}
</ul>
{{ end }}
</li>
{{ end }}
{{ end }}
</ul>