11<script setup lang="ts">
22import { SHOWCASED_FRAMEWORKS } from ' ~/utils/frameworks'
33
4+ const { settings } = useSettings ()
5+
46const { model : searchQuery, startSearch } = useGlobalSearch ()
57const isSearchFocused = shallowRef (false )
68
@@ -52,15 +54,20 @@ defineOgImageComponent('Default', {
5254 {{ $t('tagline') }}
5355 </p >
5456 <search
55- class =" w-full max-w-xl motion-safe:animate-slide-up motion-safe:animate-fill-both"
57+ class =" w-full max-w-2xl motion-safe:animate-slide-up motion-safe:animate-fill-both"
5658 style =" animation-delay : 0.2s "
5759 >
58- <form method =" GET" action =" /search" class =" relative" @submit.prevent.trim =" search" >
60+ <form
61+ method =" GET"
62+ action =" /search"
63+ class =" relative grid justify-items-center gap-4"
64+ @submit.prevent.trim =" search"
65+ >
5966 <label for =" home-search" class =" sr-only" >
6067 {{ $t('search.label') }}
6168 </label >
6269
63- <div class =" relative group" :class =" { 'is-focused': isSearchFocused }" >
70+ <div class =" relative group w-full max-w-xl " :class =" { 'is-focused': isSearchFocused }" >
6471 <div
6572 class =" absolute z-1 -inset-px pointer-events-none rounded-lg bg-gradient-to-r from-fg/0 to-accent/5 opacity-0 transition-opacity duration-500 blur-sm group-[.is-focused]:opacity-100"
6673 />
@@ -82,6 +89,7 @@ defineOgImageComponent('Default', {
8289 no-correct
8390 size =" large"
8491 class =" w-full ps-8 pe-24"
92+ aria-describedby =" instant-search-advisory"
8593 @focus =" isSearchFocused = true"
8694 @blur =" isSearchFocused = false"
8795 />
@@ -98,6 +106,35 @@ defineOgImageComponent('Default', {
98106 </ButtonBase >
99107 </div >
100108 </div >
109+
110+ <p
111+ v-if =" settings.instantSearch"
112+ id =" instant-search-advisory"
113+ class =" text-fg-muted text-sm text-pretty"
114+ >
115+ <span
116+ class =" i-lucide:zap align-middle text-fg relative top-[-0.1em] me-1"
117+ style =" font-size : 0.8em "
118+ aria-hidden =" true"
119+ ></span >
120+ <i18n-t keypath =" search.instant_search_advisory" >
121+ <template #label >
122+ <strong >{{ $t('search.instant_search') }}</strong >
123+ </template >
124+ <template #settings >
125+ <LinkBase to =" /settings" >{{ $t('settings.title') }}</LinkBase >
126+ </template >
127+ <template #shortcut >
128+ <kbd class =" text-xs"
129+ ><kbd class =" text-fg bg-bg-muted border border-border px-1 py-[2px] rounded-sm"
130+ >Ctrl</kbd
131+ >+<kbd class =" text-fg bg-bg-muted border border-border px-1 py-[2px] rounded-sm"
132+ >/</kbd
133+ ></kbd
134+ >
135+ </template >
136+ </i18n-t >
137+ </p >
101138 </form >
102139 </search >
103140
0 commit comments