@@ -2,6 +2,7 @@ import React, { useState, useRef, useEffect } from "react";
22import Layout from "@theme/Layout" ;
33import Head from "@docusaurus/Head" ;
44import { motion } from "framer-motion" ;
5+ import { useColorMode } from '@docusaurus/theme-common' ;
56
67// Animation variants for consistent animations
78const fadeIn = {
@@ -135,6 +136,9 @@ const faqs = [
135136] ;
136137
137138export default function CoursesLanding ( ) {
139+ const { colorMode } = useColorMode ( ) ;
140+ const isDark = colorMode === 'dark' ;
141+
138142 const [ showAllTopics , setShowAllTopics ] = useState ( false ) ;
139143 const [ modal , setModal ] = useState ( { open : false , content : "" } ) ;
140144 const [ openFaq , setOpenFaq ] = useState ( null ) ;
@@ -385,13 +389,19 @@ export default function CoursesLanding() {
385389 ` }
386390 </ style >
387391 </ Head >
388- < main className = "bg-black min-h-screen text-white" >
392+ < main className = { `min-h-screen transition-colors duration-300 ${
393+ isDark ? 'bg-[#121212] text-white' : 'bg-white text-black'
394+ } `} >
389395 { /* Modal */ }
390396 { modal . open && (
391397 < div className = "fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-60 animate-fadeIn" >
392- < div className = "bg-white text-black rounded-lg p-8 max-w-md w-full text-center relative animate-scaleIn" >
398+ < div className = { `rounded-lg p-8 max-w-md w-full text-center relative animate-scaleIn ${
399+ isDark ? 'bg-[#1a1a1a] text-white' : 'bg-white text-black'
400+ } `} >
393401 < button
394- className = "absolute top-2 right-4 text-2xl transition-transform hover:scale-110"
402+ className = { `absolute top-2 right-4 text-2xl transition-transform hover:scale-110 ${
403+ isDark ? 'text-white hover:text-gray-300' : 'text-black hover:text-gray-700'
404+ } `}
395405 onClick = { ( ) => setModal ( { open : false , content : "" } ) }
396406 >
397407 ×
@@ -403,7 +413,11 @@ export default function CoursesLanding() {
403413
404414 { /* Hero Section */ }
405415 < motion . section
406- className = "py-20 px-4 text-center border-b border-gray-800 bg-gradient-to-br from-blue-950 via-gray-900 to-black relative overflow-hidden"
416+ className = { `py-20 px-4 text-center relative overflow-hidden transition-colors duration-300 ${
417+ isDark
418+ ? 'border-b border-gray-800 bg-gradient-to-br from-blue-950 via-gray-900 to-black'
419+ : 'border-b border-gray-200 bg-gradient-to-br from-blue-50 via-white to-gray-50'
420+ } `}
407421 initial = "hidden"
408422 animate = "visible"
409423 variants = { {
@@ -419,10 +433,14 @@ export default function CoursesLanding() {
419433 Transform Your Career< br /> in Data Engineering</ motion . h1 >
420434 < div className = "flex justify-center items-center" >
421435 < motion . p
422- className = "text-xl md:text-2xl text-gray-300 max-w-2xl text-center leading-relaxed"
436+ className = { `text-xl md:text-2xl max-w-2xl text-center leading-relaxed ${
437+ isDark ? 'text-gray-300' : 'text-gray-700'
438+ } `}
423439 variants = { fadeIn }
424440 >
425- Master the art of data engineering with industry-leading courses designed for < span className = "text-blue-300 font-semibold" > modern tech careers</ span > .
441+ Master the art of data engineering with industry-leading courses designed for < span className = { `font-semibold ${
442+ isDark ? 'text-blue-300' : 'text-blue-600'
443+ } `} > modern tech careers</ span > .
426444 </ motion . p >
427445 </ div >
428446 < motion . div
@@ -462,11 +480,15 @@ export default function CoursesLanding() {
462480 style = { { scrollBehavior : 'smooth' } }
463481 variants = { fadeIn }
464482 >
465- < div className = "flex gap-2 inline-flex " >
483+ < div className = "flex gap-2" >
466484 { techTags . map ( ( tag , idx ) => (
467485 < span
468486 key = { idx }
469- className = "bg-gray-800/80 hover:bg-blue-700/80 px-4 py-2 rounded-full text-sm font-semibold text-gray-200 shadow-md transition-all duration-300 border border-gray-700/50 hover:border-blue-500/50 hover:text-white"
487+ className = { `px-4 py-2 rounded-full text-sm font-semibold shadow-md transition-all duration-300 ${
488+ isDark
489+ ? 'bg-gray-800/80 hover:bg-blue-700/80 text-gray-200 border border-gray-700/50 hover:border-blue-500/50 hover:text-white'
490+ : 'bg-gray-100 hover:bg-blue-100 text-gray-700 border border-gray-300 hover:border-blue-400 hover:text-blue-700'
491+ } `}
470492 >
471493 { tag }
472494 </ span >
@@ -479,7 +501,9 @@ export default function CoursesLanding() {
479501 className = "mt-8"
480502 variants = { fadeIn }
481503 >
482- < h3 className = "text-lg text-gray-400 mb-2 text-center" > Students now available at</ h3 >
504+ < h3 className = { `text-lg mb-2 text-center ${
505+ isDark ? 'text-gray-400' : 'text-gray-600'
506+ } `} > Students now available at</ h3 >
483507 < div className = "flex flex-wrap justify-center items-center gap-4" >
484508 { partnerLogos . map ( ( logo , idx ) => (
485509 < motion . img
0 commit comments