Add subpages in menu.

This commit is contained in:
Mateusz Hromada 2018-09-11 10:21:57 +02:00
parent 95f580911c
commit 9abdee5f7c
3 changed files with 13 additions and 1 deletions

Binary file not shown.

View File

@ -6,7 +6,15 @@
{{ 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></li>
<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></li>
{{ end }}
</ul>
{{ end }}
</li>
{{ end }}
</ul>
{{ end }}

View File

@ -52,6 +52,10 @@ BODY {
padding-left: 40px;
}
.sidebar .subsub-item > a{
padding-left: 60px;
}
.sidebar .active > a {
color: #fff;
background-color: #428bca;