Skip to content
Open
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
29 changes: 28 additions & 1 deletion packages/marketing/content-collections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,33 @@ function transformWikiLinks(content: string): string {
});
}

const pages = defineCollection({
name: "pages",
directory: "./src/pages",
include: "**/*.mdx",
schema: z.object({
title: z.string(),
description: z.string().optional(),
content: z.string(),
}),
transform: async (document, context) => {
const mdx = await compileMDX(context, document, {
remarkPlugins: [remarkGfm],
rehypePlugins: [
rehypeSlug,
[rehypeAutolinkHeadings, { behavior: "wrap" }],
[rehypePrettyCode, { theme: "github-dark" }],
],
});

return {
...document,
slug: document._meta.path,
mdx,
};
},
});

const posts = defineCollection({
name: "posts",
directory: "./src/content",
Expand Down Expand Up @@ -81,5 +108,5 @@ const posts = defineCollection({
});

export default defineConfig({
collections: [posts],
collections: [pages, posts],
});
17 changes: 17 additions & 0 deletions packages/marketing/src/components/ui/navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ export function NavBar() {
LaxDB
</Link>
<nav className="hidden items-center gap-6 text-sm sm:flex">
<Link className="text-foreground hover:underline" to="/about">
About
</Link>
<Link className="text-foreground hover:underline" to="/blog">
Blog
</Link>
Expand Down Expand Up @@ -56,6 +59,20 @@ export function NavBar() {
)}
>
<ul className="space-y-4">
<li
onClick={() => {
setOpen(false);
}}
onKeyDown={(e) => {
if (e.key === "Enter" || e.key === " ") {
setOpen(false);
}
}}
>
<Link className="hover:underline" to="/about">
About
</Link>
</li>
<li
onClick={() => {
setOpen(false);
Expand Down
20 changes: 20 additions & 0 deletions packages/marketing/src/pages/about.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: About LaxDB
description: LaxDB is the comprehensive lacrosse data platform, unifying statistics from PLL, NLL, MLL, MSL, and WLA.
---

LaxDB is a project to collect, preserve, and share professional lacrosse statistics.

Professional lacrosse has a rich history spanning decades, but much of this data has been scattered across league websites, archived pages, and fading memories. LaxDB exists to bring it all together.

We're building a comprehensive database covering the PLL, NLL, MLL, MSL, and WLA—player stats, game results, standings, and historical records, all in one place.

## Why we're building this

The sport deserves better. Fans, analysts, and researchers shouldn't have to dig through the Wayback Machine to find out who led the MLL in scoring in 2012. That information should be accessible, searchable, and connected.

## Open source

We believe lacrosse information should be open. The statistics themselves aren't ours to gatekeep—they belong to the sport's history. Our goal is simply to make them useful.

If you're interested in contributing, have corrections, or want to use the information for research, reach out. We're always looking for help expanding coverage and improving accuracy.
22 changes: 22 additions & 0 deletions packages/marketing/src/pages/brand.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: Brand Guidelines
description: Guidelines for using the LaxDB name and logo.
---

Guidelines for using the LaxDB name and logo.

## Logo

The LaxDB logo is a simple circle mark. Use the dark version on light backgrounds and the light version on dark backgrounds.

## Name

"LaxDB" is one word with a capital L and capital DB. Not "Lax DB", "LAXDB", or "laxdb".

## Colors

We use a neutral palette—black, white, and grays. The brand intentionally avoids bright accent colors to keep the focus on the content.

## Usage

Feel free to use our logo and name when referencing LaxDB. Don't modify the logo or use it in ways that suggest endorsement without permission.
42 changes: 42 additions & 0 deletions packages/marketing/src/routeTree.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.

import { Route as rootRouteImport } from './routes/__root'
import { Route as BrandRouteImport } from './routes/brand'
import { Route as AboutRouteImport } from './routes/about'
import { Route as IndexRouteImport } from './routes/index'
import { Route as WikiIndexRouteImport } from './routes/wiki/index'
import { Route as GraphIndexRouteImport } from './routes/graph/index'
Expand All @@ -19,6 +21,16 @@ import { Route as BlogWikiRouteImport } from './routes/blog/wiki'
import { Route as BlogOpinionRouteImport } from './routes/blog/opinion'
import { Route as BlogSlugRouteImport } from './routes/blog/$slug'

const BrandRoute = BrandRouteImport.update({
id: '/brand',
path: '/brand',
getParentRoute: () => rootRouteImport,
} as any)
const AboutRoute = AboutRouteImport.update({
id: '/about',
path: '/about',
getParentRoute: () => rootRouteImport,
} as any)
const IndexRoute = IndexRouteImport.update({
id: '/',
path: '/',
Expand Down Expand Up @@ -67,6 +79,8 @@ const BlogSlugRoute = BlogSlugRouteImport.update({

export interface FileRoutesByFullPath {
'/': typeof IndexRoute
'/about': typeof AboutRoute
'/brand': typeof BrandRoute
'/blog/$slug': typeof BlogSlugRoute
'/blog/opinion': typeof BlogOpinionRoute
'/blog/wiki': typeof BlogWikiRoute
Expand All @@ -78,6 +92,8 @@ export interface FileRoutesByFullPath {
}
export interface FileRoutesByTo {
'/': typeof IndexRoute
'/about': typeof AboutRoute
'/brand': typeof BrandRoute
'/blog/$slug': typeof BlogSlugRoute
'/blog/opinion': typeof BlogOpinionRoute
'/blog/wiki': typeof BlogWikiRoute
Expand All @@ -90,6 +106,8 @@ export interface FileRoutesByTo {
export interface FileRoutesById {
__root__: typeof rootRouteImport
'/': typeof IndexRoute
'/about': typeof AboutRoute
'/brand': typeof BrandRoute
'/blog/$slug': typeof BlogSlugRoute
'/blog/opinion': typeof BlogOpinionRoute
'/blog/wiki': typeof BlogWikiRoute
Expand All @@ -103,6 +121,8 @@ export interface FileRouteTypes {
fileRoutesByFullPath: FileRoutesByFullPath
fullPaths:
| '/'
| '/about'
| '/brand'
| '/blog/$slug'
| '/blog/opinion'
| '/blog/wiki'
Expand All @@ -114,6 +134,8 @@ export interface FileRouteTypes {
fileRoutesByTo: FileRoutesByTo
to:
| '/'
| '/about'
| '/brand'
| '/blog/$slug'
| '/blog/opinion'
| '/blog/wiki'
Expand All @@ -125,6 +147,8 @@ export interface FileRouteTypes {
id:
| '__root__'
| '/'
| '/about'
| '/brand'
| '/blog/$slug'
| '/blog/opinion'
| '/blog/wiki'
Expand All @@ -137,6 +161,8 @@ export interface FileRouteTypes {
}
export interface RootRouteChildren {
IndexRoute: typeof IndexRoute
AboutRoute: typeof AboutRoute
BrandRoute: typeof BrandRoute
BlogSlugRoute: typeof BlogSlugRoute
BlogOpinionRoute: typeof BlogOpinionRoute
BlogWikiRoute: typeof BlogWikiRoute
Expand All @@ -149,6 +175,20 @@ export interface RootRouteChildren {

declare module '@tanstack/react-router' {
interface FileRoutesByPath {
'/brand': {
id: '/brand'
path: '/brand'
fullPath: '/brand'
preLoaderRoute: typeof BrandRouteImport
parentRoute: typeof rootRouteImport
}
'/about': {
id: '/about'
path: '/about'
fullPath: '/about'
preLoaderRoute: typeof AboutRouteImport
parentRoute: typeof rootRouteImport
}
'/': {
id: '/'
path: '/'
Expand Down Expand Up @@ -217,6 +257,8 @@ declare module '@tanstack/react-router' {

const rootRouteChildren: RootRouteChildren = {
IndexRoute: IndexRoute,
AboutRoute: AboutRoute,
BrandRoute: BrandRoute,
BlogSlugRoute: BlogSlugRoute,
BlogOpinionRoute: BlogOpinionRoute,
BlogWikiRoute: BlogWikiRoute,
Expand Down
36 changes: 36 additions & 0 deletions packages/marketing/src/routes/about.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { createFileRoute, notFound } from "@tanstack/react-router";
import { allPages } from "content-collections";

import { MDXContent } from "@/components/mdx-content";

export const Route = createFileRoute("/about")({
loader: () => {
const page = allPages.find((p) => p.slug === "about");
if (!page) throw notFound();
return page;
},
component: AboutPage,
head: () => ({
meta: [
{ title: "About | LaxDB" },
{
name: "description",
content:
"LaxDB is the comprehensive lacrosse data platform, unifying statistics from PLL, NLL, MLL, MSL, and WLA.",
},
],
}),
});

function AboutPage() {
const page = Route.useLoaderData();

return (
<main className="mx-auto max-w-screen-sm px-4 py-16 md:py-32">
<article>
<h1 className="font-serif text-2xl text-blog-fg italic">{page.title}</h1>
<MDXContent code={page.mdx} className="prose-blog prose mt-8 max-w-none" />
</article>
</main>
);
}
35 changes: 35 additions & 0 deletions packages/marketing/src/routes/brand.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { createFileRoute, notFound } from "@tanstack/react-router";
import { allPages } from "content-collections";

import { MDXContent } from "@/components/mdx-content";

export const Route = createFileRoute("/brand")({
loader: () => {
const page = allPages.find((p) => p.slug === "brand");
if (!page) throw notFound();
return page;
},
component: BrandPage,
head: () => ({
meta: [
{ title: "Brand Guidelines | LaxDB" },
{
name: "description",
content: "Guidelines for using the LaxDB name and logo.",
},
],
}),
});

function BrandPage() {
const page = Route.useLoaderData();

return (
<main className="mx-auto max-w-screen-sm px-4 py-16 md:py-32">
<article>
<h1 className="font-serif text-2xl text-blog-fg italic">{page.title}</h1>
<MDXContent code={page.mdx} className="prose-blog prose mt-8 max-w-none" />
</article>
</main>
);
}
Loading