From c9bfd35ef203cfca3ae9be10784628f04f26f103 Mon Sep 17 00:00:00 2001 From: Debangshu Date: Fri, 3 Oct 2025 18:00:43 +0530 Subject: [PATCH] fix: improve dark mode text contrast across landing page and enable Tailwind dark mode (fixes #11) --- frontend/src/index.css | 6 ++++++ frontend/src/pages/Home.jsx | 26 +++++++++++++------------- frontend/tailwind.config.js | 1 + 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/frontend/src/index.css b/frontend/src/index.css index 5eb7625..fea0e41 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -10,6 +10,12 @@ body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; background-color: #f9fafb; + color: #111827; +} + +.dark body { + background-color: #111827; /* gray-900 */ + color: #e5e7eb; /* gray-200 */ } code { diff --git a/frontend/src/pages/Home.jsx b/frontend/src/pages/Home.jsx index 8d1c7d3..1f1ea84 100644 --- a/frontend/src/pages/Home.jsx +++ b/frontend/src/pages/Home.jsx @@ -75,10 +75,10 @@ const Home = () => {
{/* Hero Section */}
-

+

Algorithm Visualizer

-

+

An interactive platform to learn, visualize, and analyze data structures and algorithms. Built with C++ performance and modern web technologies.

@@ -92,7 +92,7 @@ const Home = () => { View Performance Analysis @@ -101,21 +101,21 @@ const Home = () => { {/* Features Section */}
-

+

Why Choose Our Platform?

{features.map((feature, index) => { const Icon = feature.icon; return ( -
-
+
+
-

+

{feature.title}

-

+

{feature.description}

@@ -126,7 +126,7 @@ const Home = () => { {/* Algorithm Categories */}
-

+

Explore Algorithm Categories

@@ -136,24 +136,24 @@ const Home = () => {
-

+

{category.title}

-

+

{category.description}

{category.algorithms.map((algo) => ( {algo} diff --git a/frontend/tailwind.config.js b/frontend/tailwind.config.js index 366f6d4..28fd5da 100644 --- a/frontend/tailwind.config.js +++ b/frontend/tailwind.config.js @@ -1,5 +1,6 @@ /** @type {import('tailwindcss').Config} */ module.exports = { + darkMode: 'class', content: [ "./src/**/*.{js,jsx,ts,tsx}", ],