-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #766 from mehul-m-prajapati/hot_topics
Added spacing between hot topic cards and hover effects
- Loading branch information
Showing
2 changed files
with
21 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,17 @@ | ||
import React from 'react' | ||
// Card.js | ||
import React from 'react'; | ||
|
||
function Card({data}) { | ||
function Card({ data }) { | ||
return ( | ||
|
||
|
||
<div className="lg:w-60 lg:h-72 group hover:dark:bg-[#3A5064] hover:text-[#B9D1DA] bg-white border border-gray-200 rounded-lg shadow dark:bg-[#324655] dark:border-gray-700 overflow-hidden"> | ||
<a href="#"> | ||
<img className="rounded-t-lg h-36 w-full object-cover group-hover:scale-105 ease-in duration-200" src={data.img} alt="" /> | ||
</a> | ||
<div className="px-5 py-3"> | ||
<a href="#"> | ||
<h5 className="mb-2 text-xl font-bold tracking-tight text-gray-900 dark:text-white">{data.title}</h5> | ||
</a> | ||
<p className="mb-3 font-normal text-sm text-gray-700 dark:text-gray-400">{data.desc.split(" ").splice(0,8).join(" ") + "..."} | ||
<a className='text-[#61B3A0] group-hover:opacity-100 ease-in-out duration-200 opacity-0' href={data.ref}>Explore more</a> | ||
</p> | ||
<div className="w-full max-w-xs bg-gray shadow-lg rounded-lg overflow-hidden transform transition duration-300 ease-in-out hover:scale-105 hover:shadow-xl"> | ||
<img src={data.img} alt={data.title} className="w-full h-48 object-cover" /> | ||
<div className="p-2"> | ||
<h2 className="text-xl font-bold">{data.title}</h2> | ||
<p className="text-sm mt-2">{data.desc}</p> | ||
<a href={data.ref} target="_blank" rel="noopener noreferrer" className="text-green-500 hover:text-green-700 mt-4 block">Learn More</a> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
) | ||
); | ||
} | ||
|
||
export default Card | ||
export default Card; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters