Skip to content

Commit 39d578b

Browse files
Program pages (#792)
* Add core programs for veterans: Core Curriculum, Mentorship, Mission-Ready, and Studio - Created new MDX files for Core Curriculum, Mentorship Program, Mission-Ready Platform, and Studio. - Implemented program overview, outcomes, and how it works sections in each program's MDX file. - Developed a programs index page to display all programs with descriptions and links. - Added dynamic routing for individual program pages using Next.js. * chore: add @types/mdx dependency and update yarn.lock - Added @types/mdx version 2.0.13 to package.json. - Cleaned up yarn.lock by removing unused @emotion dependencies and ensuring proper versioning for existing packages. * Update src/pages/programs/[slug].tsx Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
1 parent 18e99d9 commit 39d578b

15 files changed

+3914
-526
lines changed

package-lock.json

Lines changed: 2427 additions & 486 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"motion": "^11.13.3",
5252
"next": "^15.0.3",
5353
"next-auth": "^4.24.11",
54+
"next-mdx-remote": "^5.0.0",
5455
"next-pwa": "^5.6.0",
5556
"next-react-svg": "^1.1.3",
5657
"next-seo": "^5.5.0",
@@ -78,6 +79,7 @@
7879
"@types/jest": "^29.5.14",
7980
"@types/jsonwebtoken": "^8.5.8",
8081
"@types/marked": "^4.0.3",
82+
"@types/mdx": "^2.0.13",
8183
"@types/next-auth": "^3.15.0",
8284
"@types/node": "^18.0.0",
8385
"@types/react": "^18.3.12",

src/assets/css/font-awesome-pro.min.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,21 +131,25 @@
131131
}
132132
.fa-rotate-90 {
133133
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";
134+
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
134135
-webkit-transform: rotate(90deg);
135136
transform: rotate(90deg);
136137
}
137138
.fa-rotate-180 {
138139
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";
140+
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
139141
-webkit-transform: rotate(180deg);
140142
transform: rotate(180deg);
141143
}
142144
.fa-rotate-270 {
143145
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";
146+
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
144147
-webkit-transform: rotate(270deg);
145148
transform: rotate(270deg);
146149
}
147150
.fa-flip-horizontal {
148151
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";
152+
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);
149153
-webkit-transform: scaleX(-1);
150154
transform: scaleX(-1);
151155
}
@@ -157,6 +161,7 @@
157161
.fa-flip-horizontal.fa-flip-vertical,
158162
.fa-flip-vertical {
159163
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";
164+
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);
160165
}
161166
.fa-flip-both,
162167
.fa-flip-horizontal.fa-flip-vertical {
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
title: "Core Curriculum"
3+
description: "A comprehensive, veteran-focused curriculum for web development and leadership."
4+
slug: "core-curriculum"
5+
---
6+
7+
# Core Curriculum
8+
9+
<section className="tw-mb-8">
10+
<h2 className="tw-text-3xl tw-font-bold tw-mb-2">Overview</h2>
11+
<p className="tw-text-lg tw-text-gray-700">Our Core Curriculum is designed to equip veterans with the technical and leadership skills needed for today’s tech industry. Learn web development, teamwork, and problem-solving in a supportive, mission-driven environment.</p>
12+
</section>
13+
14+
<section className="tw-mb-8">
15+
<h2 className="tw-text-2xl tw-font-semibold tw-mb-2">Outcomes</h2>
16+
<ul className="tw-list-disc tw-ml-6 tw-text-gray-700">
17+
<li>Mastery of modern web technologies</li>
18+
<li>Team-based project experience</li>
19+
<li>Leadership and communication skills</li>
20+
<li>Preparation for tech careers</li>
21+
</ul>
22+
</section>
23+
24+
<section className="tw-mb-8">
25+
<h2 className="tw-text-2xl tw-font-semibold tw-mb-2">How It Works</h2>
26+
<ol className="tw-list-decimal tw-ml-6 tw-text-gray-700">
27+
<li>Enroll and join a cohort</li>
28+
<li>Participate in live sessions and projects</li>
29+
<li>Receive mentorship and feedback</li>
30+
<li>Graduate ready for the workforce</li>
31+
</ol>
32+
</section>
33+
34+
<section className="tw-mb-8 tw-text-center">
35+
<a href="/apply" className="tw-inline-block tw-bg-blue-700 tw-text-white tw-font-bold tw-px-6 tw-py-3 tw-rounded-lg tw-shadow-md tw-hover:tw-bg-blue-800 tw-focus:tw-outline-none tw-focus:tw-ring-2 tw-focus:tw-ring-blue-400">Apply Now</a>
36+
</section>

src/data/programs/mentorship.mdx

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
title: "Mentorship Program"
3+
description: "Connects veterans with experienced mentors in tech for guidance and support."
4+
slug: "mentorship"
5+
---
6+
7+
# Mentorship Program
8+
9+
<section className="tw-mb-8">
10+
<h2 className="tw-text-3xl tw-font-bold tw-mb-2">Overview</h2>
11+
<p className="tw-text-lg tw-text-gray-700">Our Mentorship Program pairs veterans with seasoned tech professionals who provide guidance, encouragement, and networking opportunities. We believe in the power of community and shared experience to accelerate your growth.</p>
12+
</section>
13+
14+
<section className="tw-mb-8">
15+
<h2 className="tw-text-2xl tw-font-semibold tw-mb-2">Outcomes</h2>
16+
<ul className="tw-list-disc tw-ml-6 tw-text-gray-700">
17+
<li>Personalized career guidance</li>
18+
<li>Expanded professional network</li>
19+
<li>Accountability and support</li>
20+
<li>Confidence to pursue new opportunities</li>
21+
</ul>
22+
</section>
23+
24+
<section className="tw-mb-8">
25+
<h2 className="tw-text-2xl tw-font-semibold tw-mb-2">How It Works</h2>
26+
<ol className="tw-list-decimal tw-ml-6 tw-text-gray-700">
27+
<li>Apply to be matched with a mentor</li>
28+
<li>Set goals and meet regularly</li>
29+
<li>Receive feedback and encouragement</li>
30+
<li>Grow your skills and confidence</li>
31+
</ol>
32+
</section>
33+
34+
<section className="tw-mb-8 tw-text-center">
35+
<a href="/apply" className="tw-inline-block tw-bg-blue-700 tw-text-white tw-font-bold tw-px-6 tw-py-3 tw-rounded-lg tw-shadow-md tw-hover:tw-bg-blue-800 tw-focus:tw-outline-none tw-focus:tw-ring-2 tw-focus:tw-ring-blue-400">Apply Now</a>
36+
</section>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
title: "Mission-Ready Platform"
3+
description: "A hands-on, real-world project platform for veterans to build, ship, and showcase software."
4+
slug: "mission-ready"
5+
---
6+
7+
# Mission-Ready Platform
8+
9+
<section className="tw-mb-8">
10+
<h2 className="tw-text-3xl tw-font-bold tw-mb-2">Overview</h2>
11+
<p className="tw-text-lg tw-text-gray-700">The Mission-Ready Platform empowers veterans to gain real-world experience by building production-grade software for nonprofits and the community. This program bridges the gap between learning and doing, ensuring you’re ready to lead in tech.</p>
12+
</section>
13+
14+
<section className="tw-mb-8">
15+
<h2 className="tw-text-2xl tw-font-semibold tw-mb-2">Outcomes</h2>
16+
<ul className="tw-list-disc tw-ml-6 tw-text-gray-700">
17+
<li>Hands-on experience with real projects</li>
18+
<li>Portfolio-ready work for job applications</li>
19+
<li>Collaboration with mission-driven teams</li>
20+
<li>Leadership and project management skills</li>
21+
</ul>
22+
</section>
23+
24+
<section className="tw-mb-8">
25+
<h2 className="tw-text-2xl tw-font-semibold tw-mb-2">How It Works</h2>
26+
<ol className="tw-list-decimal tw-ml-6 tw-text-gray-700">
27+
<li>Apply and join a project team</li>
28+
<li>Work with mentors and peers</li>
29+
<li>Ship real software to production</li>
30+
<li>Showcase your impact to employers</li>
31+
</ol>
32+
</section>
33+
34+
<section className="tw-mb-8 tw-text-center">
35+
<a href="/apply" className="tw-inline-block tw-bg-blue-700 tw-text-white tw-font-bold tw-px-6 tw-py-3 tw-rounded-lg tw-shadow-md tw-hover:tw-bg-blue-800 tw-focus:tw-outline-none tw-focus:tw-ring-2 tw-focus:tw-ring-blue-400">Apply Now</a>
36+
</section>

src/data/programs/studio.mdx

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
title: "Studio"
3+
description: "A creative space for veterans to collaborate, innovate, and launch tech-driven solutions."
4+
slug: "studio"
5+
---
6+
7+
# Studio
8+
9+
<section className="tw-mb-8">
10+
<h2 className="tw-text-3xl tw-font-bold tw-mb-2">Overview</h2>
11+
<p className="tw-text-lg tw-text-gray-700">Studio is where veterans come together to innovate, collaborate, and launch impactful tech solutions. This program fosters creativity, leadership, and a sense of community among veteran technologists.</p>
12+
</section>
13+
14+
<section className="tw-mb-8">
15+
<h2 className="tw-text-2xl tw-font-semibold tw-mb-2">Outcomes</h2>
16+
<ul className="tw-list-disc tw-ml-6 tw-text-gray-700">
17+
<li>Opportunities to lead and create</li>
18+
<li>Collaboration with like-minded veterans</li>
19+
<li>Launch real-world tech projects</li>
20+
<li>Build a legacy of impact</li>
21+
</ul>
22+
</section>
23+
24+
<section className="tw-mb-8">
25+
<h2 className="tw-text-2xl tw-font-semibold tw-mb-2">How It Works</h2>
26+
<ol className="tw-list-decimal tw-ml-6 tw-text-gray-700">
27+
<li>Join the Studio community</li>
28+
<li>Pitch and join projects</li>
29+
<li>Collaborate and innovate</li>
30+
<li>Showcase your work to the world</li>
31+
</ol>
32+
</section>
33+
34+
<section className="tw-mb-8 tw-text-center">
35+
<a href="/apply" className="tw-inline-block tw-bg-blue-700 tw-text-white tw-font-bold tw-px-6 tw-py-3 tw-rounded-lg tw-shadow-md tw-hover:tw-bg-blue-800 tw-focus:tw-outline-none tw-focus:tw-ring-2 tw-focus:tw-ring-blue-400">Apply Now</a>
36+
</section>

src/pages/programs.tsx

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
import { GetStaticProps, NextPage } from "next";
2+
import Link from "next/link";
3+
import Layout from "@layout/layout-01";
4+
import SEO from "@components/seo/page-seo";
5+
import { getAllMediaPosts } from "../lib/mdx-pages";
6+
7+
type Program = {
8+
slug: string;
9+
title: string;
10+
description: string;
11+
};
12+
13+
type TProps = {
14+
allPrograms: Program[];
15+
page: {
16+
title: string;
17+
};
18+
};
19+
20+
type PageWithLayout = NextPage<TProps> & {
21+
Layout: typeof Layout;
22+
};
23+
24+
const ProgramsPage: PageWithLayout = ({ allPrograms, page }) => {
25+
return (
26+
<>
27+
<SEO title={`${page.title} | Vets Who Code`} />
28+
<div className="tw-container tw-py-10 md:tw-py-15">
29+
<h1 className="tw-mb-10 tw-text-center tw-text-3xl md:tw-text-4xl">{page.title}</h1>
30+
<div className="tw-grid tw-grid-cols-1 tw-gap-8 md:tw-grid-cols-2 lg:tw-grid-cols-2">
31+
{allPrograms.map((program) => (
32+
<div
33+
key={program.slug}
34+
className="tw-hover:tw-scale-105 tw-flex tw-h-full tw-transform tw-flex-col tw-justify-between tw-rounded-xl tw-border tw-border-gray-100 tw-bg-white tw-p-8 tw-shadow-md tw-transition"
35+
>
36+
<h2 className="tw-mb-2 tw-text-2xl tw-font-semibold">
37+
{program.title}
38+
</h2>
39+
<p className="tw-mb-4 tw-text-gray-700">{program.description}</p>
40+
<Link
41+
href={`/programs/${program.slug}`}
42+
className="tw-focus:tw-outline-none tw-focus:tw-ring-2 tw-focus:tw-ring-blue-400 tw-mt-auto tw-inline-block tw-font-medium tw-text-blue-700 tw-underline"
43+
aria-label={`Learn more about ${program.title}`}
44+
>
45+
Learn more
46+
</Link>
47+
</div>
48+
))}
49+
</div>
50+
</div>
51+
</>
52+
);
53+
};
54+
55+
ProgramsPage.Layout = Layout;
56+
57+
export const getStaticProps: GetStaticProps = async () => {
58+
const allPrograms = getAllMediaPosts<Program>(["slug", "title", "description"], "programs");
59+
return {
60+
props: {
61+
allPrograms,
62+
page: {
63+
title: "Programs",
64+
},
65+
layout: {
66+
headerShadow: true,
67+
headerFluid: false,
68+
footerMode: "light",
69+
},
70+
},
71+
};
72+
};
73+
74+
export default ProgramsPage;

src/pages/programs/[slug].tsx

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
import { GetStaticPaths, GetStaticProps, NextPage } from "next";
2+
import Layout from "@layout/layout-01";
3+
import SEO from "@components/seo/page-seo";
4+
import matter from "gray-matter";
5+
import fs from "fs";
6+
import path from "path";
7+
import { MDXRemote, MDXRemoteSerializeResult } from "next-mdx-remote";
8+
import { serialize } from "next-mdx-remote/serialize";
9+
import { getAllMediaPosts } from "../../lib/mdx-pages";
10+
11+
interface ProgramPageProps {
12+
frontmatter: {
13+
title: string;
14+
description: string;
15+
slug: string;
16+
};
17+
mdxSource: MDXRemoteSerializeResult;
18+
}
19+
20+
const ProgramPage: NextPage<ProgramPageProps> & { Layout: typeof Layout } = ({
21+
frontmatter,
22+
mdxSource,
23+
}) => {
24+
return (
25+
<>
26+
<SEO
27+
title={`${frontmatter.title} | Vets Who Code`}
28+
description={frontmatter.description}
29+
/>
30+
<div className="tw-container tw-py-10 md:tw-py-15">
31+
<h1 className="tw-mb-6 tw-text-3xl tw-font-bold md:tw-text-4xl">
32+
{frontmatter.title}
33+
</h1>
34+
<div className="prose md:prose-lg max-w-none">
35+
<MDXRemote {...mdxSource} />
36+
</div>
37+
</div>
38+
</>
39+
);
40+
};
41+
42+
ProgramPage.Layout = Layout;
43+
44+
export const getStaticPaths: GetStaticPaths = async () => {
45+
const programs = getAllMediaPosts<{ slug: string }>(["slug"], "programs");
46+
const paths = programs.map((program) => ({
47+
params: { slug: program.slug },
48+
}));
49+
return { paths, fallback: false };
50+
};
51+
52+
export const getStaticProps: GetStaticProps = async ({ params }) => {
53+
const slug = params?.slug as string;
54+
const filePath = path.join(process.cwd(), "src/data/programs", `${slug}.mdx`);
55+
if (!fs.existsSync(filePath)) {
56+
return { notFound: true };
57+
}
58+
const fileContents = fs.readFileSync(filePath, "utf8");
59+
const { data: frontmatter, content: mdxContent } = matter(fileContents);
60+
const mdxSource = await serialize(mdxContent, { scope: frontmatter });
61+
return {
62+
props: {
63+
frontmatter,
64+
mdxSource,
65+
},
66+
};
67+
};
68+
69+
export default ProgramPage;
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
title: "Core Curriculum"
3+
description: "A comprehensive, veteran-focused curriculum for web development and leadership."
4+
slug: "core-curriculum"
5+
---
6+
7+
# Core Curriculum
8+
9+
<section className="tw-mb-8">
10+
<h2 className="tw-text-3xl tw-font-bold tw-mb-2">Overview</h2>
11+
<p className="tw-text-lg tw-text-gray-700">Our Core Curriculum is designed to equip veterans with the technical and leadership skills needed for today’s tech industry. Learn web development, teamwork, and problem-solving in a supportive, mission-driven environment.</p>
12+
</section>
13+
14+
<section className="tw-mb-8">
15+
<h2 className="tw-text-2xl tw-font-semibold tw-mb-2">Outcomes</h2>
16+
<ul className="tw-list-disc tw-ml-6 tw-text-gray-700">
17+
<li>Mastery of modern web technologies</li>
18+
<li>Team-based project experience</li>
19+
<li>Leadership and communication skills</li>
20+
<li>Preparation for tech careers</li>
21+
</ul>
22+
</section>
23+
24+
<section className="tw-mb-8">
25+
<h2 className="tw-text-2xl tw-font-semibold tw-mb-2">How It Works</h2>
26+
<ol className="tw-list-decimal tw-ml-6 tw-text-gray-700">
27+
<li>Enroll and join a cohort</li>
28+
<li>Participate in live sessions and projects</li>
29+
<li>Receive mentorship and feedback</li>
30+
<li>Graduate ready for the workforce</li>
31+
</ol>
32+
</section>
33+
34+
<section className="tw-mb-8 tw-text-center">
35+
<a href="/apply" className="tw-inline-block tw-bg-blue-700 tw-text-white tw-font-bold tw-px-6 tw-py-3 tw-rounded-lg tw-shadow-md tw-hover:tw-bg-blue-800 tw-focus:tw-outline-none tw-focus:tw-ring-2 tw-focus:tw-ring-blue-400">Apply Now</a>
36+
</section>

0 commit comments

Comments
 (0)