Footer site map full width; side nav fits 30-character titles over full-width dividers; Timeline under Data
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
45b422641a
commit
4a1d6fd6e9
4 changed files with 59 additions and 51 deletions
|
|
@ -50,8 +50,8 @@ export default function Footer() {
|
|||
<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. */}
|
||||
{/* Brand and details, beside the socials and contact links;
|
||||
the site map spans the full width below them all. */}
|
||||
<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">
|
||||
|
|
@ -82,37 +82,6 @@ export default function Footer() {
|
|||
{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 = sectionsOf(page.path);
|
||||
return (
|
||||
<li key={page.path}>
|
||||
<Link to={page.path} className={pageLinkClass}>
|
||||
{page.label}
|
||||
</Link>
|
||||
|
||||
{sections.length > 0 && (
|
||||
<ul className="mt-1 flex flex-col">
|
||||
{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>
|
||||
|
||||
|
|
@ -158,6 +127,38 @@ export default function Footer() {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{/* Site map: every page and its sections, across the full width. */}
|
||||
<nav aria-label="Site map" className="mb-12 border-t border-white/10 pt-10">
|
||||
<h2 className={headingClass}>Site Map</h2>
|
||||
<ul className="grid grid-cols-2 gap-x-6 gap-y-6 sm:grid-cols-3 lg:grid-cols-6">
|
||||
{PAGE_LINKS.map((page) => {
|
||||
const sections = sectionsOf(page.path);
|
||||
return (
|
||||
<li key={page.path}>
|
||||
<Link to={page.path} className={pageLinkClass}>
|
||||
{page.label}
|
||||
</Link>
|
||||
|
||||
{sections.length > 0 && (
|
||||
<ul className="mt-1 flex flex-col">
|
||||
{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 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">
|
||||
|
|
|
|||
|
|
@ -105,12 +105,17 @@ export default function PageShell({ title, intro, sections, sideNav = false }: P
|
|||
if (typeof title === "string") document.title = documentTitle(title);
|
||||
}, [title]);
|
||||
|
||||
// The thin solid banner between sections. With the side nav it runs
|
||||
// the page's full width, under the nav column, rather than stopping
|
||||
// at the content's edge.
|
||||
const banner = (accent: string) => (
|
||||
<div className={`h-2 ${sideNav ? "lg:-ml-[var(--side-nav-w)]" : ""}`} style={{ background: accent }} />
|
||||
);
|
||||
const bands = sections.map((section, i) => (
|
||||
<div key={section.id}>
|
||||
{/* Thin solid banner between sections */}
|
||||
<div className="h-2" style={{ background: section.accent }} />
|
||||
{banner(section.accent)}
|
||||
<Section section={section} />
|
||||
{i === sections.length - 1 && <div className="h-2" style={{ background: section.accent }} />}
|
||||
{i === sections.length - 1 && banner(section.accent)}
|
||||
</div>
|
||||
));
|
||||
|
||||
|
|
@ -127,10 +132,10 @@ export default function PageShell({ title, intro, sections, sideNav = false }: P
|
|||
</div>
|
||||
|
||||
{sideNav ? (
|
||||
<div className="lg:grid lg:grid-cols-[13rem_minmax(0,1fr)]">
|
||||
<aside className="hidden lg:block">
|
||||
<div className="sticky pt-8 pl-6" style={{ top: "calc(var(--header-h, 5rem) + 1rem)" }}>
|
||||
<SectionNav sections={sections.map((s) => ({ id: s.id, label: s.title }))} />
|
||||
<div className="[--side-nav-w:16rem] lg:grid lg:grid-cols-[var(--side-nav-w)_minmax(0,1fr)]">
|
||||
<aside className="relative z-10 hidden lg:block">
|
||||
<div className="sticky pt-8 pl-6 pr-2" style={{ top: "calc(var(--header-h, 5rem) + 1rem)" }}>
|
||||
<SectionNav sections={sections.map((s) => ({ id: s.id, label: s.title }))} wrap />
|
||||
</div>
|
||||
</aside>
|
||||
<div className="min-w-0">{bands}</div>
|
||||
|
|
|
|||
|
|
@ -68,10 +68,10 @@ function jump(id: string) {
|
|||
document.getElementById(id)?.scrollIntoView({ behavior: scrollBehavior(), block: "start" });
|
||||
}
|
||||
|
||||
function Label({ section }: { section: EditorSection }) {
|
||||
function Label({ section, wrap }: { section: EditorSection; wrap?: boolean }) {
|
||||
return (
|
||||
<>
|
||||
<span className="truncate">{section.label}</span>
|
||||
<span className={wrap ? "" : "truncate"}>{section.label}</span>
|
||||
{section.count != null && (
|
||||
<span className="text-xs text-muted/70">({section.count})</span>
|
||||
)}
|
||||
|
|
@ -84,7 +84,9 @@ function Label({ section }: { section: EditorSection }) {
|
|||
|
||||
/* The desktop column. Place it in the grid's first track, in a cell
|
||||
that is itself sticky (see EntityEdit). */
|
||||
export function SectionNav({ sections }: { sections: EditorSection[] }) {
|
||||
/* `wrap` lets a long label run onto a second line instead of being
|
||||
cut short (the public pages' section titles, up to 30 characters). */
|
||||
export function SectionNav({ sections, wrap = false }: { sections: EditorSection[]; wrap?: boolean }) {
|
||||
const active = useActiveSection(sections);
|
||||
|
||||
return (
|
||||
|
|
@ -107,7 +109,7 @@ export function SectionNav({ sections }: { sections: EditorSection[] }) {
|
|||
: "border-transparent text-muted hover:border-brand/40 hover:text-link"
|
||||
}`}
|
||||
>
|
||||
<Label section={section} />
|
||||
<Label section={section} wrap={wrap} />
|
||||
</button>
|
||||
</li>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue