124124 </div >
125125
126126 <div class =" nav-buttons" >
127- <button class =" nav-button" @click =" openSearch" >
128- <svg
129- width =" 16"
130- height =" 16"
131- fill =" none"
132- stroke =" currentColor"
133- viewBox =" 0 0 24 24"
134- >
135- <path
136- stroke-linecap =" round"
137- stroke-linejoin =" round"
138- stroke-width =" 2"
139- d =" M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
140- />
141- </svg >
142- </button >
143127 <button class =" nav-button" @click =" showModal = true" >
144128 <svg
145129 width =" 16"
162146
163147 </div >
164148 </header >
149+ <!-- 弹框 -->
150+ <div class =" modal-overlay-home" v-if =" showModal" @click =" showModal = false" >
151+ <div class =" modal-home" @click.stop >
152+ <div class =" modal-theme-mb" >
153+ <span >外观切换</span >
154+ <!-- 移动端主题切换 -->
155+ <button @click =" toggleDark" class =" tool-switch" title =" Toggle theme" >
156+ <svg
157+ v-if =" !isDark"
158+ class =" normal-svg"
159+ width =" 16"
160+ height =" 16"
161+ fill =" none"
162+ stroke =" currentColor"
163+ viewBox =" 0 0 24 24"
164+ >
165+ <path
166+ stroke-linecap =" round"
167+ stroke-linejoin =" round"
168+ stroke-width =" 2"
169+ d =" M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"
170+ />
171+ </svg >
172+ <svg
173+ v-else
174+ class =" dark-svg"
175+ width =" 16"
176+ height =" 16"
177+ fill =" none"
178+ stroke =" currentColor"
179+ viewBox =" 0 0 24 24"
180+ >
181+ <path
182+ stroke-linecap =" round"
183+ stroke-linejoin =" round"
184+ stroke-width =" 2"
185+ d =" M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"
186+ />
187+ </svg >
188+ </button >
189+ </div >
190+ <div class =" modal-header" >
191+ <a
192+ href =" https://opentiny.design"
193+ title =" OpenTiny"
194+ class =" home-link home-link-mb"
195+ >
196+ <img
197+ :src =" 'images/logo.svg'"
198+ alt =" OpenTiny NEXT"
199+ class =" logo-icon"
200+ />
201+ <span >OpenTiny</span >
202+ <svg
203+ width =" 3"
204+ height =" 24"
205+ viewBox =" 0 -9 3 24"
206+ class =" h-5 rotate-0 overflow-visible text-white/90"
207+ >
208+ <path
209+ d =" M0 0L3 3L0 6"
210+ fill =" none"
211+ stroke =" currentColor"
212+ stroke-width =" 1.5"
213+ stroke-linecap =" round"
214+ ></path >
215+ </svg >
216+ </a >
217+ </div >
218+ </div >
219+ </div >
165220 </div >
166221</template >
167222
@@ -175,8 +230,6 @@ const { site, theme } = useData();
175230const route = useRoute ();
176231const router = useRouter ();
177232
178- const showModal = ref (false );
179-
180233// 获取主题配置
181234const themeConfig = computed (() => theme .value );
182235
@@ -219,6 +272,7 @@ const toggleDark = () => {
219272 }
220273};
221274
275+ const showModal = ref (false );
222276
223277
224278const prefix = site .value .base || ' /' ;
@@ -317,6 +371,10 @@ watch(
317371 background-color : var (--home-link-bg-color );
318372}
319373
374+ .home-link svg {
375+ width : 8px ;
376+ }
377+
320378.home-link-mb {
321379 width : 182px ;
322380 line-height : 38px ;
@@ -376,7 +434,45 @@ watch(
376434 border-radius : 50% ;
377435}
378436
379-
437+ .modal-overlay-home {
438+ position : fixed ;
439+ overflow-y : auto ;
440+ z-index : 99 ;
441+ inset : 0 ;
442+ backdrop-filter : blur (4px );
443+ background-color : rgba (255 , 255 , 255 , 0.05 ) !important ;
444+ }
445+ .dark .modal-overlay-home {
446+ background : rgba (0 , 0 , 0 , 0.8 );
447+ }
448+ .modal-overlay-home .modal-home {
449+ position : fixed ;
450+ top : 64px ;
451+ right : 0 ;
452+ width : 250px ;
453+
454+ border-radius : 12px ;
455+ padding : 20px ;
456+ background : #ffffff ;
457+ overflow : hidden ;
458+ z-index : 1000 ;
459+ animation : modal- appear 0.3s ease-out ;
460+ border : 1px solid rgba (0 , 0 , 0 , 0.2 );
461+ }
462+ .dark .modal-home {
463+ background : rgba (0 , 0 , 0 );
464+ border : 1px solid rgba (255 , 255 , 255 , 0.2 );
465+ }
466+ @keyframes modal- appear {
467+ from {
468+ opacity : 0 ;
469+ transform : translateY (-20px ) scale (0.9 );
470+ }
471+ to {
472+ opacity : 1 ;
473+ transform : translateY (0 ) scale (1 );
474+ }
475+ }
380476/* 响应式设计 */
381477@media (min-width : 980px ) {
382478 .header-top {
0 commit comments