Colour event card buttons, add address to the footer, steady the map list
- Event cards: the link buttons (Register and the like) and "Event details" now take the card's colour for their text as well as their border: the event's own colour, or the band's default (teal unless the page sets one). They were falling back to the card's black. The two "no registration" notices lose their em-dashes. - Footer: the logo moves above the site map, a size larger, with the street address (marked as physical, not for mail) and the 501(c)(3) statement and tax ID under it. The site map spreads across the full width below, six columns on large screens. The details are one constant at the top of Footer.tsx. - Chapter map: hovering a region in the list no longer scrolls the list. The list still follows hovers and clicks on the map and the legend; a hover inside the list only highlights. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
68f08b633c
commit
c4970af3b8
3 changed files with 55 additions and 15 deletions
|
|
@ -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