From 568553394d0a8b34668a75c9839a0f1f426469b2 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Sun, 6 Oct 2019 21:10:46 +0200 Subject: theme: Switch to docsy theme --- themes/docsy/layouts/partials/sidebar-tree.html | 47 +++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 themes/docsy/layouts/partials/sidebar-tree.html (limited to 'themes/docsy/layouts/partials/sidebar-tree.html') diff --git a/themes/docsy/layouts/partials/sidebar-tree.html b/themes/docsy/layouts/partials/sidebar-tree.html new file mode 100644 index 0000000..a3eeb2a --- /dev/null +++ b/themes/docsy/layouts/partials/sidebar-tree.html @@ -0,0 +1,47 @@ +{{/* We cache this partial for bigger sites and set the active class client side. */}} +{{ $shouldDelayActive := ge (len .Site.Pages) 2000 }} +
+ {{ if not .Site.Params.ui.sidebar_search_disable }} + + {{ end }} + +
+{{ define "section-tree-nav-section" }} +{{ $s := .section }} +{{ $p := .page }} +{{ $shouldDelayActive := .delayActive }} +{{ $active := eq $p.CurrentSection $s }} +{{ $show := or (and (not $p.Site.Params.ui.sidebar_menu_compact) ($p.IsAncestor $s)) ($p.IsDescendant $s) }} +{{ $sid := $s.RelPermalink | anchorize }} + +{{ end }} -- cgit v1.2.3