diff --git a/src/components/docs/DocsNavbar.tsx b/src/components/docs/DocsNavbar.tsx
index 1ac5c627..7bbb2ea7 100644
--- a/src/components/docs/DocsNavbar.tsx
+++ b/src/components/docs/DocsNavbar.tsx
@@ -91,7 +91,7 @@ export default function DocsNavbar() {
setIsSearchOpen(!isSearchOpen);
setTimeout(() => searchInputRef.current?.focus(), 100);
}
-
+
// Navigation in search results
if (isSearchOpen && searchResults.length > 0) {
if (e.key === "ArrowDown") {
@@ -106,7 +106,7 @@ export default function DocsNavbar() {
}
}
};
-
+
document.addEventListener("keydown", handleKeyDown);
return () => document.removeEventListener("keydown", handleKeyDown);
}, [isSearchOpen, searchResults, selectedIndex]);
@@ -139,11 +139,11 @@ export default function DocsNavbar() {
try {
// Call the search API
const response = await fetch(`/api/search?q=${encodeURIComponent(query)}`);
-
+
if (!response.ok) {
throw new Error('Search failed');
}
-
+
const data = await response.json();
setSearchResults(data.results || []);
} catch (error) {
@@ -157,12 +157,12 @@ export default function DocsNavbar() {
const performSearch = (query: string) => {
setSearchQuery(query);
setSelectedIndex(0);
-
+
// Clear existing debounce timer
if (debounceRef.current) {
clearTimeout(debounceRef.current);
}
-
+
if (!query.trim()) {
setSearchResults([]);
setIsSearching(false);
@@ -180,45 +180,41 @@ export default function DocsNavbar() {
if (!mounted) {
return null;
}
-
- const buttonClasses = `text-sm transition-colors px-2 py-1.5 rounded-md flex items-center gap-1.5 ${
- isDark
+
+ const buttonClasses = `text-sm transition-colors px-2 py-1.5 rounded-md flex items-center gap-1.5 ${isDark
? 'text-gray-300 hover:text-gray-100 hover:bg-neutral-800'
: 'text-gray-700 hover:text-gray-900 hover:bg-gray-100'
- }`;
-
- const dropdownClasses = `absolute left-0 top-full mt-0.5 w-52 rounded-md shadow-xl py-1 border z-50 ${
- isDark
+ }`;
+
+ const dropdownClasses = `absolute left-0 top-full mt-0.5 w-52 rounded-md shadow-xl py-1 border z-50 ${isDark
? 'bg-neutral-900 border-neutral-800'
: 'bg-white border-gray-200'
- }`;
-
- const dropdownItemClasses = `flex items-center px-3 py-2 text-sm transition-colors ${
- isDark
+ }`;
+
+ const dropdownItemClasses = `flex items-center px-3 py-2 text-sm transition-colors ${isDark
? 'text-gray-300 hover:bg-neutral-800'
: 'text-gray-700 hover:bg-gray-100'
- }`;
+ }`;
return (
-
-
+ }`} />
+
-
-
-
-
-
+
+
+
+
+
@@ -262,9 +258,9 @@ export default function DocsNavbar() {
Marketplace
-
-
handleMouseEnter("contribute")}
onMouseLeave={handleMouseLeave}
>
@@ -304,96 +300,96 @@ export default function DocsNavbar() {
onMouseEnter={handleDropdownMouseEnter}
onMouseLeave={handleMouseLeave}
>
-
-
- Join In
-
-
-
- Contributor Handbook
-
-
+
+ Join In
+
+
+
+ Contributor Handbook
+
+
+
+
Quick Installation
-
+
-
-
-
- Products
+
+
+
Products
-
+
-
-
-
- Ladder
+
+
+
Ladder
-
-
-
-
- Security
-
+
+
+
+
+ Security
+
)}
-
handleMouseEnter("community")}
onMouseLeave={handleMouseLeave}
@@ -424,42 +420,42 @@ export default function DocsNavbar() {
onMouseEnter={handleDropdownMouseEnter}
onMouseLeave={handleMouseLeave}
>
-
-
-
-
- Get Involved
-
-
-
-
-
- Programs
-
-
-
-
-
- Contact Us
-
-
-
-
-
- Partners
-
+
+
+
+
+ Get Involved
+
+
+
+
+
+ Programs
+
+
+
+
+
+ Contact Us
+
+
+
+
+
+ Partners
+
)}
@@ -469,27 +465,25 @@ export default function DocsNavbar() {
{/* Version badge - simplified since docs are now local */}
{currentVersionLabel}
- handleMouseEnter("github")}
onMouseLeave={handleMouseLeave}
>
@@ -637,11 +621,10 @@ export default function DocsNavbar() {
setIsSearchOpen(true);
setTimeout(() => searchInputRef.current?.focus(), 100);
}}
- className={`md:hidden p-1.5 rounded-md transition-colors cursor-pointer ${
- isDark
+ className={`md:hidden p-1.5 rounded-md transition-colors cursor-pointer ${isDark
? 'text-gray-300 hover:text-gray-100 hover:bg-neutral-800'
: 'text-gray-300 hover:text-gray-100 hover:bg-gray-100'
- }`}
+ }`}
aria-label="Search documentation"
>
@@ -651,11 +634,10 @@ export default function DocsNavbar() {
{/* Sidebar toggle button for mobile - integrates with Nextra */}