website: redesign part 13

This commit is contained in:
nym21
2026-06-07 00:54:50 +02:00
parent 6cbe09af23
commit c68d1d1fda
33 changed files with 855 additions and 341 deletions
+3 -7
View File
@@ -5,9 +5,9 @@ import { createLearnPage } from "./learn/index.js";
const pages = [
{ pathname: "/", createPage: createHomePage },
{ pathname: "/explore", label: "Explore", createPage: createExplorePage },
{ pathname: "/learn", label: "Learn", createPage: createLearnPage },
{ pathname: "/build", label: "Build", createPage: createBuildPage },
{ pathname: "/explore", createPage: createExplorePage },
{ pathname: "/learn", createPage: createLearnPage },
{ pathname: "/build", createPage: createBuildPage },
];
/** @type {Record<string, () => HTMLElement>} */
@@ -15,10 +15,6 @@ const routes = Object.fromEntries(
pages.map(({ pathname, createPage }) => [pathname, createPage]),
);
export const primaryRoutes = pages.flatMap(({ pathname, label }) =>
label ? [{ pathname, label }] : [],
);
/** @param {string} pathname */
export function isRoute(pathname) {
return pathname in routes;