|
1 | 1 | <script setup> |
2 | 2 | const router = useRouter(); |
3 | 3 | const route = useRoute(); |
4 | | -const colorMode = useColorMode() |
5 | | -const { light, dark } = useAppConfig().site.logo |
6 | | -
|
7 | 4 | const searchQuery = ref((route.query.q || '').toString()); |
8 | 5 | const searchResults = ref([]); |
9 | 6 | const isLoading = ref(false); |
@@ -31,11 +28,6 @@ async function fetch() { |
31 | 28 |
|
32 | 29 | onMounted(fetch); |
33 | 30 |
|
34 | | -const logoUrl = computed(() => { |
35 | | - const logo = colorMode.value === 'dark' ? light : dark |
36 | | - return "/" + logo.replace(/^\/+/g, '') |
37 | | -}) |
38 | | -
|
39 | 31 | const throttledFetch = useDebounceFn(async () => { |
40 | 32 | await fetch(); |
41 | 33 | }, 300); |
@@ -64,18 +56,10 @@ onClickOutside(onClickOutsideRef, event => { |
64 | 56 | <div class="flex w-full flex-row items-center px-3 lg:px-5 h-[72px] lg:h-20 z-40 fixed bg-white/85 dark:bg-black/85 backdrop-blur-sm dark:backdrop-blur-lg"> |
65 | 57 | <div class="flex flex-row w-full flex-nowrap items-center gap-2"> |
66 | 58 | <NuxtLink |
67 | | - aria-label="Home" |
68 | | - class="flex items-center justify-center min-w-[52px] min-h-[52px] max-lg:min-w-12 max-lg:min-h-12 hover:bg-black/5 hover:dark:bg-white/15 max-lg:dark:bg-white/15 max-lg:bg-black/5 max-lg:hover:bg-black/10 max-lg:hover:dark:bg-white/20 rounded-2xl max-lg:rounded-full transition active:scale-95 group" |
69 | | - :to="localePath('/')"> |
70 | | - <div class="transform-gpu duration-200 ease-in-out group-hover:scale-[130%]"> |
71 | | - <img |
72 | | - class="rounded-lg max-lg:rounded-full bg-[#b31015] w-8 h-8" |
73 | | - :src="logoUrl" |
74 | | - alt="Logo" |
75 | | - loading="lazy" |
76 | | - title="logo" |
77 | | - /> |
78 | | - </div> |
| 59 | + aria-label="Home" |
| 60 | + class="flex items-center justify-center min-w-[52px] min-h-[52px] max-lg:min-w-12 max-lg:min-h-12 hover:bg-black/5 hover:dark:bg-white/15 max-lg:dark:bg-white/15 max-lg:bg-black/5 max-lg:hover:bg-black/10 max-lg:hover:dark:bg-white/20 rounded-2xl max-lg:rounded-full transition active:scale-95" |
| 61 | + :to="localePath('/')"> |
| 62 | + <img class="rounded-lg max-lg:rounded-full bg-[#b31015] w-8 h-8" src="/logo.svg" alt="Logo" loading="lazy" title="logo" /> |
79 | 63 | </NuxtLink> |
80 | 64 | <NuxtLink |
81 | 65 | aria-label="Categories" |
|
0 commit comments