Skip to content

Commit

Permalink
added requirements page; added flyer; cleaning up
Browse files Browse the repository at this point in the history
  • Loading branch information
stcalica committed May 17, 2024
1 parent 2878450 commit 18659d5
Show file tree
Hide file tree
Showing 12 changed files with 100 additions and 49 deletions.
8 changes: 8 additions & 0 deletions app/requirements/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import type { NextPage } from "next";
import RequirementsPage from "@/templates/RequirementsPage";

const Requirements: NextPage = () => {
return <RequirementsPage />;
};

export default Requirements;
4 changes: 2 additions & 2 deletions components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ const Header = ({ onClick }: HeaderProps) => {
return (
<header className="relative z-10 bg-tertiary-500">
<div className="py-4">
<div className="container relative flex items-center h-[4.8125rem] lg:flex-row-reverse">
<div className="container relative flex items-center h-[4.8125rem] lg:flex-row-reverse lg:hidden xl:hidden 2xl:hidden ">
<button
className="flex flex-col justify-center items-center w-12 h-12 ml-auto lg:mr-auto before:w-8 before:h-0.5 before:bg-n-400 before:rounded before:transition-colors after:w-4 after:h-0.5 after:bg-n-400 after:rounded after:transition-colors hover:before:bg-orange-500 hover:after:bg-orange-500"
className="flex flex-col justify-center items-center w-12 h-12 before:w-8 before:h-0.5 before:bg-n-400 before:rounded before:transition-colors after:w-4 after:h-0.5 after:bg-n-400 after:rounded after:transition-colors hover:before:bg-orange-500 hover:after:bg-orange-500"
onClick={onClick}
>
<span className="w-6 h-0.5 my-1.5 rounded bg-n-400 transition-colors group-hover:bg-orange-500"></span>
Expand Down
2 changes: 1 addition & 1 deletion components/Layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const Layout = ({ children }: LayoutProps) => {
clearQueueScrollLocks();
enablePageScroll();
}, [pathname]);
//TODO: might have to fix overflow-hidden to lg:overflow-hidden

return (
<>
<div className="flex flex-col min-h-screen overflow-hidden">
Expand Down
10 changes: 10 additions & 0 deletions constants/navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ export const navigation = [
title: "Merit Badges",
url: "/merit-badges",
},
{
id: "2",
title: "Merit Badge Requirements",
url: "/requirements",
},
]
},
{
Expand Down Expand Up @@ -63,6 +68,11 @@ export const menu = [
title: "Merit Badges",
url: "/merit-badges",
},
{
id: "2",
title: "Merit Badge Requirements",
url: "/requirements",
}
]
},
{
Expand Down
Binary file added public/images/banners/advancecampbanner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/content/advcamplogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/content/logo-without-text.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 11 additions & 1 deletion templates/HomePage/AboutUs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,18 @@ import Image from "@/components/Image";
type AboutUsProps = {};

const AboutUs = ({}: AboutUsProps) => (
<div className="lg:py-32 2xl:py-24 py-20 md:pb-10">
<div className="lg:pb-32 2xl:pb-24 pb-20 md:pb-10">
<div className="w-full">
<Image
className="w-full sm:6rem xs:6rem md:6rem lg:12rem xl:12rem 2xl:12rem"
src="images/banners/advancecampbanner.png"
width={1500}
height={220}
alt="advance camp banner"
/>
</div>
<div className="container flex flex-column items-center max-w-[76.875rem] lg:flex-row">

<div className="hidden lg:block">
<Image
className="w-full"
Expand Down
43 changes: 0 additions & 43 deletions templates/MeritBadgePage/ImportantInfo/index.tsx
Original file line number Diff line number Diff line change
@@ -1,53 +1,10 @@
import Link from "next/link";
import Image from "@/components/Image";
import {requirements} from '@/constants/badgerequirements';

type LandingProps = {};
interface Requirement {
badge: string;
age: string;
grade: string;
rank: string;
cost: string;
prerequisites: string;
}


const RequirementsTable: React.FC = () => {
return (
<div>
<h2 className="text-h4 font-bold my-4">Merit Badge Requirements</h2>
<table className="table-auto w-full border-collapse border border-n-300d">
<thead>
<tr>
<th title="Field #1">Merit Badge</th>
<th title="Field #2">Min. Age:</th>
<th title="Field #3">Min. Grade</th>
<th title="Field #4">Min. Rank:</th>
<th title="Field #5">Cost</th>
<th title="Field #6">Prerequisites</th>
</tr>
</thead>
<tbody>
{requirements.map((r: Requirement, index: number) => (
<tr key={index}>
<td className="border border-n-300 px-4 py-2 text-left">{r.badge}</td>
<td className="border border-n-300 px-4 py-2 text-left">{r.age}</td>
<td className="border border-n-300 px-4 py-2 text-left">{r.grade}</td>
<td className="border border-n-300 px-4 py-2 text-left">{r.rank}</td>
<td className="border border-n-300 px-4 py-2 text-left">{r.cost}</td>
<td className="border border-n-300 px-4 py-2 text-left">{r.prerequisites}</td>
</tr>
))}
</tbody>
</table>
</div>
);
};

const ImportantInfo = ({}: LandingProps) => (
<div className="container lg:py-4 2xl:py-24 py-8 md:pb-10 text-black text-justify">
<RequirementsTable />
<h2 className="text-h4 font-bold my-4">Additional Fees</h2>
<p className="text-16r mb-4">Archery, Basketry, Climbing, Indian Lore, Lifesaving, Plumbing, Programming, Search and Rescue, Robotics, Swimming, and Welding will carry an additional $30 fee. Partial Archery is $15.00</p>
<p className="text-16r mb-4"><strong>AVIATION MERIT BADGE</strong> has a different fee of $75 because scouts will be flying as a part of the badge work that day.</p>
Expand Down
4 changes: 2 additions & 2 deletions templates/MeritBadgePage/Landing/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ const Landing = ({}: LandingProps) => (
</Link>
<Link
className="px-16 py-3 bg-transparent hover:bg-orange-500 text-orange-700 font-semibold hover:text-white border border-orange-500 hover:border-transparent"
href="http://usscouts.org"
href="/requirements"
>
Check Permissions
Check Requirements
</Link>
</div>
</div>
Expand Down
52 changes: 52 additions & 0 deletions templates/RequirementsPage/Main/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import Image from "@/components/Image";
import {requirements} from '@/constants/badgerequirements';

type MainProps = {};

interface Requirement {
badge: string;
age: string;
grade: string;
rank: string;
cost: string;
prerequisites: string;
}

const RequirementsTable: React.FC = () => {
return (
<div>
<table className="table-auto w-full border-collapse border border-n-300d">
<thead>
<tr>
<th title="Field #1">Merit Badge</th>
<th title="Field #2">Min. Age:</th>
<th title="Field #3">Min. Grade</th>
<th title="Field #4">Min. Rank:</th>
<th title="Field #6">Prerequisites</th>
</tr>
</thead>
<tbody>
{requirements.map((r: Requirement, index: number) => (
<tr key={index}>
<td className="border border-n-300 px-4 py-2 text-left">{r.badge}</td>
<td className="border border-n-300 px-4 py-2 text-left">{r.age}</td>
<td className="border border-n-300 px-4 py-2 text-left">{r.grade}</td>
<td className="border border-n-300 px-4 py-2 text-left">{r.rank}</td>
<td className="border border-n-300 px-4 py-2 text-left">{r.prerequisites}</td>
</tr>
))}
</tbody>
</table>
</div>
);
};


const Main = ({}: MainProps) => (
<div className="py-20 lg:px-10 xlg:px-10 2xlg:px-20 text-black overflow-x-scroll xs:overflow-x-scroll md:overflow-x-scroll">
<h2 className="text-h4 font-bold my-4 text-center">Merit Badge Requirements</h2>
<RequirementsTable />
</div>
);

export default Main;
14 changes: 14 additions & 0 deletions templates/RequirementsPage/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"use client";

import Layout from "@/components/Layout";
import Main from "./Main";

const RequirementsPage = () => {
return (
<Layout>
<Main />
</Layout>
);
};

export default RequirementsPage;

0 comments on commit 18659d5

Please sign in to comment.