NGU-Web/src/components/Footer.tsx
Zaldimmar 499662b59a Leadership becomes the Organization page, at /organization
Three sections: Mission, Vision & Values from the national
organization record's own description and content blocks;
Leadership as that record's teams with their people; Details &
Contact with NGU's address, nonprofit status, email and the
record's contact links. /leadership answers with a 301 to
/organization (MOVED in routes/pages.js), and a page title or intro
saved for it in Site settings moves with it (migration 054).

OrganizationDetail's team list and contact buttons are now shared
components (OrgTeams, OrgContact), and NGU's address and email live
once in src/data/organizationDetails.ts for the footer, the page and
ComingSoon.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 20:30:18 -05:00

171 lines
6.7 KiB
TypeScript

import { Link } from "react-router-dom";
import { PAGE_LINKS, PAGE_SECTIONS, NAV_ACTIONS } from "../navConfig.ts";
import siteLogo from "../assets/logos/NGU_Logo.svg";
import PlatformIcon from "./PlatformIcon.tsx";
import { ORGANIZATION_DETAILS as Organization_Details } from "../data/organizationDetails.ts";
const Social_Links = [
{ label: "Instagram", href: "https://www.instagram.com/nextgenerationunity/", platform: "instagram" },
{ label: "Facebook", href: "https://www.facebook.com/NextGenerationofUnity", platform: "facebook" },
{ label: "Discord", href: "https://discord.com/invite/AtngzpqaX5", platform: "discord" },
];
// Give's destination lives in navConfig so the footer and the nav can't drift.
// Only the label differs down here.
const giveAction = NAV_ACTIONS.find((a) => a.variant === "fancy");
/* An internal route, or an off-site address opened in a new tab. */
type TouchLink = { label: string } & (
| { external?: false; to: string }
| { external: true; href: string }
);
const Get_In_Touch: TouchLink[] = [
{ label: "Feedback", to: "/feedback"},
{ label: "Request", to: "/request" },
{ label: "Contact Us", to: "/organization#contact" },
];
const Footer_Links = [
{ label: "Privacy Policy", to: "/privacy" },
{ label: "Terms of Service", to: "/terms" },
];
const footerLinkClass =
"text-white/65 hover:text-[#9cc47c] text-sm transition-colors";
const pageLinkClass =
"text-white/80 hover:text-[#9cc47c] text-sm font-semibold transition-colors";
const sectionLinkClass =
"text-white/65 hover:text-[#9cc47c] text-sm transition-colors";
const headingClass = "text-white/90 text-sm font-semibold mb-4";
export default function Footer() {
return (
<footer className="py-16 px-6" style={{ background: "#001011" }}>
<div className="max-w-6xl mx-auto">
<div className="grid grid-cols-1 md:grid-cols-12 gap-10 md:gap-8 mb-12">
{/* Brand and details on top, the site map across the full
width below them. */}
<div className="md:col-span-9 text-center md:text-left">
{/* The logo, and Give beside it. */}
<div className="flex flex-wrap items-center justify-center gap-6 md:justify-start">
<Link to="/" className="inline-block">
<img src={siteLogo} alt="Next Generation of Unity" className="h-14 w-auto" />
</Link>
{giveAction && (
<a
href={giveAction.to}
target="_blank"
rel="noopener noreferrer"
className="btn inline-block whitespace-nowrap px-6 py-2.5 text-sm text-white transition-transform duration-200 hover:-translate-y-0.5"
style={{ background: "var(--color-action)" }}
>
{giveAction.label}
</a>
)}
</div>
<address className="mt-5 not-italic text-sm leading-relaxed text-white/60">
{Organization_Details.street}
<br />
{Organization_Details.cityLine}
<br />
<span className="text-white/65">({Organization_Details.addressNote})</span>
</address>
<p className="mt-3 max-w-xl text-sm leading-relaxed text-white/60">
{Organization_Details.nonprofit} Tax ID: {Organization_Details.taxId}.
</p>
{/* Site map: mirrors both nav tiers */}
<nav aria-label="Site map" className="mt-10">
<h2 className={headingClass}>Site Map</h2>
<ul className="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-x-6 gap-y-6">
{PAGE_LINKS.map((page) => {
const sections = PAGE_SECTIONS[page.path] ?? [];
return (
<li key={page.path}>
<Link to={page.path} className={pageLinkClass}>
{page.label}
</Link>
{sections.length > 0 && (
<ul className="mt-2 flex flex-col gap-1.5">
{sections.map((section) => (
<li key={section.hash}>
<Link
to={`${page.path}${section.hash}`}
className={sectionLinkClass}
>
{section.label.replace(/^#/, "")}
</Link>
</li>
))}
</ul>
)}
</li>
);
})}
</ul>
</nav>
</div>
{/* Socials + get in touch */}
<div className="md:col-span-3 flex flex-col items-center md:items-start">
<div className="flex gap-4 mb-8">
{Social_Links.map(({ label, href, platform }) => (
<a
key={label}
href={href}
target="_blank"
rel="noopener noreferrer"
aria-label={label}
className="footer-icons w-10 h-10 btn flex items-center justify-center text-white/70 transition-colors"
style={{ background: "rgba(255,255,255,0.08)", border: "1px solid rgba(255,255,255,0.15)" }}
>
<PlatformIcon platform={platform} className="w-6 h-6" />
</a>
))}
</div>
<h2 className={headingClass}>Get in Touch</h2>
<ul className="flex flex-col gap-3">
{Get_In_Touch.map((link) => (
<li key={link.label}>
{link.external ? (
<a
href={link.href}
target="_blank"
rel="noopener noreferrer"
className={pageLinkClass}
>
{link.label}
</a>
) : (
<Link to={link.to} className={pageLinkClass}>
{link.label}
</Link>
)}
</li>
))}
</ul>
</div>
</div>
<div className="border-t border-white/10 pt-8 flex flex-col md:flex-row items-center justify-between gap-4">
<p className="text-white/65 text-sm">© 2026 Next Generation of Unity. All rights reserved.</p>
<div className="flex gap-6">
{Footer_Links.map((link) => (
<Link key={link.label} to={link.to} className={footerLinkClass}>
{link.label}
</Link>
))}
</div>
</div>
</div>
</footer>
);
}