diff --git a/assets/js/product-selector.js b/assets/js/product-selector.js deleted file mode 100644 index e2ec6cc8..00000000 --- a/assets/js/product-selector.js +++ /dev/null @@ -1,22 +0,0 @@ -document.addEventListener('DOMContentLoaded', () => { - const productSelectorContent = document.getElementById('product-selector'); - const productSelectorButton = document.getElementById( - 'product-selector-button' - ); - - if (!productSelectorButton || !productSelectorContent) return; - - productSelectorButton.addEventListener('click', () => { - const isVisible = productSelectorContent.style.display === 'block'; - productSelectorContent.style.display = isVisible ? 'none' : 'block'; - }); - - window.addEventListener('click', (event) => { - const isClickInside = - productSelectorButton.contains(event.target) || - productSelectorContent.contains(event.target); - if (!isClickInside) { - productSelectorContent.style.display = 'none'; - } - }); -}); diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index c3477a9a..70205917 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -60,10 +60,6 @@ {{ end }} - -{{ $jsProductSelector := resources.Get "js/product-selector.js" | minify | fingerprint "sha512" }} - - {{ $jsSidebarV2 := resources.Get "js/sidebar-v2.js" | minify | fingerprint "sha512" }} diff --git a/layouts/partials/sidebar-list.html b/layouts/partials/sidebar-list.html index af02913a..c5d9a6bc 100644 --- a/layouts/partials/sidebar-list.html +++ b/layouts/partials/sidebar-list.html @@ -23,7 +23,7 @@ aria-controls="{{ $sectionID }}" > {{ $p.LinkTitle }} - + {{ partial "lucide" (dict "context" . "icon" "chevron-right") }} @@ -38,6 +38,7 @@ Overview @@ -62,12 +63,13 @@ {{ if $pageHasTOC }} @@ -86,6 +88,7 @@ id="{{ $linkID }}" class="sidebar__link {{ if $onPage }}sidebar__link--current{{ end }}" {{ if $onPage }}aria-current="page"{{ end }} + data-testid="sidebar__link" > {{ $p.LinkTitle }} {{ partial "commercial-feature.html" $p }} diff --git a/layouts/partials/sidebar-v2.html b/layouts/partials/sidebar-v2.html index c645e4ea..7b955306 100644 --- a/layouts/partials/sidebar-v2.html +++ b/layouts/partials/sidebar-v2.html @@ -51,7 +51,7 @@ {{ partial "lucide" (dict "context" . "icon" "chevron-right") }} -
+
{{ with index .Site.Data "product-selector" }} {{ $groups := . }} {{ range $group := $groups }} @@ -59,7 +59,7 @@

{{ $group.productGroup }}