Skip to content

Commit

Permalink
Removed nav from _full pages
Browse files Browse the repository at this point in the history
  • Loading branch information
x1y committed Oct 10, 2024
1 parent 77ae399 commit 07df3ab
Showing 1 changed file with 26 additions and 21 deletions.
47 changes: 26 additions & 21 deletions themes/pinetheme/layouts/partials/doc-nav.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ $pn := .File.BaseFileName }}
<!-- sidebar start -->
<nav class="sidebar-nav">
{{ $currentPage := . }}
Expand Down Expand Up @@ -27,32 +28,36 @@ <h3>Table of contents</h3>


{{ if and .HasChildren (or ($currentPage.IsMenuCurrent "docs" .) ($currentPage.HasMenuCurrent "docs" .)) }}

<ul>

<!-- Children -->
{{ range .Children }}

{{ if not .Page.Params.hidden }}
<li><a class='sidebar-nav-subitem {{if $currentPage.IsMenuCurrent "docs" .}}active{{end}}' href='{{.URL}}'>{{ .Title }}</a></li>
{{ end }}

{{ if .HasChildren }}
<ul>

<!-- Children-Children -->
{{ range .Children }}
{{ if not .Page.Params.hidden }}
<li class="doc_subitem"><a class='sidebar-nav-subsubitem {{if $currentPage.IsMenuCurrent "docs" .}}active{{end}}' href='{{.URL}}'>{{ .Title }}</a></li>
{{ end }}

<!-- Filter out _full pages -->
{{ if ne $pn "_full" }}

<ul>

<!-- Children -->
{{ range .Children }}

{{ if not .Page.Params.hidden }}
<li><a class='sidebar-nav-subitem {{if $currentPage.IsMenuCurrent "docs" .}}active{{end}}' href='{{.URL}}'>{{ .Title }}</a></li>
{{ end }}

{{ if .HasChildren }}
<ul>

</ul>
<!-- Children-Children -->
{{ range .Children }}
{{ if not .Page.Params.hidden }}
<li class="doc_subitem"><a class='sidebar-nav-subsubitem {{if $currentPage.IsMenuCurrent "docs" .}}active{{end}}' href='{{.URL}}'>{{ .Title }}</a></li>
{{ end }}
{{ end }}


</ul>
{{end}}
{{end}}
{{end}}

</ul>
</ul>
{{end}}
{{end}}
{{ end }}
{{ end }}
Expand Down

0 comments on commit 07df3ab

Please sign in to comment.