Skip to content

Commit 7a02263

Browse files
authored
resource page added with few free resource list issue #226 (#231)
* resource page added with few free resource list * vercel deploy issue fix * new font + new component for resource card * more resources added * lodash aded+ lots of improvement and more resources added * search field dark ui issue fix * lots of improvement + resource images added
1 parent 37ecd7b commit 7a02263

File tree

12 files changed

+467
-8
lines changed

12 files changed

+467
-8
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"antd": "^5.19.1",
1616
"axios": "^1.2.2",
1717
"framer-motion": "^10.8.3",
18+
"lodash": "^4.17.21",
1819
"prettier": "^3.3.3",
1920
"react": "^18.2.0",
2021
"react-dom": "^18.2.0",

src/components/Common/MainTitle.jsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const MainTitle = ({
2+
title,
3+
highlight
4+
}) => {
5+
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>;
6+
};
7+
8+
export default MainTitle;

src/components/Header/Header.jsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
MdClose,
55
MdMenu,
66
MdHome,
7+
MdStore,
78
} from "react-icons/md";
89
import { AiFillGithub } from "react-icons/ai";
910
import { Link } from "react-router-dom";
@@ -36,9 +37,9 @@ function Header({notice }) {
3637
icon: <MdInsertDriveFile size="1.2rem" />,
3738
},
3839
{
39-
name: "Contributors",
40-
link: "/Contributors",
41-
icon: <MdPeople size="1.2rem" />,
40+
name: "Resources",
41+
link: "/resources",
42+
icon: <MdStore size="1.2rem" />,
4243
},
4344
{
4445
name: "Github",

src/components/Layout/Layout.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { ThemeProvider } from '../../context/ThemeContext';
1010
*/
1111
const Layout = ({ stars, children }) => {
1212
return (
13-
<div className='flex flex-col justify-between min-h-screen'>
13+
<div className='flex flex-col justify-between min-h-screen font-[poppins]'>
1414
<ThemeProvider>
1515
<Header
1616
notice={"Under Construction"}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { Link } from "react-router-dom";
2+
3+
const ResourceCard = ({ idx, resource }) => {
4+
return <div key={idx} className="dark:bg-black rounded-lg shadow-lg overflow-hidden hover:shadow-xl transition-shadow duration-300">
5+
{resource.image && (
6+
<div className="grid items-center">
7+
<img
8+
src={resource.image}
9+
alt={resource.title}
10+
onError={(e) => { e.target.src = "assets/logo.png"; }}
11+
className="h-40 object-cover object-center "
12+
/>
13+
</div>
14+
)}
15+
<div className="p-6">
16+
<h3 className="text-lg font-semibold mb-2">{resource.title}</h3>
17+
<p className="text-gray-700 mb-4">{resource.description}</p>
18+
<Link
19+
to={resource.link}
20+
target="_blank"
21+
rel="noopener noreferrer"
22+
className="text-blue-600 hover:underline"
23+
>
24+
Learn More
25+
</Link>
26+
</div>
27+
</div>;
28+
};
29+
30+
export default ResourceCard;
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import ResourceCard from "./ResourceCard";
2+
3+
const ResourceSection = ({ id, title, resources }) => {
4+
return (
5+
<section id={id} className="my-12">
6+
<h2 className="text-3xl font-bold mb-10 text-center">{title}</h2>
7+
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-8">
8+
{resources.length === 0 ? <div>
9+
<h3 className="text-xl font-medium text-center mb-20">No resources found</h3>
10+
</div> :
11+
resources.map((resource, index) => (
12+
<ResourceCard idx={index} resource={resource} />
13+
))}
14+
</div>
15+
</section>
16+
);
17+
}
18+
export default ResourceSection;

0 commit comments

Comments
 (0)