This commit is contained in:
despiegk 2025-07-25 10:53:57 +02:00
parent 0d25dc4022
commit 53a9d76691
4 changed files with 4 additions and 4 deletions

View File

@ -15,7 +15,7 @@ function Navigation() {
}
return (
<nav className="fixed top-0 w-full bg-white dark:bg-slate-900/90 border-b border-slate-200 dark:border-slate-800 z-50">
<nav className="fixed top-0 w-full bg-white dark:bg-slate-900 border-b border-slate-200 dark:border-slate-800 z-50">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div className="flex justify-between items-center h-16">
<Link to="/" className="flex items-center space-x-2">

View File

@ -4,7 +4,7 @@ const ThemeToggle = () => {
const [theme, setTheme] = useState(localStorage.getItem('theme') || 'light');
useEffect(() => {
document.documentElement.setAttribute('data-theme', theme);
document.documentElement.classList.toggle('dark', theme === 'dark');
localStorage.setItem('theme', theme);
}, [theme]);

View File

@ -1,5 +1,5 @@
@custom-variant dark (&:is(.dark *));
/* @custom-variant dark (&:is(.dark *)); */
@theme inline {
--radius-sm: calc(var(--radius) - 4px);

View File

@ -2,7 +2,7 @@ import typography from '@tailwindcss/typography';
/** @type {import('tailwindcss').Config} */
export default {
darkMode: ['attribute', '[data-theme="dark"]'],
darkMode: 'class',
content: [
"./index.html",
"./src/**/*.{js,ts,jsx,tsx}",