Skip to content

Commit 34e256d

Browse files
committed
feat: Add search functionality to WebsiteNavbar for documentation pages
1 parent 42e77a4 commit 34e256d

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed
0 Bytes
Binary file not shown.

docs-v3/components/website/WebsiteNavbar.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
</div>
3030

3131
<div class="flex items-center space-x-4">
32+
<!-- Mobile search icon (docs only) -->
33+
<UContentSearchButton v-if="isDocsPage" class="lg:hidden" :collapsed="true" />
34+
35+
<!-- Desktop search with label (docs only) -->
3236
<div v-if="isDocsPage" class="hidden lg:block">
3337
<UContentSearchButton label="Search..." :collapsed="false" />
3438
</div>
@@ -38,6 +42,10 @@
3842
target="_blank"
3943
rel="noopener noreferrer"
4044
class="text-gray-600 hover:text-gray-900 dark:text-gray-300 dark:hover:text-white rounded-md p-2"
45+
:class="{
46+
'hidden lg:block': isDocsPage,
47+
'block': !isDocsPage
48+
}"
4149
aria-label="GitHub Repository"
4250
>
4351
<svg class="h-5 w-5" fill="currentColor" viewBox="0 0 24 24">

docs-v3/layouts/docs.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
<main class="flex-1 min-w-0">
1515
<div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
16-
<article class="prose prose-gray dark:prose-invert prose-lg max-w-none">
16+
<article class="prose prose-gray dark:prose-invert prose-lg max-w-full overflow-x-hidden">
1717
<slot />
1818
</article>
1919

0 commit comments

Comments
 (0)