diff --git a/components/main/MainContent.vue b/components/main/MainContent.vue
index 9e5804e4..7695c254 100644
--- a/components/main/MainContent.vue
+++ b/components/main/MainContent.vue
@@ -4,6 +4,8 @@ defineProps<{
backOnSmallScreen?: boolean
/** Show the back button on both small and big screens */
back?: boolean
+ /** Do not applying overflow hidden to let use floatable components in title */
+ noOverflowHidden?: boolean
}>()
const route = useRoute()
@@ -19,7 +21,7 @@ const wideLayout = computed(() => route.meta.wideLayout ?? false)
class="native:lg:w-[calc(100vw-5rem)] native:xl:w-[calc(135%+(100vw-1200px)/2)]"
>
-
+
route.meta.wideLayout ?? false)
>
-
diff --git a/components/nav/NavBottom.vue b/components/nav/NavBottom.vue
index 90607dbc..82c99d33 100644
--- a/components/nav/NavBottom.vue
+++ b/components/nav/NavBottom.vue
@@ -14,7 +14,7 @@ const moreMenuVisible = ref(false)
-
+
@@ -28,9 +28,6 @@ const moreMenuVisible = ref(false)
-
-
-
diff --git a/components/nav/NavSide.vue b/components/nav/NavSide.vue
index d06c4674..4c8879dd 100644
--- a/components/nav/NavSide.vue
+++ b/components/nav/NavSide.vue
@@ -6,12 +6,12 @@ const { notifications } = useNotifications()
-
+
-
+
-
+
@@ -29,7 +29,7 @@ const { notifications } = useNotifications()
-
+
diff --git a/components/nav/NavTitle.vue b/components/nav/NavTitle.vue
index d13bd9ee..e0ac1aa7 100644
--- a/components/nav/NavTitle.vue
+++ b/components/nav/NavTitle.vue
@@ -20,7 +20,7 @@ router.afterEach(() => {
()
+const input = ref()
const router = useRouter()
const { focused } = useFocusWithin(el)
+defineExpose({
+ input,
+})
+
const results = computed(() => {
if (query.value.length === 0)
return []
@@ -68,6 +73,7 @@ const activate = () => {
bg-transparent
outline="focus:none"
pe-4
+ ml-1
:placeholder="isHydrated ? t('nav.search') : ''"
pb="1px"
placeholder-text-secondary
@@ -77,7 +83,7 @@ const activate = () => {
>
-
+
{{ t('search.search_desc') }}
diff --git a/composables/screen.ts b/composables/screen.ts
index 62406e56..fc2544be 100644
--- a/composables/screen.ts
+++ b/composables/screen.ts
@@ -3,3 +3,4 @@ import { breakpointsTailwind } from '@vueuse/core'
export const breakpoints = useBreakpoints(breakpointsTailwind)
export const isMediumOrLargeScreen = breakpoints.between('sm', 'xl')
+export const isExtraLargeScreen = breakpoints.smallerOrEqual('xl')
diff --git a/layouts/default.vue b/layouts/default.vue
index aca1daa1..061ea722 100644
--- a/layouts/default.vue
+++ b/layouts/default.vue
@@ -17,14 +17,14 @@ const isGrayscale = usePreferences('grayscaleMode')
-
+
-
+
@@ -59,7 +59,7 @@ const isGrayscale = usePreferences('grayscaleMode')
-
+
diff --git a/pages/[[server]]/explore.vue b/pages/[[server]]/explore.vue
index 7acde589..ae761cea 100644
--- a/pages/[[server]]/explore.vue
+++ b/pages/[[server]]/explore.vue
@@ -3,6 +3,17 @@ import type { CommonRouteTabOption } from '~/components/common/CommonRouteTabs.v
const { t } = useI18n()
+const search = $ref<{ input?: HTMLInputElement }>()
+const route = useRoute()
+watchEffect(() => {
+ if (isMediumOrLargeScreen && route.name === 'explore' && search?.input)
+ search?.input?.focus()
+})
+onActivated(() =>
+ search?.input?.focus(),
+)
+onDeactivated(() => search?.input?.blur())
+
const tabs = $computed(() => [
{
to: isHydrated.value ? `/${currentServer.value}/explore` : '/explore',
@@ -26,13 +37,16 @@ const tabs = $computed(() => [
-
-
+
+
{{ t('nav.explore') }}
+
+
+
diff --git a/pages/search.vue b/pages/search.vue
deleted file mode 100644
index 5803ba0d..00000000
--- a/pages/search.vue
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
-
-
- {{ $t('nav.search') }}
-
-
-
-
-
-
-
-