Feature updates v1.7.4: media, blog, featured content, editor nav, content blocks #11

Merged
ngu-git-admin merged 22 commits from feature/new-features into main 2026-09-27 23:37:03 +01:00
3 changed files with 55 additions and 15 deletions
Showing only changes of commit c4970af3b8 - Show all commits

View file

@ -50,6 +50,16 @@ const Get_In_Touch: TouchLink[] = [
{ label: "Contact Us", to: "/leadership#contact" }, { label: "Contact Us", to: "/leadership#contact" },
]; ];
/* Under the logo. The street address is where NGU is, not where
to send post, and says so. */
const Organization_Details = {
street: "1901 NW Blue Parkway",
cityLine: "Unity Village, MO 64065",
addressNote: "Physical address, not for mail",
nonprofit: "Next Generation of Unity is a qualified 501(c)(3) nonprofit organization.",
taxId: "33-2819320",
};
const Footer_Links = [ const Footer_Links = [
{ label: "Privacy Policy", to: "/privacy" }, { label: "Privacy Policy", to: "/privacy" },
{ label: "Terms of Service", to: "/terms" }, { label: "Terms of Service", to: "/terms" },
@ -71,18 +81,28 @@ export default function Footer() {
<footer className="py-16 px-6" style={{ background: "rgba(0, 47, 58, 0.92)" }}> <footer className="py-16 px-6" style={{ background: "rgba(0, 47, 58, 0.92)" }}>
<div className="max-w-6xl mx-auto"> <div className="max-w-6xl mx-auto">
<div className="grid grid-cols-1 md:grid-cols-12 gap-10 md:gap-8 mb-12"> <div className="grid grid-cols-1 md:grid-cols-12 gap-10 md:gap-8 mb-12">
{/* Brand */} {/* Brand and details on top, the site map across the full
<div className="md:col-span-3 flex justify-center md:justify-start"> width below them. */}
<Link to="/"> <div className="md:col-span-9 text-center md:text-left">
<img src={nguLogo} alt="Next Generation of Unity" className="h-10 w-auto" /> <Link to="/" className="inline-block">
<img src={nguLogo} alt="Next Generation of Unity" className="h-14 w-auto" />
</Link> </Link>
</div>
{/* Site map — mirrors both nav tiers */} <address className="mt-5 not-italic text-sm leading-relaxed text-white/60">
<div className="md:col-span-6 text-center md:text-left"> {Organization_Details.street}
<nav aria-label="Site map"> <br />
{Organization_Details.cityLine}
<br />
<span className="text-white/40">({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> <h2 className={headingClass}>Site Map</h2>
<ul className="grid grid-cols-2 sm:grid-cols-3 gap-x-6 gap-y-6"> <ul className="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-x-6 gap-y-6">
{PAGE_LINKS.map((page) => { {PAGE_LINKS.map((page) => {
const sections = PAGE_SECTIONS[page.path] ?? []; const sections = PAGE_SECTIONS[page.path] ?? [];
return ( return (

View file

@ -283,10 +283,10 @@ export function Card({
{links.length === 0 && ( {links.length === 0 && (
<p className="text-center font-600" style={{ color: accent }}> <p className="text-center font-600" style={{ color: accent }}>
{past {past
? "This event has concluded — thank you to everyone who joined us!" ? "This event has concluded. Thank you to everyone who joined us!"
: igHandle : igHandle
? "Registration has not opened yet, follow our instagram for more details." ? "Registration has not opened yet, follow our instagram for more details."
: "Registration has not opened yet — check back soon for more details."} : "Registration has not opened yet, check back soon for more details."}
</p> </p>
)} )}
@ -295,6 +295,9 @@ export function Card({
compact ? "gap-2" : "gap-3" compact ? "gap-2" : "gap-3"
} ${links.length === 0 ? "mt-4" : ""}`} } ${links.length === 0 ? "mt-4" : ""}`}
> >
{/* Button text takes the card's colour (the event's own,
or the band's default, teal unless the page sets one),
the same as the border, rather than the card's black. */}
{links.map(item => ( {links.map(item => (
<a <a
key={item.label} key={item.label}
@ -302,7 +305,7 @@ export function Card({
className={`rounded-xl font-700 transition-all duration-200 hover:scale-105 text-center ${ className={`rounded-xl font-700 transition-all duration-200 hover:scale-105 text-center ${
compact ? "py-2.5 px-5" : "py-2.5 px-6" compact ? "py-2.5 px-5" : "py-2.5 px-6"
}`} }`}
style={{ border: `1px solid ${color}` }} style={{ border: `1px solid ${color}`, color }}
> >
{item.label} {item.label}
</a> </a>
@ -333,7 +336,7 @@ export function Card({
className={`rounded-xl font-700 transition-all duration-200 hover:scale-105 text-center ${ className={`rounded-xl font-700 transition-all duration-200 hover:scale-105 text-center ${
compact ? "py-2.5 px-5" : "py-2.5 px-6" compact ? "py-2.5 px-5" : "py-2.5 px-6"
}`} }`}
style={{ border: `1px solid ${color}` }} style={{ border: `1px solid ${color}`, color }}
> >
Event details Event details
</Link> </Link>

View file

@ -778,6 +778,19 @@ export default function OrgListMap({ view = "map", accent = FALLBACK_COLOR }) {
const regionRefs = useRef<any>({}); const regionRefs = useRef<any>({});
const chapterRefs = useRef<any>({}); const chapterRefs = useRef<any>({});
// Where the latest hover came from. The list follows the map and
// the legend, but hovering the list itself must not move it: the
// row would slide out from under the pointer.
const hoverFromList = useRef(false);
const hoverOnMap = id => {
hoverFromList.current = false;
setHovered(id);
};
const hoverInList = id => {
hoverFromList.current = true;
setHovered(id);
};
const scrollListTo = el => { const scrollListTo = el => {
const box = listRef.current; const box = listRef.current;
if (!box || !el) return; if (!box || !el) return;
@ -788,8 +801,11 @@ export default function OrgListMap({ view = "map", accent = FALLBACK_COLOR }) {
box.scrollTo({ top: el.offsetTop - 8, behavior: "smooth" }); box.scrollTo({ top: el.offsetTop - 8, behavior: "smooth" });
}; };
// Hovering or selecting a region brings that block into view. // Hovering or selecting a region on the map or legend brings its
// block into view. After a hover in the list, nothing scrolls: not
// on the way in, and not back to the selection on the way out.
useEffect(() => { useEffect(() => {
if (hoverFromList.current) return;
const id = hovered || selected; const id = hovered || selected;
if (id) scrollListTo(regionRefs.current[id]); if (id) scrollListTo(regionRefs.current[id]);
}, [hovered, selected]); }, [hovered, selected]);
@ -838,7 +854,7 @@ export default function OrgListMap({ view = "map", accent = FALLBACK_COLOR }) {
); );
} }
const shared = { selected, setSelected, hovered, setHovered }; const shared = { selected, setSelected, hovered, setHovered: hoverOnMap };
const onMapIds = new Set(regionAreas.map(a => a.region_id)); const onMapIds = new Set(regionAreas.map(a => a.region_id));
const block = (region, indent) => ( const block = (region, indent) => (
@ -851,6 +867,7 @@ export default function OrgListMap({ view = "map", accent = FALLBACK_COLOR }) {
regionRefs={regionRefs} regionRefs={regionRefs}
chapterRefs={chapterRefs} chapterRefs={chapterRefs}
{...shared} {...shared}
setHovered={hoverInList}
/> />
); );