Enhance theming and UI components: Introduce a new dark cyan theme in globals.css, update layout to utilize ThemeProvider for consistent theming, and refactor button and card components to use CSS variables for styling. Improve navigation and alert components with dynamic styles based on theme variables, ensuring a cohesive user experience across the application.
Some checks failed
Deploy with Docker Compose / deploy (push) Failing after 49s

This commit is contained in:
Julien Froidefond
2025-12-12 17:05:22 +01:00
parent 97db800c73
commit 5b96cf907e
20 changed files with 684 additions and 93 deletions

View File

@@ -0,0 +1,31 @@
"use client";
import { useTheme } from "@/contexts/ThemeContext";
export default function ThemeToggle() {
const { theme, toggleTheme } = useTheme();
return (
<button
onClick={toggleTheme}
className="px-3 py-1 border rounded text-xs uppercase tracking-widest transition"
style={{
borderColor: "var(--border)",
backgroundColor: "var(--card)",
color: "var(--foreground)",
}}
onMouseEnter={(e) => {
e.currentTarget.style.borderColor = "var(--accent-color)";
e.currentTarget.style.backgroundColor = "color-mix(in srgb, var(--accent-color) 10%, transparent)";
}}
onMouseLeave={(e) => {
e.currentTarget.style.borderColor = "var(--border)";
e.currentTarget.style.backgroundColor = "var(--card)";
}}
aria-label="Toggle theme"
>
{theme === "dark" ? "🌙" : "💎"} {theme === "dark" ? "Gold" : "Cyan"}
</button>
);
}