Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/design-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Pages swap in place: the old page fades out and the new one in (React's `<ViewTr
Links never prefetch, whether in view or hovered (lead's choice, 2026-10-19). A page loads only once it's opened, and the fade covers the wait. `e2e/navigation.e2e.ts` checks that following a link doesn't reload the page.

## Layout shell (`web/src/features/site/`)
Header, page and footer sit on the sheet. The header is one sticky bar: wordmark, sections, search (`/`), Discord, Steam sign-in; footer: one line, community logos. Phones: wordmark, search, account, menu. Account and current section sit in `<Suspense>`, so every shell stays static. Search lives on the Players page.
Header, page and footer sit on the sheet. The header is one sticky bar: wordmark, sections, search (`/`), Steam sign-in; footer: one line, community logos. Phones: wordmark, search, account, menu. Account and current section sit in `<Suspense>`, so every shell stays static. Search lives on the Players page.

## Screenshot tests
`npm run test:ui` (part of `just check`) screenshots `/dev/ui` wide, on a phone, with the menu open and with the dialog open, and fails on any pixel change. After an intended visual change:
Expand Down
10 changes: 0 additions & 10 deletions web/src/features/site/SiteHeader.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,6 @@
background: #162332b3;
box-shadow: inset 0 0 0 1px #8cc4ff80;
}
.discord {
color: #bac8d9;
font-size: 13px;
}
.discord:hover {
color: #fff;
}
.account {
display: flex;
align-items: center;
Expand All @@ -112,9 +105,6 @@
}
}
@media (max-width: 1350px) {
.discord {
display: none;
}
.shell {
gap: 28px;
}
Expand Down
10 changes: 0 additions & 10 deletions web/src/features/site/SiteHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ import { AccountArea } from "./AccountArea";
import { HeaderSearch } from "./HeaderSearch";
import { HeaderShell } from "./HeaderShell";
import { SiteNav, SiteNavLinks } from "./SiteNav";
import { communityLinks } from "./navigation";
import styles from "./SiteHeader.module.css";

const wordmark = Play({ weight: "700", subsets: ["latin"] });
const discord = communityLinks.find((link) => link.brand === "discord")!.href;

export function SiteHeader() {
return (
Expand All @@ -32,14 +30,6 @@ export function SiteHeader() {
<HeaderSearch />
</Suspense>
</div>
<a
href={discord}
target="_blank"
rel="noreferrer"
className={styles.discord}
>
Discord
</a>
<div className={styles.account}>
<Suspense>
<AccountArea />
Expand Down
12 changes: 2 additions & 10 deletions web/src/features/site/SiteNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { usePathname } from "next/navigation";
import { Link } from "@/ui/Link";
import { communityLinks, isCurrent } from "./navigation";
import { isCurrent } from "./navigation";
import styles from "./SiteHeader.module.css";

const navigation = [
Expand All @@ -12,7 +12,6 @@ const navigation = [
{ href: "/players", label: "Players" },
{ href: "/servers", label: "Servers" },
];
const discord = communityLinks.find((link) => link.brand === "discord")!.href;

export function SiteNav({ mobile = false }: { mobile?: boolean }) {
return <SiteNavLinks pathname={usePathname()} mobile={mobile} />;
Expand Down Expand Up @@ -40,14 +39,7 @@ export function SiteNavLinks({
{label}
</Link>
))}
{mobile && (
<>
<Link href="/ruleset">Ruleset</Link>
<a href={discord} target="_blank" rel="noreferrer">
Discord
</a>
</>
)}
{mobile && <Link href="/ruleset">Ruleset</Link>}
</nav>
);
}