From f8a4e7e102b669abf572b2f5e697d7ac5a3f5722 Mon Sep 17 00:00:00 2001 From: Rafael-gc Date: Wed, 3 Jul 2024 13:34:04 -0300 Subject: [PATCH] Add accordions to docs menu --- site/layouts/partials/tree.html | 128 ++++++++++++++++++-------------- 1 file changed, 74 insertions(+), 54 deletions(-) diff --git a/site/layouts/partials/tree.html b/site/layouts/partials/tree.html index 6c00cd7c7..7da47501f 100644 --- a/site/layouts/partials/tree.html +++ b/site/layouts/partials/tree.html @@ -1,61 +1,81 @@
- - -
-{{ define "treemenu" }} - {{ $nextDepth := add .depth 1 }} - {{- $activeLink := $.root.Permalink }} - {{- $className := "" }} - {{- $deprecated := true }} - {{- with $.root.Site.GetPage .url }} - {{- if not .Params.deprecated }} - {{- $deprecated = false }} - {{- $branchLink := .Permalink }} - {{- if in $activeLink $branchLink }} - {{- $className = "tree-branch-active" -}} - {{ end }} - {{- if eq $activeLink $branchLink }} - {{- $className = "tree-active tree-branch-active" -}} - {{- end -}} -
  • - {{ .Title }} - {{- end }} - {{- end }} - {{- if not $deprecated }} - + + +{{ define "treemenu" }} + {{ $nextDepth := add .depth 1 }} + {{ $activeLink := $.root.Permalink }} + {{ $className := "" }} + {{ $deprecated := true }} + {{ with $.root.Site.GetPage .url }} + {{ if not .Params.deprecated }} + {{ $deprecated = false }} + {{ $branchLink := .Permalink }} + {{ if in $activeLink $branchLink }} + {{ $className = "tree-branch-active" }} + {{ end }} + {{ if eq $activeLink $branchLink }} + {{ $className = "tree-active tree-branch-active" }} + {{ end }} +
  • + {{ .Title }} + {{ if lt $.depth 3 }} + + {{ end }} +
  • + {{ end }} + {{ end }} +{{ end }} + \ No newline at end of file