refactor: update CSS variables and styles for Nord theme, add custom scrollbar and smooth scrolling

This commit is contained in:
2025-06-26 16:56:04 +02:00
parent 73677afdbe
commit d8c6bd6586
3 changed files with 1387 additions and 82 deletions
+65 -72
View File
@@ -2,91 +2,84 @@
@tailwind components; @tailwind components;
@tailwind utilities; @tailwind utilities;
/* Nord theme custom styles */
:root { :root {
--background: #ffffff; --nord-bg: #2E3440;
--foreground: #171717; --nord-bg-light: #3B4252;
--nord-bg-lighter: #434C5E;
--nord-text: #D8DEE9;
--nord-text-muted: rgba(216, 222, 233, 0.6);
--nord-accent: #88C0D0;
--nord-blue: #81A1C1;
--nord-dark-blue: #5E81AC;
} }
@media (prefers-color-scheme: dark) { /* Custom scrollbar for Nord theme */
:root { ::-webkit-scrollbar {
--background: #0a0a0a; width: 8px;
--foreground: #ededed;
}
} }
body { ::-webkit-scrollbar-track {
color: var(--foreground); background: var(--nord-bg);
background: var(--background);
font-family: Arial, Helvetica, sans-serif;
} }
@layer utilities { ::-webkit-scrollbar-thumb {
.text-balance { background: var(--nord-bg-lighter);
text-wrap: balance; border-radius: 4px;
}
} }
@layer base { ::-webkit-scrollbar-thumb:hover {
:root { background: var(--nord-dark-blue);
--background: 0 0% 100%;
--foreground: 0 0% 3.9%;
--card: 0 0% 100%;
--card-foreground: 0 0% 3.9%;
--popover: 0 0% 100%;
--popover-foreground: 0 0% 3.9%;
--primary: 0 0% 9%;
--primary-foreground: 0 0% 98%;
--secondary: 0 0% 96.1%;
--secondary-foreground: 0 0% 9%;
--muted: 0 0% 96.1%;
--muted-foreground: 0 0% 45.1%;
--accent: 0 0% 96.1%;
--accent-foreground: 0 0% 9%;
--destructive: 0 84.2% 60.2%;
--destructive-foreground: 0 0% 98%;
--border: 0 0% 89.8%;
--input: 0 0% 89.8%;
--ring: 0 0% 3.9%;
--chart-1: 12 76% 61%;
--chart-2: 173 58% 39%;
--chart-3: 197 37% 24%;
--chart-4: 43 74% 66%;
--chart-5: 27 87% 67%;
--radius: 0.5rem;
}
.dark {
--background: 0 0% 3.9%;
--foreground: 0 0% 98%;
--card: 0 0% 3.9%;
--card-foreground: 0 0% 98%;
--popover: 0 0% 3.9%;
--popover-foreground: 0 0% 98%;
--primary: 0 0% 98%;
--primary-foreground: 0 0% 9%;
--secondary: 0 0% 14.9%;
--secondary-foreground: 0 0% 98%;
--muted: 0 0% 14.9%;
--muted-foreground: 0 0% 63.9%;
--accent: 0 0% 14.9%;
--accent-foreground: 0 0% 98%;
--destructive: 0 62.8% 30.6%;
--destructive-foreground: 0 0% 98%;
--border: 0 0% 14.9%;
--input: 0 0% 14.9%;
--ring: 0 0% 83.1%;
--chart-1: 220 70% 50%;
--chart-2: 160 60% 45%;
--chart-3: 30 80% 55%;
--chart-4: 280 65% 60%;
--chart-5: 340 75% 55%;
}
} }
@layer base { /* Smooth scrolling */
html {
scroll-behavior: smooth;
}
/* Reset default styles */
* { * {
@apply border-border; margin: 0;
padding: 0;
box-sizing: border-box;
} }
body { body {
@apply bg-background text-foreground; background-color: var(--nord-bg);
color: var(--nord-text);
font-family: system-ui, -apple-system, sans-serif;
line-height: 1.6;
}
/* Custom animations */
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
} }
} }
.animate-fadeInUp {
animation: fadeInUp 0.6s ease-out;
}
/* Utility classes for Nord theme */
.nord-bg {
background-color: var(--nord-bg);
}
.nord-bg-light {
background-color: var(--nord-bg-light);
}
.nord-text {
color: var(--nord-text);
}
.nord-accent {
color: var(--nord-accent);
}
+1292
View File
File diff suppressed because it is too large Load Diff
+27 -7
View File
@@ -1,6 +1,10 @@
{ {
"compilerOptions": { "compilerOptions": {
"lib": ["dom", "dom.iterable", "es6"], "lib": [
"dom",
"dom.iterable",
"es6"
],
"allowJs": true, "allowJs": true,
"skipLibCheck": true, "skipLibCheck": true,
"strict": true, "strict": true,
@@ -19,12 +23,28 @@
], ],
"baseUrl": ".", "baseUrl": ".",
"paths": { "paths": {
"@/*": ["./src/*"], "@/*": [
"@/components/*": ["./src/components/*"], "./src/*"
"@/lib/*": ["./src/lib/*"], ],
"@/types/*": ["./src/types/*"] "@/components/*": [
"./src/components/*"
],
"@/lib/*": [
"./src/lib/*"
],
"@/types/*": [
"./src/types/*"
]
} }
}, },
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], "include": [
"exclude": ["node_modules"] "next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
"out/types/**/*.ts"
],
"exclude": [
"node_modules"
]
} }