diff --git a/assets/js/menu-tml.js b/assets/js/menu-tml.js index 17912a4a78e..cd0d1e9e9b6 100644 --- a/assets/js/menu-tml.js +++ b/assets/js/menu-tml.js @@ -75,7 +75,7 @@ function addToNode(dom, nodes) { {{- template "section-tree-nav-json" dict "sect" . -}} {{- end -}} {{- end -}} - ], "no_children": "{{.Params.no_children | html }}"}, + ]}, {{- else -}} {{- if not (or .Params.Hidden .Params.no_menu) -}} {"link": "{{.RelPermalink}}", "title": "{{.Params.Pre | html}}{{.LinkTitle | html }}{{.Params.Post | html}}"}, diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html index 4c51896bba5..7217165acaf 100644 --- a/layouts/partials/menu.html +++ b/layouts/partials/menu.html @@ -119,4 +119,11 @@

{{ if not $disableShortcutsTitle}}{{ T "Shortcuts-Title"}}{{ end }}

// Only show it once the menu is stable - this avoids unintended flickering menu.removeClass("hidden"); + // Scroll the highlighted element into view + $(window).on('load', function(){ + $("li.dd-item.active")[0].scrollIntoView(); + }) + + menu.find("li.dd-item.active")[0].scrollIntoView(); + diff --git a/static/css/theme-mine.css b/static/css/theme-mine.css index 0b10060b969..fa0bb661540 100644 --- a/static/css/theme-mine.css +++ b/static/css/theme-mine.css @@ -1145,3 +1145,15 @@ table tr th { .sidemenu.hidden { display: none; } + +li.dd-item { + width: max-content; +} + +body #sidebar ul li li { + overflow: hidden; +} + +ul.sidebar { + width: max-content; +} diff --git a/velociraptor-site-search b/velociraptor-site-search index 7ffcab8a8ff..417bf19d515 160000 --- a/velociraptor-site-search +++ b/velociraptor-site-search @@ -1 +1 @@ -Subproject commit 7ffcab8a8ff6a674a8ab31f22bad426982cdf875 +Subproject commit 417bf19d515e95a8df3f7a3412ee43f54b7bd10d