diff options
author | Alex Shpak <alex-shpak@users.noreply.github.com> | 2022-04-26 13:14:22 +0200 |
---|---|---|
committer | Alex Shpak <alex-shpak@users.noreply.github.com> | 2022-04-26 13:14:22 +0200 |
commit | 1852b16d938e978409b9066b5fa2bf27b1a0f496 (patch) | |
tree | 9941031b9d837f2bf7d7ecec6679e30bbfab3076 /layouts/partials/docs/menu-filetree.html | |
parent | c2014a08a534ef6b55505e719a68ccce88cb3cdb (diff) |
#440L Adjust bookHref, check .Content again, add redirect
Diffstat (limited to 'layouts/partials/docs/menu-filetree.html')
-rw-r--r-- | layouts/partials/docs/menu-filetree.html | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/layouts/partials/docs/menu-filetree.html b/layouts/partials/docs/menu-filetree.html index 8384f0f..edb150c 100644 --- a/layouts/partials/docs/menu-filetree.html +++ b/layouts/partials/docs/menu-filetree.html @@ -15,7 +15,7 @@ {{ template "book-page-link" (dict "Page" . "CurrentPage" $.CurrentPage) }} {{ template "book-section-children" (dict "Section" . "CurrentPage" $.CurrentPage) }} </li> - {{ else if and .IsPage }} + {{ else if and .IsPage .Content }} <li> {{ template "book-page-link" (dict "Page" . "CurrentPage" $.CurrentPage) }} </li> @@ -28,19 +28,19 @@ {{ $current := eq .CurrentPage .Page }} {{ $ancestor := .Page.IsAncestor .CurrentPage }} - {{ if .Page.Params.bookCollapseSection }} + {{ if .Page.Params.BookCollapseSection }} <input type="checkbox" id="section-{{ md5 .Page }}" class="toggle" {{ if or $current $ancestor }}checked{{ end }} /> <label for="section-{{ md5 .Page }}" class="flex justify-between"> <a {{ if .Page.Content }}href="{{ .Page.RelPermalink }}"{{ else }}role="button"{{ end }} class="{{ if $current }}active{{ end }}"> {{- partial "docs/title" .Page -}} </a> </label> - {{ else if .Page.Content }} - <a href="{{ .Page.RelPermalink }}" class="{{ if $current }} active{{ end }}"> + {{ else if .Page.Params.BookHref }} + <a href="{{ .Page.Params.BookHref }}" class="{{ if $current }}active{{ end }}" target="_blank" rel="noopener"> {{- partial "docs/title" .Page -}} </a> - {{ else if .Page.Params.bookHref }} - <a href="{{ .Page.Params.bookHref }}" role="button" class="{{ if $current }} active{{ end }}" target="_blank" rel="noopener"> + {{ else if .Page.Content }} + <a href="{{ .Page.RelPermalink }}" class="{{ if $current }}active{{ end }}"> {{- partial "docs/title" .Page -}} </a> {{ else }} |