Skip to content

Commit ab9ba27

Browse files
Feat/redesign programs page (#793)
* Feat: Redesign programs page with new Hero, ProgramCard, and CTA components * feat: update Programs page layout with new HeroArea and ProgramCard integration --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
1 parent 39d578b commit ab9ba27

File tree

4 files changed

+106
-25
lines changed

4 files changed

+106
-25
lines changed

src/components/cta/index.tsx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import Link from "next/link";
2+
3+
const CTA = () => {
4+
return (
5+
<div className="tw-bg-[#c5203e] tw-text-white tw-p-12 tw-rounded-2xl tw-shadow-lg tw-text-center">
6+
<h2 className="tw-text-3xl tw-font-bold">Ready to Start Your Mission?</h2>
7+
<p className="tw-mt-2 tw-text-lg">
8+
Apply to our program and join the ranks of veterans who have successfully transitioned into
9+
the tech industry.
10+
</p>
11+
<Link
12+
href="/apply"
13+
className="tw-mt-6 tw-bg-white tw-text-[#c5203e] tw-font-bold tw-rounded-lg tw-px-6 tw-py-3 tw-inline-block tw-hover:tw-bg-gray-100"
14+
>
15+
Apply Now
16+
</Link>
17+
</div>
18+
);
19+
};
20+
21+
export default CTA;

src/components/hero/index.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
const Hero = () => {
2+
return (
3+
<div className="tw-bg-[#091f40] tw-text-white tw-py-20">
4+
<div className="tw-container">
5+
<h1 className="tw-text-4xl tw-font-bold">Our Program</h1>
6+
<p className="tw-mt-2 tw-text-lg">
7+
Vets Who Code provides a comprehensive, veteran-focused curriculum to prepare you for a
8+
career in tech.
9+
</p>
10+
</div>
11+
</div>
12+
);
13+
};
14+
15+
export default Hero;
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import Link from "next/link";
2+
3+
type Program = {
4+
slug: string;
5+
title: string;
6+
description: string;
7+
};
8+
9+
type Props = {
10+
program: Program;
11+
};
12+
13+
const ProgramCard = ({ program }: Props) => {
14+
return (
15+
<div className="tw-bg-white tw-rounded-xl tw-shadow-sm tw-p-6 tw-border tw-border-gray-200 tw-hover:tw-shadow-md tw-transition">
16+
<h2 className="tw-mb-2 tw-text-2xl tw-font-semibold">{program.title}</h2>
17+
<p className="tw-mb-4 tw-text-gray-700">{program.description}</p>
18+
<Link
19+
href={`/programs/${program.slug}`}
20+
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"
21+
aria-label={`Learn more about ${program.title}`}
22+
>
23+
Learn more
24+
</Link>
25+
</div>
26+
);
27+
};
28+
29+
export default ProgramCard;

src/pages/programs.tsx

Lines changed: 41 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
import { GetStaticProps, NextPage } from "next";
2-
import Link from "next/link";
1+
import { NextPage, GetStaticProps } from "next";
32
import Layout from "@layout/layout-01";
43
import SEO from "@components/seo/page-seo";
4+
import ProgramCard from "@components/program-card";
5+
import HeroArea from "@containers/hero/layout-07";
6+
57
import { getAllMediaPosts } from "../lib/mdx-pages";
68

79
type Program = {
@@ -21,33 +23,47 @@ type PageWithLayout = NextPage<TProps> & {
2123
Layout: typeof Layout;
2224
};
2325

26+
const heroData = {
27+
items: [
28+
{
29+
id: 1,
30+
images: [
31+
{
32+
src: "https://res.cloudinary.com/vetswhocode/image/upload/v1746590043/9_ahefah.png",
33+
},
34+
],
35+
headings: [
36+
{ id: 1, content: "Our Programs" },
37+
{ id: 2, content: "What we do to be the tech arm of veteran support" },
38+
],
39+
texts: [],
40+
},
41+
],
42+
};
43+
2444
const ProgramsPage: PageWithLayout = ({ allPrograms, page }) => {
2545
return (
2646
<>
2747
<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-
))}
48+
<HeroArea data={heroData} />
49+
<main className="tw-container tw-mx-auto tw-max-w-6xl tw-px-4">
50+
<div className="tw-mx-auto tw-mb-12 tw-mt-16 tw-max-w-4xl">
51+
<p className="tw-text-center tw-text-lg tw-text-gray-700">
52+
Our programs are designed to empower veterans with real-world skills,
53+
mentorship, and a supportive community—helping you transition, grow, and
54+
lead in tech.
55+
</p>
4956
</div>
50-
</div>
57+
{/* Program Cards Grid - project card style */}
58+
<section className="tw-mb-16">
59+
<div className="tw-grid tw-gap-8 sm:tw-grid-cols-2 lg:tw-grid-cols-3">
60+
{allPrograms.map((program) => (
61+
<ProgramCard key={program.slug} program={program} />
62+
))}
63+
</div>
64+
</section>
65+
<hr className="tw-my-12 tw-border-t tw-border-gray-200" />
66+
</main>
5167
</>
5268
);
5369
};
@@ -60,7 +76,7 @@ export const getStaticProps: GetStaticProps = async () => {
6076
props: {
6177
allPrograms,
6278
page: {
63-
title: "Programs",
79+
title: "Our Programs",
6480
},
6581
layout: {
6682
headerShadow: true,

0 commit comments

Comments
 (0)