File tree 2 files changed +12
-23
lines changed
2 files changed +12
-23
lines changed Original file line number Diff line number Diff line change 1
1
import Link from "next/link" ;
2
2
3
- export function Card ( { link, title, desc , isDarkMode } ) {
3
+ export function Card ( { link, title, isDarkMode } ) {
4
4
return (
5
- < Link href = { link } className = "group relative block h-64 sm:h-80 lg:h-96" >
6
- < span
7
- className = { `absolute inset-0 border-2 border-dashed border-transparent rounded transition-all duration-300 group-hover:border-yellow-500 ${ isDarkMode ? "border-white" : "border-black" } ` }
8
- > </ span >
9
-
5
+ < Link
6
+ href = { link }
7
+ className = "group relative block p-10 overflow-hidden rounded-lg shadow-lg transition-transform transform hover:scale-105"
8
+ >
10
9
< div
11
- className = { `relative flex h-full transform rounded-lg items-end border-2 border-transparent bg-gradient-to-br ${ isDarkMode ? " from-gray-500 via-slate-500 to-black " : "from-gray-100 via-slate-100 to-white" } transition-transform group-hover:-translate-x-2 group-hover:-translate-y-2 group-hover:shadow-xl ` }
10
+ className = { `absolute inset-0 ${ isDarkMode ? " bg-gradient-to-r from-gray-900 via-gray-800 to-gray-700 " : "bg-gradient- to-r from-blue-300 via-blue-400 to-blue-500" } ` }
12
11
>
13
- < div
14
- className = { `p-4 !pt-0 transition-opacity group-hover:absolute group-hover:opacity-0 sm:p-6 lg:p-8 text-center absolute top-0 left-0 w-full h-full flex items-center justify-center ${ isDarkMode ? "text-white" : "text-black" } ` }
15
- >
16
- < h2 className = "mt-4 text-2xl font-bold sm:text-3xl" > { title } </ h2 >
17
- </ div >
18
-
19
- < div
20
- className = { `absolute p-4 opacity-0 transition-opacity group-hover:relative group-hover:opacity-100 sm:p-6 lg:p-8 ${ isDarkMode ? "text-white" : "text-black" } ` }
21
- >
22
- < h3 className = "mt-4 text-2xl font-bold sm:text-3xl" > { title } </ h3 >
23
-
24
- < p className = "mt-4 text-sm sm:text-base" > { desc } </ p >
25
-
26
- < p className = "mt-8 font-extrabold" > Try out</ p >
27
- </ div >
12
+ < div className = "absolute inset-0 bg-gradient-to-b from-transparent to-black opacity-70 group-hover:opacity-90 transition-opacity" > </ div >
13
+ </ div >
14
+ < div className = "relative z-10 flex items-center justify-center h-full" >
15
+ < h1 className = "text-white text-2xl font-bold transition-colors group-hover:text-yellow-300 text-center" >
16
+ { title }
17
+ </ h1 >
28
18
</ div >
29
19
</ Link >
30
20
) ;
Original file line number Diff line number Diff line change @@ -54,7 +54,6 @@ export default function Home({ state }) {
54
54
key = { index }
55
55
title = { item . name }
56
56
link = { item . link }
57
- desc = { "" }
58
57
isDarkMode = { isDarkMode }
59
58
/>
60
59
) ) }
You can’t perform that action at this time.
0 commit comments