Skip to content

Commit 6ebf064

Browse files
committed
fix: dark mode ui
1 parent 4b67150 commit 6ebf064

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

app.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,20 +96,20 @@
9696
<div
9797
v-for="node in products"
9898
:key="node.id"
99-
class="group cursor-pointer rounded-2xl border border-neutral-200 dark:border-neutral-800 p-2 transition-all hover:border-neutral-300 hover:dark:border-neutral-600">
100-
<div class="relative mb-3 pb-[133%]">
99+
class="group cursor-pointer rounded-2xl dark:bg-secondary-bg-d hover:dark:bg-[#222222] px-4 pt-4 pb-3 transition ease-[ease] duration-300 dark:border-[#222222] hover:dark:border-[#303030] border">
100+
<div class="relative mb-4 pb-[133%] dark:shadow-[0_8px_24px_rgba(0,0,0,.5)] rounded-lg overflow-hidden">
101101
<NuxtImg
102102
loading="lazy"
103103
:title="node.name"
104104
:alt="node.image.altText || node.name"
105105
:src="node.galleryImages.nodes[0].sourceUrl"
106-
class="absolute h-full w-full rounded-lg dark:bg-neutral-800 bg-neutral-200 object-cover" />
106+
class="absolute h-full w-full dark:bg-neutral-800 bg-neutral-200 object-cover" />
107107
<NuxtImg
108108
loading="lazy"
109109
:title="node.name"
110110
:alt="node.image.altText || node.name"
111111
:src="node.image.sourceUrl"
112-
class="absolute h-full w-full rounded-lg dark:bg-neutral-800 bg-neutral-200 object-cover transition-opacity duration-300 group-hover:opacity-0" />
112+
class="absolute h-full w-full dark:bg-neutral-800 bg-neutral-200 object-cover transition-opacity duration-300 group-hover:opacity-0" />
113113
</div>
114114
<div class="mb-1 grid grid-flow-col gap-6 px-2 text-sm font-semibold">
115115
<div class="flex min-w-0 flex-col justify-between gap-1">
@@ -126,7 +126,7 @@
126126
</div>
127127
</div>
128128
</div>
129-
<ProductSkeleton v-if="loading" />
129+
<ProductSkeleton />
130130
</div>
131131
<div v-if="!empty && !loading" class="p-6 text-center text-lg">
132132
<Icon name="majesticons:search-line" size="99"></Icon>

components/ProductSkeleton.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
2-
<div v-for="i in 9" :key="i" class="animate-pulse rounded-2xl border border-neutral-200 dark:border-neutral-800 p-2">
3-
<div class="relative mb-3 pb-[133%]">
4-
<div class="absolute h-full w-full rounded-lg bg-neutral-200 dark:bg-neutral-800"></div>
2+
<div v-for="i in 9" :key="i" class="animate-pulse rounded-2xl border dark:bg-secondary-bg-d px-4 pt-4 pb-3 dark:border-[#222222]">
3+
<div class="relative mb-4 pb-[133%] dark:shadow-[0_8px_24px_rgba(0,0,0,.5)] rounded-lg overflow-hidden">
4+
<div class="absolute h-full w-full bg-neutral-200 dark:bg-neutral-800"></div>
55
</div>
66
<div class="mb-1 grid grid-flow-row-dense grid-cols-3 px-2">
77
<div class="col-span-2 flex min-w-0 flex-col justify-between gap-2">

tailwind.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module.exports = {
55
colors: {
66
'secondary-text': '#737373',
77
'secondary-text-d': '#a8a8a8',
8+
'secondary-bg-d': '#181818',
89
},
910
fontFamily: {
1011
sans: ['Inter', 'Helvetica', 'Arial', 'sans-serif'],

0 commit comments

Comments
 (0)