Skip to content

Commit 1cfd5b4

Browse files
committed
Add mini projects section
1 parent 78a8f5e commit 1cfd5b4

8 files changed

Lines changed: 78 additions & 13 deletions

File tree

public/apple-music.png

1.09 MB
Loading

src/App.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ function App() {
2323
</Route>
2424
<Route path="/projects" element={<Projects />} />
2525
<Route path="/projects/:projectId" element={<Project />} />
26+
<Route path="/mini-projects" element={<Projects />} />
27+
<Route path="/mini-projects/:projectId" element={<Project />} />
2628
<Route path="*" element={<NotFound />} />
2729
</Routes>
2830
</Header>

src/pages/Project.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
import { Link, useNavigate, useParams } from "react-router-dom";
1+
import { Link, useLocation, useNavigate, useParams } from "react-router-dom";
22
import "./Project.css";
3-
import projects from "../utils/projects";
3+
import { mainProjects, miniProjects } from "../utils/projects";
44
import { useEffect } from "react";
55
import Slideshow from "../components/Slideshow";
66
import TechIcon from "../components/TechIcon";
77

88
export default function Project() {
9+
const location = useLocation();
910
const params = useParams();
1011
const navigate = useNavigate();
11-
const project = projects.find((p) => p.id === params.projectId);
12+
const project = (
13+
location.pathname.includes("mini-projects") ? miniProjects : mainProjects
14+
).find((p) => p.id === params.projectId);
1215

1316
useEffect(() => {
1417
if (!project) {

src/pages/Projects.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,16 @@
8787
height: 100%;
8888
border-radius: 0.5rem 0.5rem 0 0;
8989
}
90+
91+
.mini-projects {
92+
width: 100%;
93+
display: flex;
94+
flex-direction: column;
95+
align-items: center;
96+
justify-content: center;
97+
height: 100%;
98+
}
99+
100+
.mini-projects h1 {
101+
margin: 0;
102+
}

src/pages/Projects.tsx

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
import projects from "../utils/projects";
1+
import { mainProjects, miniProjects } from "../utils/projects";
22
import "./Projects.css";
33
import { Link, useLocation, useNavigate } from "react-router-dom";
44
import { useEffect, useRef, useState } from "react";
55

66
export default function Projects() {
77
const location = useLocation();
8+
9+
const isMini = location.pathname.includes("mini-projects");
10+
const projects = isMini ? miniProjects : mainProjects;
811
const [animating, setAnimating] = useState(false);
912
const [hideOverlay, setHideOverlay] = useState(false);
1013
const [fsStyle, setFsStyle] = useState<any>({});
@@ -18,7 +21,7 @@ export default function Projects() {
1821
const navigate = useNavigate();
1922

2023
useEffect(() => {
21-
if (transitionProject) {
24+
if (transitionProject && !isMini) {
2225
setAnimating(true);
2326
setHideOverlay(false);
2427
setFsStyle({});
@@ -65,7 +68,7 @@ export default function Projects() {
6568
</div>
6669
)}
6770
<div className="projects-header">
68-
<h1>My Projects</h1>
71+
<h1>{isMini ? "Mini" : "My"} Projects</h1>
6972
<Link to="/">
7073
<h3>Back to home</h3>
7174
</Link>
@@ -87,7 +90,9 @@ export default function Projects() {
8790
: undefined
8891
}
8992
onClick={() => {
90-
navigate("/projects/" + project.id);
93+
navigate(
94+
(isMini ? "/mini-projects/" : "/projects/") + project.id
95+
);
9196
}}
9297
>
9398
<img
@@ -101,6 +106,22 @@ export default function Projects() {
101106
</div>
102107
</div>
103108
))}
109+
110+
<div
111+
className={`project-card`}
112+
onClick={() => {
113+
navigate(`/${isMini ? "projects" : "mini-projects"}`);
114+
}}
115+
>
116+
<div className="mini-projects">
117+
<h1>{isMini ? "Main" : "Mini"} Projects</h1>
118+
<h2>
119+
{isMini
120+
? "Larger, high effort projects with a greater degree of polish"
121+
: "Small or fun projects that didn't quite make the main cut!"}
122+
</h2>
123+
</div>
124+
</div>
104125
</div>
105126
</div>
106127
);

src/pages/SlideshowBg.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151

5252
.logo-img {
5353
width: 4rem;
54+
margin-top: -0.6rem;
5455
rotate: 10deg;
5556
transition: all 0.3s;
5657
filter: drop-shadow(var(--shadow));

src/pages/SlideshowBg.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import projects from "../utils/projects";
1+
import { mainProjects } from "../utils/projects";
22
import "./SlideshowBg.css";
33
import Slideshow from "../components/Slideshow";
44
import { Outlet } from "react-router-dom";
@@ -17,7 +17,7 @@ export default function SlideshowBg({
1717
<div className="slideshow-bg-slide-container">
1818
<Slideshow
1919
setCurSlide={setCurSlide}
20-
slides={projects.map((p) => {
20+
slides={mainProjects.map((p) => {
2121
return {
2222
name: p.name,
2323
desc: p.short,

src/utils/projects.tsx

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export type Project = {
1515
id: string;
1616
};
1717

18-
const projects: Project[] = [
18+
export const mainProjects: Project[] = shuffleArray([
1919
{
2020
name: "Shrinkwrap",
2121
short: "Multipurpose app for FRC robotics",
@@ -198,8 +198,33 @@ const projects: Project[] = [
198198
url: "https://github.com/frcteam3044/2025swervebase",
199199
},
200200
],
201-
id: "oxidation",
201+
id: "oxconfig",
202202
},
203-
];
203+
]);
204204

205-
export default shuffleArray(projects);
205+
export const miniProjects: Project[] = shuffleArray([
206+
{
207+
name: "Apple Music Frontend",
208+
short: "Alternative Apple Music web frontend",
209+
points: [
210+
"Supports live lyrics powered by LRC LIB",
211+
"Uses MusicKit to access Apple Music API",
212+
"Incredibly basic functionality",
213+
],
214+
pointsTitle: "Features",
215+
techStack: ["Bun", "Vite", "TypeScript", "React"],
216+
images: ["apple-music.png"],
217+
links: [
218+
{
219+
label: "GitHub",
220+
url: "https://github.com/nab138/apple-music",
221+
},
222+
{
223+
label: "Live Demo",
224+
url: "https://music.nabdev.me",
225+
},
226+
],
227+
228+
id: "apple-music",
229+
},
230+
]);

0 commit comments

Comments
 (0)