-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new font + new component for resource card
- Loading branch information
Showing
3 changed files
with
33 additions
and
13 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
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Link } from "react-router-dom"; | ||
|
||
const ResourceCard = ({idx, resource}) => { | ||
return <div key={idx} className="dark:bg-black rounded-lg shadow-lg overflow-hidden hover:shadow-xl transition-shadow duration-300"> | ||
{resource.image && ( | ||
<img | ||
src={resource.image} | ||
alt={resource.title} | ||
className="w-full h-40 object-cover object-center" | ||
/> | ||
)} | ||
<div className="p-6"> | ||
<h3 className="text-lg font-semibold mb-2">{resource.title}</h3> | ||
<p className="text-gray-700 mb-4">{resource.description}</p> | ||
<Link | ||
to={resource.link} | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
className="text-blue-600 hover:underline" | ||
> | ||
Learn More | ||
</Link> | ||
</div> | ||
</div>; | ||
}; | ||
|
||
export default ResourceCard; |
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