From 24db36aee298c82fc58276d568dbcf8859043c1f Mon Sep 17 00:00:00 2001 From: zasbu <136494048+zasbu@users.noreply.github.com> Date: Mon, 9 Nov 2026 21:24:22 +1100 Subject: [PATCH 1/3] Center the site on a continuous background --- web/e2e/maps-cards.e2e.ts | 2 +- web/src/app/globals.css | 2 +- web/src/app/layout.tsx | 33 +++++------------------- web/src/features/maps/MapCard.module.css | 2 +- web/src/features/site/SiteFooter.tsx | 2 +- web/src/features/site/SiteHeader.tsx | 4 +-- web/src/ui/tokens.css | 11 +++----- 7 files changed, 16 insertions(+), 40 deletions(-) diff --git a/web/e2e/maps-cards.e2e.ts b/web/e2e/maps-cards.e2e.ts index 41c1a80..6950038 100644 --- a/web/e2e/maps-cards.e2e.ts +++ b/web/e2e/maps-cards.e2e.ts @@ -212,7 +212,7 @@ test("cards keep complete names and long times inside at every breakpoint", asyn (element) => getComputedStyle(element).gridTemplateColumns.split(" ").length, ); - expect(columns).toBe(width === 1920 ? 5 : 4); + expect(columns).toBe(4); } } }); diff --git a/web/src/app/globals.css b/web/src/app/globals.css index 36e617d..f71680b 100644 --- a/web/src/app/globals.css +++ b/web/src/app/globals.css @@ -23,7 +23,7 @@ cursor: pointer; } - /* The window either side of the sheet; pages sit on the sheet (the root layout). */ + /* One background across the viewport, with centered content in the root layout. */ body { background: var(--color-gutter); color: var(--color-text); diff --git a/web/src/app/layout.tsx b/web/src/app/layout.tsx index 71fcdae..e82a601 100644 --- a/web/src/app/layout.tsx +++ b/web/src/app/layout.tsx @@ -1,9 +1,7 @@ // Root layout: fonts, global styles, the header and footer, the run dialog, and site-wide metadata. import type { Metadata } from "next"; -import Image from "next/image"; import { Exo_2, Geist } from "next/font/google"; import { Suspense } from "react"; -import art from "@/features/site/header-interloper.webp"; import { RunDialogHost } from "@/features/runs/RunDialogHost"; import { SiteFooter } from "@/features/site/SiteFooter"; import { SiteHeader } from "@/features/site/SiteHeader"; @@ -39,33 +37,14 @@ export default function RootLayout({ children }: LayoutProps<"/">) { > - {/* What shows in the gutters either side of the sheet: the header's map picture, blurred and darkened - far back, fixed while the page scrolls. Blurred anyway, so a small copy of it is plenty. */} -
- -
-
- {/* The sheet, as the old sourcejump.net had it: one column down the middle of the window, edges lit, - holding the header, the page and the footer, the gutters either side. */} -
- {/* The header and page fill at least the window, so the footer starts right at the fold: the page - always scrolls, and the scrollbar doesn't come and go between short and long pages. The space - above the footer is padding in here, not a margin on the footer, so it doesn't push it lower. */} -
- -
{children}
+ {/* Keep the footer below the fold so short pages don't change the scrollbar width. */} +
+ +
+ {children}
-
+ {/* The run dialog, over whichever page opened it (`?run=` in the address). */} diff --git a/web/src/features/maps/MapCard.module.css b/web/src/features/maps/MapCard.module.css index 9184898..439d25a 100644 --- a/web/src/features/maps/MapCard.module.css +++ b/web/src/features/maps/MapCard.module.css @@ -96,7 +96,7 @@ } } -@container (min-width: 76rem) { +@container (min-width: 68rem) { .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } diff --git a/web/src/features/site/SiteFooter.tsx b/web/src/features/site/SiteFooter.tsx index cd3b277..47149cb 100644 --- a/web/src/features/site/SiteFooter.tsx +++ b/web/src/features/site/SiteFooter.tsx @@ -9,7 +9,7 @@ import { communityLinks } from "./navigation"; export function SiteFooter() { return (