Skip to content

Commit 0f49760

Browse files
committed
Move all content to page components.
Removes data and data-types folder. Instead, each page just initializes variables and passes them to the components. Brand config is shared via file _brandConfig. The underscore acts as a ignore for routing. Moves the content pages to the pages directory as well for an easier mental model.
1 parent 3f8da65 commit 0f49760

27 files changed

Lines changed: 237 additions & 199 deletions

src/data-models/brand.ts renamed to src/components/foundations/BrandTokens/BrandToken.types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { SocialPlatform } from "@/data-models/social";
1+
export type SocialPlatform = "github" | "twitter" | "linkedin";
22

33
export interface BrandColorScale {
44
"50": string;

src/components/foundations/BrandTokens/BrandTokens.stories.tsx

Lines changed: 101 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,111 @@
11
import type { Meta, StoryObj } from "@storybook/react";
2+
import type { BrandConfig } from "./BrandToken.types";
3+
import { BrandTokens } from "./BrandTokens";
4+
5+
export const brandConfig: BrandConfig = {
6+
identity: {
7+
siteName: "Idol or Bust!",
8+
tagline: "Simple website software for research projects",
9+
siteUrl: "https://riehlegroup.github.io",
10+
language: "en",
11+
locale: "en_US",
12+
logoPath: "/apple-touch-icon.png",
13+
faviconPath: "/favicon.svg",
14+
appleTouchIconPath: "/apple-touch-icon.png",
15+
manifestPath: "/site.webmanifest",
16+
defaultOgImagePath: "/og-image.png",
17+
},
18+
organization: {
19+
name: "Idol or Bust",
20+
legalName: "Idol or Bust Research Project",
21+
socialProfiles: ["https://github.com/riehlegroup/idolbust"],
22+
},
23+
theme: {
24+
primary: {
25+
"50": "239 246 255",
26+
"100": "219 234 254",
27+
"200": "191 219 254",
28+
"300": "147 197 253",
29+
"400": "96 165 250",
30+
"500": "59 130 246",
31+
"600": "37 99 235",
32+
"700": "29 78 216",
33+
"800": "30 64 175",
34+
"900": "30 58 138",
35+
"950": "23 37 84",
36+
},
37+
secondary: {
38+
"50": "248 250 252",
39+
"100": "241 245 249",
40+
"200": "226 232 240",
41+
"300": "203 213 225",
42+
"400": "148 163 184",
43+
"500": "100 116 139",
44+
"600": "71 85 105",
45+
"700": "51 65 85",
46+
"800": "30 41 59",
47+
"900": "15 23 42",
48+
"950": "2 6 23",
49+
},
50+
themeColor: "#2563eb",
51+
fonts: {
52+
sans: ["Inter", "system-ui", "sans-serif"],
53+
mono: ["JetBrains Mono", "monospace"],
54+
},
55+
},
56+
designTokens: {
57+
colors: {
58+
story:
59+
"Use primary for calls to action and links, secondary for typography and surface contrast. Keep primary usage focused to preserve emphasis.",
60+
roles: [
61+
{ name: "primary", description: "CTAs, links, active states." },
62+
{
63+
name: "secondary",
64+
description: "Text, borders, neutral backgrounds.",
65+
},
66+
],
67+
},
68+
typeScale: {
69+
story:
70+
"Rely on Tailwind's default type scale for now; adjust later if brand voice changes.",
71+
source: "tailwind-default",
72+
},
73+
spacing: {
74+
story:
75+
"Use Tailwind's default spacing scale to keep layout consistent and predictable.",
76+
source: "tailwind-default",
77+
},
78+
},
79+
links: {
80+
primaryCtas: [
81+
{ label: "Learn More", href: "/about" },
82+
{ label: "Read Blog", href: "/blog" },
83+
],
84+
appLinks: [],
85+
social: [
86+
{ platform: "github", url: "https://github.com/riehlegroup/idolbust" },
87+
],
88+
},
89+
seo: {
90+
titleTemplate: "%s | {siteName}",
91+
defaultDescription:
92+
"Simple website software for research projects that want to understand their user needs",
93+
robots: "index,follow",
94+
twitterCard: "summary_large_image",
95+
},
96+
blog: {
97+
title: "Idol or Bust Blog",
98+
description:
99+
"Latest updates and insights from the Idol or Bust research project.",
100+
},
101+
};
2102

3-
import { BRAND_CONFIG } from "@/data/brand";
4-
import { BrandTokens } from "@/components";
5103

6104
const meta = {
7105
title: "Foundations/Brand Tokens",
8106
component: BrandTokens,
9107
args: {
10-
brand: BRAND_CONFIG,
108+
brand: brandConfig,
11109
},
12110
parameters: {
13111
layout: "padded",

src/components/foundations/BrandTokens/BrandTokens.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { CSSProperties, ReactElement } from "react";
22

3-
import type { BrandColorScale, BrandConfig } from "@/data-models/brand";
3+
import type { BrandColorScale, BrandConfig } from "./BrandToken.types";
44

55
export interface BrandTokensProps {
66
brand: BrandConfig;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export { BrandTokens } from "./BrandTokens";
22
export type { BrandTokensProps } from "./BrandTokens";
3+
export * from "./BrandToken.types";

src/components/templates/AboutTemplate/AboutTemplate.types.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type { AboutSection, TeamMember } from "@/data-models/about";
21
import type { SocialLink } from "@/components/organisms/SocialLinks";
32

43
export interface AboutTemplateProps {
@@ -13,3 +12,15 @@ export interface AboutTemplateProps {
1312
socialLabel: string;
1413
socialLinks: readonly SocialLink[];
1514
}
15+
16+
export interface AboutSection {
17+
title: string;
18+
body: string;
19+
}
20+
21+
export interface TeamMember {
22+
name: string;
23+
role: string;
24+
image?: string;
25+
bio?: string;
26+
}

src/content.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { defineCollection, z } from "astro:content";
22
import { glob } from "astro/loaders";
33

44
const blog = defineCollection({
5-
loader: glob({ pattern: "**/*.{md,mdx}", base: "./src/content/blog" }),
5+
loader: glob({ pattern: "**/*.{md,mdx}", base: "./src/pages/blog/_articles" }),
66
schema: z.object({
77
title: z.string(),
88
description: z
@@ -23,7 +23,7 @@ const blog = defineCollection({
2323
});
2424

2525
const resources = defineCollection({
26-
loader: glob({ pattern: "**/*.{md,mdx}", base: "./src/content/resources" }),
26+
loader: glob({ pattern: "**/*.{md,mdx}", base: "./src/pages/resources/_articles" }),
2727
schema: z.object({
2828
title: z.string(),
2929
description: z

src/data-models/about.ts

Lines changed: 0 additions & 25 deletions
This file was deleted.

src/data-models/blog.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/data-models/home.ts

Lines changed: 0 additions & 27 deletions
This file was deleted.

src/data-models/resources.ts

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)