summaryrefslogtreecommitdiff
path: root/themes/hugo-book/layouts/partials/docs/menu-filetree.html
diff options
context:
space:
mode:
authoraethrvmn <me@aethrvmn.gr>2025-09-20 22:27:35 +0000
committeraethrvmn <me@aethrvmn.gr>2025-09-20 22:27:35 +0000
commit9b5f3fad7068298265dbbc8a65077f7917a090a5 (patch)
tree0905b29eb7c03d6bc6e16dd1ebcd1ec9b6b83320 /themes/hugo-book/layouts/partials/docs/menu-filetree.html
parentsuper simple setup guide (diff)
updated hugo-book theme
Diffstat (limited to 'themes/hugo-book/layouts/partials/docs/menu-filetree.html')
-rw-r--r--themes/hugo-book/layouts/partials/docs/menu-filetree.html49
1 files changed, 0 insertions, 49 deletions
diff --git a/themes/hugo-book/layouts/partials/docs/menu-filetree.html b/themes/hugo-book/layouts/partials/docs/menu-filetree.html
deleted file mode 100644
index 1494588..0000000
--- a/themes/hugo-book/layouts/partials/docs/menu-filetree.html
+++ /dev/null
@@ -1,49 +0,0 @@
-{{ $bookSection := default "docs" .Site.Params.BookSection }}
-{{ if eq $bookSection "*" }}
- {{ $bookSection = "/" }}{{/* Backward compatibility */}}
-{{ end }}
-
-{{ with .Site.GetPage $bookSection }}
- {{ template "book-section-children" (dict "Section" . "CurrentPage" $) }}
-{{ end }}
-
-{{ define "book-section-children" }}{{/* (dict "Section" .Section "CurrentPage" .CurrentPage) */}}
- <ul>
- {{ range (where .Section.Pages "Params.bookHidden" "ne" true) }}
- {{ if .IsSection }}
- <li {{- if .Params.BookFlatSection }} class="book-section-flat" {{ end -}}>
- {{ template "book-page-link" (dict "Page" . "CurrentPage" $.CurrentPage) }}
- {{ template "book-section-children" (dict "Section" . "CurrentPage" $.CurrentPage) }}
- </li>
- {{ else if and .IsPage .Content }}
- <li>
- {{ template "book-page-link" (dict "Page" . "CurrentPage" $.CurrentPage) }}
- </li>
- {{ end }}
- {{ end }}
- </ul>
-{{ end }}
-
-{{ define "book-page-link" }}{{/* (dict "Page" .Page "CurrentPage" .CurrentPage) */}}
- {{ $current := eq .CurrentPage .Page }}
- {{ $ancestor := .Page.IsAncestor .CurrentPage }}
-
- {{ 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.Params.BookHref }}
- <a href="{{ .Page.Params.BookHref }}" class="{{ if $current }}active{{ end }}" target="_blank" rel="noopener">
- {{- partial "docs/title" .Page -}}
- </a>
- {{ else if .Page.Content }}
- <a href="{{ .Page.RelPermalink }}" class="{{ if $current }}active{{ end }}">
- {{- partial "docs/title" .Page -}}
- </a>
- {{ else }}
- <span>{{- partial "docs/title" .Page -}}</span>
- {{ end }}
-{{ end }}
Directive (EU) 2019/790, Article 4(3); all rights regarding Text and Data Mining (TDM) are reserved.