Skip to content

Commit ea86de4

Browse files
committed
setup vercel marketing site host
1 parent 18233d8 commit ea86de4

File tree

2 files changed

+44
-2
lines changed

2 files changed

+44
-2
lines changed

frontend/src/app/globals.css

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,29 @@
55
@tailwind utilities;
66

77
@layer base {
8+
/* Fallback for no-JS / first paint: respect system preference so no white flash on dark-mode browsers */
9+
@media (prefers-color-scheme: dark) {
10+
html:not([data-theme="light"]) {
11+
--background: 222 47% 6%;
12+
--foreground: 210 40% 96%;
13+
--card: 222 44% 9%;
14+
--card-foreground: 210 40% 96%;
15+
--popover: 222 44% 9%;
16+
--popover-foreground: 210 40% 96%;
17+
--primary: 228 76% 60%;
18+
--primary-foreground: 0 0% 100%;
19+
--secondary: 217.2 32.6% 17.5%;
20+
--secondary-foreground: 210 40% 98%;
21+
--muted: 217.2 32.6% 17.5%;
22+
--muted-foreground: 215 20.2% 65.1%;
23+
--accent: 228 76% 60%;
24+
--accent-foreground: 0 0% 100%;
25+
--border: 217.2 32.6% 17.5%;
26+
--input: 217.2 32.6% 17.5%;
27+
--ring: 228 76% 60%;
28+
}
29+
}
30+
831
:root {
932
--background: 0 0% 100%;
1033
--foreground: 222 47% 11%;

frontend/src/app/layout.tsx

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,27 @@ export default function RootLayout({
2727
children: React.ReactNode;
2828
}>) {
2929
return (
30-
<html lang="en" suppressHydrationWarning>
31-
<body>
30+
<html lang="en" suppressHydrationWarning className="bg-background">
31+
<head>
32+
<script
33+
dangerouslySetInnerHTML={{
34+
__html: `
35+
(function() {
36+
var theme = localStorage.getItem('theme');
37+
var systemDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
38+
if (theme === 'dark' || (theme !== 'light' && systemDark)) {
39+
document.documentElement.classList.add('dark');
40+
document.documentElement.setAttribute('data-theme', 'dark');
41+
} else {
42+
document.documentElement.classList.remove('dark');
43+
document.documentElement.setAttribute('data-theme', 'light');
44+
}
45+
})();
46+
`,
47+
}}
48+
/>
49+
</head>
50+
<body className="bg-background text-foreground min-h-screen">
3251
<a href="#main-content" className="skip-link">
3352
Skip to content
3453
</a>

0 commit comments

Comments
 (0)