Skip to content

Commit be7afe4

Browse files
committed
fix: Remove theme-specific logos and update logo usage
Deleted logo-dark.svg and logo-light.svg, and updated the app to use a single logo.svg. Removed theme-based logo logic from config and header component. Also refactored product queries and pages to use 'allPaColor' instead of 'allPaStyle'.
1 parent 752c04f commit be7afe4

File tree

6 files changed

+13
-43
lines changed

6 files changed

+13
-43
lines changed

app/app.config.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
// app/app.config.ts
22
export default defineAppConfig({
3-
site: {
4-
name: 'NuxtCommerce',
5-
description: 'NuxtCommerce is a dynamic e-commerce solution developed with Nuxt 3 and GraphQL, tailored for WooCommerce.',
6-
logo: {
7-
light: 'logo-light.svg',
8-
dark: 'logo-dark.svg',
9-
}
10-
},
3+
site: {
4+
name: 'NuxtCommerce',
5+
description: 'NuxtCommerce is a dynamic e-commerce solution developed with Nuxt 3 and GraphQL, tailored for WooCommerce.',
6+
},
117
ui: {
128
primary: 'red',
139
gray: 'neutral',

app/components/AppHeader.vue

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
<script setup>
22
const router = useRouter();
33
const route = useRoute();
4-
const colorMode = useColorMode()
5-
const { light, dark } = useAppConfig().site.logo
6-
74
const searchQuery = ref((route.query.q || '').toString());
85
const searchResults = ref([]);
96
const isLoading = ref(false);
@@ -31,11 +28,6 @@ async function fetch() {
3128
3229
onMounted(fetch);
3330
34-
const logoUrl = computed(() => {
35-
const logo = colorMode.value === 'dark' ? light : dark
36-
return "/" + logo.replace(/^\/+/g, '')
37-
})
38-
3931
const throttledFetch = useDebounceFn(async () => {
4032
await fetch();
4133
}, 300);
@@ -64,18 +56,10 @@ onClickOutside(onClickOutsideRef, event => {
6456
<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">
6557
<div class="flex flex-row w-full flex-nowrap items-center gap-2">
6658
<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" />
7963
</NuxtLink>
8064
<NuxtLink
8165
aria-label="Categories"

app/gql/queries/getProduct.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const getProductQuery = gql`
1919
sourceUrl(size: LARGE)
2020
}
2121
}
22-
allPaStyle {
22+
allPaColor {
2323
nodes {
2424
name
2525
}
@@ -37,7 +37,7 @@ export const getProductQuery = gql`
3737
image {
3838
sourceUrl(size: WOOCOMMERCE_THUMBNAIL)
3939
}
40-
allPaStyle {
40+
allPaColor {
4141
nodes {
4242
name
4343
}

app/pages/product/[id].vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,12 @@ const { handleAddToCart, addToCartButtonStatus } = useCart();
178178
:to="localePath(`/product/${vars.slug}-${product.sku.split('-')[0]}`)"
179179
:class="[
180180
'flex w-12 rounded-lg border-2 select-varitaion transition-all duration-200 bg-neutral-200 dark:bg-neutral-800',
181-
vars.allPaStyle.nodes[0].name === product.allPaStyle.nodes[0].name ? 'selected-varitaion' : 'border-[#9b9b9b] dark:border-[#8c8c8c]',
181+
vars.allPaColor.nodes[0].name === product.allPaColor.nodes[0].name ? 'selected-varitaion' : 'border-[#9b9b9b] dark:border-[#8c8c8c]',
182182
]">
183183
<NuxtImg
184-
:alt="vars.allPaStyle.nodes[0].name"
184+
:alt="vars.allPaColor.nodes[0].name"
185185
:src="vars.image.sourceUrl"
186-
:title="vars.allPaStyle.nodes[0].name"
186+
:title="vars.allPaColor.nodes[0].name"
187187
class="rounded-md border-2 border-white dark:border-black" />
188188
</NuxtLink>
189189
</div>

public/logo-dark.svg

Lines changed: 0 additions & 5 deletions
This file was deleted.

public/logo-light.svg

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)