11import React , { useState , useEffect , useRef } from 'react' ;
22import { Paper , Text , Title , Group , Badge , Box } from '@mantine/core' ;
33import { IconBrandGithub , IconExternalLink , IconInfoCircle } from '@tabler/icons-react' ;
4+ import { useColorScheme } from '../../theme/ThemeProvider' ;
45
56const EnhancedProjectCard = ( {
67 title,
@@ -18,6 +19,8 @@ const EnhancedProjectCard = ({
1819 const [ imageError , setImageError ] = useState ( false ) ;
1920 const [ isHovered , setIsHovered ] = useState ( false ) ;
2021 const cardRef = useRef ( null ) ;
22+ const { colorScheme } = useColorScheme ( ) ;
23+ const isDark = colorScheme === 'dark' ;
2124
2225 // Determine image source
2326 const imgSrc = imageError
@@ -89,7 +92,7 @@ const EnhancedProjectCard = ({
8992 transform : isHovered ? 'translateY(-5px)' : 'translateY(0)' ,
9093 boxShadow : isHovered ? '0 10px 25px rgba(155, 0, 255, 0.15)' : '0 4px 12px rgba(0, 0, 0, 0.1)' ,
9194 border : featured ? '2px solid rgba(155, 0, 255, 0.5)' : undefined ,
92- backgroundColor : 'rgba(28, 29, 34, 0.7)' ,
95+ backgroundColor : isDark ? 'rgba(28, 29, 34, 0.7)' : 'rgba(245, 245, 250 , 0.7)',
9396 position : 'relative' ,
9497 overflow : 'hidden' ,
9598 cursor : 'pointer' // Add pointer cursor to indicate clickable
@@ -180,8 +183,8 @@ const EnhancedProjectCard = ({
180183
181184 { /* Content */ }
182185 < Box style = { { flex : 1 , display : 'flex' , flexDirection : 'column' , position : 'relative' , zIndex : 1 } } >
183- < Title order = { 4 } mb = "xs" style = { { color : '#e0e0e0' } } > { title } </ Title >
184- < Text size = "sm" color = "dimmed" mb = "md" style = { { flex : 1 } } > { description } </ Text >
186+ < Title order = { 4 } mb = "xs" style = { { color : isDark ? '#e0e0e0' : '#1A1B1E ' } } > { title } </ Title >
187+ < Text size = "sm" color = { isDark ? "dimmed" : "dark.6" } mb = "md" style = { { flex : 1 } } > { description } </ Text >
185188
186189 < Group spacing = "xs" mb = "md" >
187190 { technologies && technologies . slice ( 0 , 3 ) . map ( ( tech , index ) => (
@@ -264,8 +267,8 @@ const EnhancedProjectCard = ({
264267 padding : '8px 12px' ,
265268 borderRadius : '25px' ,
266269 marginLeft : 'auto' ,
267- color : '#00F5FF' ,
268- backgroundColor : isHovered ? 'rgba(0, 245, 255, 0.1)' : 'transparent' ,
270+ color : isDark ? '#00F5FF' : '#6200EE ',
271+ backgroundColor : isHovered ? ( isDark ? 'rgba(0, 245, 255, 0.1)' : 'rgba(98, 0, 238, 0.1)' ) : 'transparent' ,
269272 fontSize : '14px' ,
270273 display : 'flex' ,
271274 alignItems : 'center' ,
0 commit comments