Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions layouts/partials/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,25 @@ <h3>{{ if not $disableShortcutsTitle}}{{ T "Shortcuts-Title"}}{{ end }}</h3>
{{with .sect}}
{{if .IsSection}}
{{safeHTML .Params.head}}
<li data-nav-id="{{.RelPermalink}}" title="{{.Title}}" class="dd-item
{{if .IsAncestor $currentNode }}parent{{end}}
{{ $isParent := or (.IsAncestor $currentNode) (.Params.alwaysopen) }}
{{ $numberOfPages := (add (len .Pages) (len .Sections)) }}
<li data-nav-id="{{.URL}}" title="{{.Title}}" class="dd-item
{{if $isParent }}parent{{end}}
{{if eq .File.UniqueID $currentNode.File.UniqueID}}active{{end}}
{{if .Params.alwaysopen}}parent{{end}}
">
<a href="{{.RelPermalink}}">
{{safeHTML .Params.Pre}}{{or .Params.menuTitle .LinkTitle .Title}}{{safeHTML .Params.Post}}
{{ if and (ne $numberOfPages 0) (ne .Parent .Site.Home) }}
{{if $isParent }}
<i class="fas fa-caret-down"></i>
{{ else }}
<i class="fas fa-caret-right"></i>
{{ end }}
{{ end }}
{{ if $showvisitedlinks}}
<i class="fas fa-check read-icon"></i>
<i class="fas read-icon"></i>
{{ end }}
</a>
{{ $numberOfPages := (add (len .Pages) (len .Sections)) }}
{{ if ne $numberOfPages 0 }}
<ul>
{{ $currentNode.Scratch.Set "pages" .Pages }}
Expand Down
6 changes: 5 additions & 1 deletion static/css/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,11 @@ textarea:focus, input[type="email"]:focus, input[type="number"]:focus, input[typ
padding-bottom: 0;
}
#sidebar ul.topics li.parent ul, #sidebar ul.topics > li.active ul {
display: block;
display: none;
}

nav#sidebar ul.topics li.parent > ul {
display: block;
}
#sidebar ul.topics > li > a {
line-height: 2rem;
Expand Down