Skip to content

Commit a725ea6

Browse files
iiio2ghostdevv
andauthored
chore: fix navigation to home (#798)
Co-authored-by: Willow (GHOST) <git@willow.sh>
1 parent ff63e33 commit a725ea6

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

app/components/AppHeader.vue

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -194,20 +194,17 @@ onKeyStroke(
194194
<div class="absolute inset-0 bg-bg/80 backdrop-blur-md" />
195195
<nav
196196
:aria-label="$t('nav.main_navigation')"
197-
class="relative container min-h-14 flex items-center gap-2 z-1"
198-
:class="isOnHomePage ? 'justify-end' : 'justify-between'"
197+
class="relative container min-h-14 flex items-center gap-2 z-1 justify-end"
199198
>
200-
<!-- Mobile: Logo + search button (expands search, doesn't navigate) -->
201-
<button
199+
<!-- Mobile: Logo (navigates home) -->
200+
<NuxtLink
202201
v-if="!isSearchExpanded && !isOnHomePage"
203-
type="button"
204-
class="sm:hidden flex-shrink-0 inline-flex items-center gap-2 font-mono text-lg font-medium text-fg hover:text-fg transition-colors duration-200 rounded"
205-
:aria-label="$t('nav.tap_to_search')"
206-
@click="expandMobileSearch"
202+
to="/"
203+
:aria-label="$t('header.home')"
204+
class="sm:hidden flex-shrink-0 font-mono text-lg font-medium text-fg hover:text-fg transition-colors duration-200 focus-ring"
207205
>
208206
<AppLogo class="w-8 h-8 rounded-lg" />
209-
<span class="i-carbon:search w-4 h-4 text-fg-subtle" aria-hidden="true" />
210-
</button>
207+
</NuxtLink>
211208

212209
<!-- Desktop: Logo (navigates home) -->
213210
<div v-if="showLogo" class="hidden sm:flex flex-shrink-0 items-center">
@@ -275,6 +272,17 @@ onKeyStroke(
275272
<HeaderAccountMenu />
276273
</div>
277274

275+
<!-- Mobile: Search button (expands search) -->
276+
<ButtonBase
277+
type="button"
278+
class="sm:hidden ms-auto"
279+
:aria-label="$t('nav.tap_to_search')"
280+
:aria-expanded="showMobileMenu"
281+
@click="expandMobileSearch"
282+
v-if="!isSearchExpanded && !isOnHomePage"
283+
classicon="i-carbon:search"
284+
/>
285+
278286
<!-- Mobile: Menu button (always visible, click to open menu) -->
279287
<ButtonBase
280288
type="button"

0 commit comments

Comments
 (0)