Skip to content

Commit b1e2f2d

Browse files
committed
📦 NEW: project section
1 parent 5dcce22 commit b1e2f2d

File tree

7 files changed

+126
-3
lines changed

7 files changed

+126
-3
lines changed

components/Pod.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const Pod = ({ openPopupboxForPod }) => {
2020
pod={true}
2121
key={Math.floor(Math.random() * 10000)}
2222
openPopupboxForPod={openPopupboxForPod}
23+
project={false}
2324
/>
2425
))}
2526
</div>

components/Pod_Leader.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ const Pod_Leader = () => {
99
<Card
1010
url='/images/arsalan.jpg'
1111
name='Arslan Khattak'
12-
pod=''
13-
more='https://www.khattak.dev/'
12+
bio=''
13+
project={false}
14+
pod={false}
1415
/>
1516
<p>
1617
I'm a Computer Science Junior and a Full Stack (MERN) Developer and open source

components/Project.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import { useState } from 'react';
2+
import Card from './Card';
3+
import data from '../data/projects';
4+
import styles from '../styles/Project.module.css';
5+
6+
const Projects = ({ openPopupboxForPod }) => {
7+
const [projects] = useState(data);
8+
return (
9+
<>
10+
<div className={styles.main_projects}>
11+
<div className={styles.heading}>
12+
<h2>Take A Look At Our Projects</h2>
13+
</div>
14+
</div>
15+
<div className={styles.projects}>
16+
{projects.map(project => (
17+
<Card
18+
url={project.url}
19+
name={project.name}
20+
bio={project.info}
21+
github={project.github}
22+
pod={true}
23+
project={true}
24+
key={Math.floor(Math.random() * 10000)}
25+
openPopupboxForPod={openPopupboxForPod}
26+
/>
27+
))}
28+
</div>
29+
</>
30+
);
31+
};
32+
33+
export default Projects;

data/projects.js

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
module.exports = [
2+
{
3+
name: 'Lorem Ipsum',
4+
url: '/projects/sample.png',
5+
info: `Some Project Info Here`,
6+
github: `https://github.com`,
7+
},
8+
{
9+
name: 'Lorem Ipsum',
10+
url: '/projects/sample.png',
11+
info: `Some Project Info Here`,
12+
github: `https://github.com`,
13+
},
14+
{
15+
name: 'Lorem Ipsum',
16+
url: '/projects/sample.png',
17+
info: `Some Project Info Here`,
18+
github: `https://github.com`,
19+
},
20+
{
21+
name: 'Lorem Ipsum',
22+
url: '/projects/sample.png',
23+
info: `Some Project Info Here`,
24+
github: `https://github.com`,
25+
},
26+
{
27+
name: 'Lorem Ipsum',
28+
url: '/projects/sample.png',
29+
info: `Some Project Info Here`,
30+
github: `https://github.com`,
31+
},
32+
{
33+
name: 'Lorem Ipsum',
34+
url: '/projects/sample.png',
35+
info: `Some Project Info Here`,
36+
github: `https://github.com`,
37+
},
38+
{
39+
name: 'Lorem Ipsum',
40+
url: '/projects/sample.png',
41+
info: `Some Project Info Here`,
42+
github: `https://github.com`,
43+
},
44+
{
45+
name: 'Lorem Ipsum',
46+
url: '/projects/sample.png',
47+
info: `Some Project Info Here`,
48+
github: `https://github.com`,
49+
},
50+
];

pages/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import SEO from '../components/Seo';
22
import Coding_Crow from '../components/Coding_Crow';
33
import Pod_Leader from '../components/Pod_Leader';
44
import Pod from '../components/Pod';
5+
import Projects from '../components/Project';
56
import Footer from '../components/Footer';
67
import { PopupboxManager, PopupboxContainer } from 'react-popupbox';
78
import 'react-popupbox/dist/react-popupbox.css';
@@ -31,6 +32,7 @@ export default function Home() {
3132
<Coding_Crow />
3233
<Pod_Leader />
3334
<Pod openPopupboxForPod={openPopupboxForPod} />
35+
<Projects openPopupboxForPod={openPopupboxForPod} />
3436
<Footer />
3537
<PopupboxContainer {...popupboxConfig} />
3638
</>

styles/Footer.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.footer {
2-
height: 40vh;
2+
height: 10vh;
33
display: flex;
44
justify-content: center;
55
align-items: center;

styles/Project.module.css

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
.main_projects {
2+
display: flex;
3+
flex-direction: column;
4+
align-items: center;
5+
justify-content: center;
6+
height: 100vh;
7+
opacity: 0;
8+
transition: all 0.1s;
9+
}
10+
11+
.main_projects:hover {
12+
opacity: 1;
13+
}
14+
15+
.heading h2 {
16+
text-transform: uppercase;
17+
font-size: 2.5rem;
18+
}
19+
20+
.projects {
21+
height: 100vh;
22+
background-color: #000000;
23+
display: flex;
24+
justify-content: space-between;
25+
align-items: center;
26+
overflow: scroll;
27+
}
28+
29+
/* responsive styles */
30+
31+
@media screen and (max-width: 600px) {
32+
.heading h2 {
33+
font-size: 1.7rem;
34+
align-items: center;
35+
}
36+
}

0 commit comments

Comments
 (0)