]> juplo.de Git - website/commitdiff
WIP:layout:menu
authorKai Moritz <kai@juplo.de>
Sat, 13 Dec 2025 16:32:55 +0000 (17:32 +0100)
committerKai Moritz <kai@juplo.de>
Sun, 14 Dec 2025 16:26:41 +0000 (17:26 +0100)
layouts/_partials/menu.html

index 396c34043817e4d5f0d6f64284625cb581d28e02..ef2f61b9f6061bae2d749bf6a943f465b437833d 100644 (file)
@@ -20,7 +20,7 @@
   </h2>
   {{- with index site.Menus $menuID }}
   <ul id="submenu" class="s selected">
-    {{- partial "inline/menu/tree.html" (dict "pages" $page.Site.MainSections "current $page) }}
+    {{- partial "inline/menu/tree.html" (dict "pages" $page.Site.Sections "current" $page) }}
   </ul>
   {{- end }}
 
@@ -88,8 +88,9 @@
 
 <ul class="page-tree">
   {{- range $pages }}
-    {{- $isCurrent := $current.IsCurrent . -}}
-    {{- $isAncestor := $current.IsAncestor . -}}
+
+    {{- $isCurrent := eq . $current -}}
+    {{- $isAncestor := $current.IsDescendant . -}}
 
     <li
       class="
         ) }}
       {{- end }}
     </li>
+
   {{- end }}
 </ul>
 {{- end }}