Skip to content

Commit e0a78b9

Browse files
committed
refactor: simplify gallery URL handling and update theme styles
- Removed the custom domain fallback logic from the gallery URL builder. - Consolidated the display URL logic to use the gallery URL builder directly. - Added theme-specific styles for accent and link colors in light and dark modes to enhance visual consistency. Signed-off-by: Innei <[email protected]>
1 parent 5bf7c06 commit e0a78b9

File tree

2 files changed

+18
-13
lines changed

2 files changed

+18
-13
lines changed

apps/landing/src/components/landing/GalleryShowcase.tsx

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -79,24 +79,15 @@ export const GalleryShowcase = () => {
7979
}
8080

8181
const buildGalleryUrl = (gallery: FeaturedGallery) => {
82-
if (typeof window === 'undefined') return '#'
8382
const { protocol } = window.location
8483
// Prefer custom domain, fallback to slug subdomain
85-
if (gallery.domain) {
86-
return `${protocol}//${gallery.domain}`
87-
}
84+
// if (gallery.domain) {
85+
// return `${protocol}//${gallery.domain}`
86+
// }
8887
const baseDomain = getBaseDomain()
8988
return `${protocol}//${gallery.slug}.${baseDomain}`
9089
}
9190

92-
const getDisplayUrl = (gallery: FeaturedGallery) => {
93-
// Prefer custom domain, fallback to slug subdomain
94-
if (gallery.domain) {
95-
return gallery.domain
96-
}
97-
return `${gallery.slug}.${getBaseDomain()}`
98-
}
99-
10091
const formatDate = (dateString: string) => {
10192
const date = new Date(dateString)
10293
const localeMap: Record<string, string> = {
@@ -194,7 +185,7 @@ export const GalleryShowcase = () => {
194185
{gallery.author.name}
195186
</p>
196187
<p className="truncate text-xs text-white/50">
197-
{getDisplayUrl(gallery)}
188+
{buildGalleryUrl(gallery)}
198189
</p>
199190
</div>
200191
</div>

apps/landing/src/styles/globals.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,3 +300,17 @@ html *::-webkit-scrollbar-corner {
300300
html body {
301301
@apply bg-black;
302302
}
303+
304+
@theme {
305+
/* Accent color: black in light mode, soft white in dark mode (not too bright) */
306+
--color-accent: #000000;
307+
308+
--color-link: #000;
309+
}
310+
311+
[data-theme='dark'] {
312+
/* Soft white accent in dark mode - not too bright to avoid eye strain */
313+
--color-accent: #c0c0c0;
314+
315+
--color-link: #fff;
316+
}

0 commit comments

Comments
 (0)