Feature updates v1.7.4: media, blog, featured content, editor nav, content blocks #11
3 changed files with 55 additions and 15 deletions
|
|
@ -50,6 +50,16 @@ const Get_In_Touch: TouchLink[] = [
|
|||
{ 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 = [
|
||||
{ label: "Privacy Policy", to: "/privacy" },
|
||||
{ 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)" }}>
|
||||
<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 */}
|
||||
<div className="md:col-span-3 flex justify-center md:justify-start">
|
||||
<Link to="/">
|
||||
<img src={nguLogo} alt="Next Generation of Unity" className="h-10 w-auto" />
|
||||
{/* 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">
|
||||
<Link to="/" className="inline-block">
|
||||
<img src={nguLogo} alt="Next Generation of Unity" className="h-14 w-auto" />
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
{/* Site map — mirrors both nav tiers */}
|
||||
<div className="md:col-span-6 text-center md:text-left">
|
||||
<nav aria-label="Site map">
|
||||
<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/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>
|
||||
<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) => {
|
||||
const sections = PAGE_SECTIONS[page.path] ?? [];
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -283,10 +283,10 @@ export function Card({
|
|||
{links.length === 0 && (
|
||||
<p className="text-center font-600" style={{ color: accent }}>
|
||||
{past
|
||||
? "This event has concluded — thank you to everyone who joined us!"
|
||||
? "This event has concluded. Thank you to everyone who joined us!"
|
||||
: igHandle
|
||||
? "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>
|
||||
)}
|
||||
|
||||
|
|
@ -295,6 +295,9 @@ export function Card({
|
|||
compact ? "gap-2" : "gap-3"
|
||||
} ${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 => (
|
||||
<a
|
||||
key={item.label}
|
||||
|
|
@ -302,7 +305,7 @@ export function Card({
|
|||
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"
|
||||
}`}
|
||||
style={{ border: `1px solid ${color}` }}
|
||||
style={{ border: `1px solid ${color}`, color }}
|
||||
>
|
||||
{item.label}
|
||||
</a>
|
||||
|
|
@ -333,7 +336,7 @@ export function Card({
|
|||
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"
|
||||
}`}
|
||||
style={{ border: `1px solid ${color}` }}
|
||||
style={{ border: `1px solid ${color}`, color }}
|
||||
>
|
||||
Event details
|
||||
</Link>
|
||||
|
|
|
|||
|
|
@ -778,6 +778,19 @@ export default function OrgListMap({ view = "map", accent = FALLBACK_COLOR }) {
|
|||
const regionRefs = 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 box = listRef.current;
|
||||
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" });
|
||||
};
|
||||
|
||||
// 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(() => {
|
||||
if (hoverFromList.current) return;
|
||||
const id = hovered || selected;
|
||||
if (id) scrollListTo(regionRefs.current[id]);
|
||||
}, [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 block = (region, indent) => (
|
||||
|
|
@ -851,6 +867,7 @@ export default function OrgListMap({ view = "map", accent = FALLBACK_COLOR }) {
|
|||
regionRefs={regionRefs}
|
||||
chapterRefs={chapterRefs}
|
||||
{...shared}
|
||||
setHovered={hoverInList}
|
||||
/>
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue