Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"antd": "^5.19.1",
"axios": "^1.2.2",
"framer-motion": "^10.8.3",
"lodash": "^4.17.21",
"prettier": "^3.3.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
8 changes: 8 additions & 0 deletions src/components/Common/MainTitle.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const MainTitle = ({
title,
highlight
}) => {
return <h1 className="text-2xl sm:text-3xl font-bold mb-16 mt-5 text-center w-10/12 sm:w-full mx-auto">{title} <span className='text-transparent bg-gradient-to-tr from-primary to-white bg-clip-text'>{highlight}</span></h1>;
};

export default MainTitle;
7 changes: 4 additions & 3 deletions src/components/Header/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
MdClose,
MdMenu,
MdHome,
MdStore,
} from "react-icons/md";
import { AiFillGithub } from "react-icons/ai";
import { Link } from "react-router-dom";
Expand Down Expand Up @@ -36,9 +37,9 @@ function Header({notice }) {
icon: <MdInsertDriveFile size="1.2rem" />,
},
{
name: "Contributors",
link: "/Contributors",
icon: <MdPeople size="1.2rem" />,
name: "Resources",
link: "/resources",
icon: <MdStore size="1.2rem" />,
},
{
name: "Github",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Layout/Layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { ThemeProvider } from '../../context/ThemeContext';
*/
const Layout = ({ stars, children }) => {
return (
<div className='flex flex-col justify-between min-h-screen'>
<div className='flex flex-col justify-between min-h-screen font-[poppins]'>
<ThemeProvider>
<Header
notice={"Under Construction"}
Expand Down
30 changes: 30 additions & 0 deletions src/components/Resources/ResourceCard.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
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 && (
<div className="grid items-center">
<img
src={resource.image}
alt={resource.title}
onError={(e) => { e.target.src = "assets/logo.png"; }}
className="h-40 object-cover object-center "
/>
</div>
)}
<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;
18 changes: 18 additions & 0 deletions src/components/Resources/ResourceSection.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import ResourceCard from "./ResourceCard";

const ResourceSection = ({ id, title, resources }) => {
return (
<section id={id} className="my-12">
<h2 className="text-3xl font-bold mb-10 text-center">{title}</h2>
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-8">
{resources.length === 0 ? <div>
<h3 className="text-xl font-medium text-center mb-20">No resources found</h3>
</div> :
resources.map((resource, index) => (
<ResourceCard idx={index} resource={resource} />
))}
</div>
</section>
);
}
export default ResourceSection;
Loading