Skip to content

Commit d5a19bf

Browse files
creilly11235claude
authored andcommitted
feat(apollo-vertex): load Inter font via next/font and add registry:font item
Inter was declared in theme CSS variables but never actually loaded, causing the browser to fall back to system fonts. Use next/font/google with variable: "--font-sans" following the shadcn pattern, and move font declarations out of theme cssVars into a separate registry:font item so consumers can swap fonts independently. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0e217e5 commit d5a19bf

4 files changed

Lines changed: 34 additions & 8 deletions

File tree

.github/workflows/apollo-vertex-lint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
- "apps/apollo-vertex/**"
88
- ".github/workflows/apollo-vertex-lint.yml"
99

10+
env:
11+
GH_NPM_REGISTRY_TOKEN: ${{ secrets.GH_NPM_REGISTRY_TOKEN }}
12+
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
13+
1014
concurrency:
1115
group: vertex-lint-${{ github.ref }}
1216
cancel-in-progress: true

.github/workflows/commit-lint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
pull_request:
55
types: [opened, edited, synchronize, reopened]
66

7+
env:
8+
GH_NPM_REGISTRY_TOKEN: ${{ secrets.GH_NPM_REGISTRY_TOKEN }}
9+
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
10+
711
jobs:
812
commitlint:
913
name: Validate Commit Messages

apps/apollo-vertex/app/layout.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
1+
import { Inter } from "next/font/google";
2+
import Image from "next/image";
13
import { Head } from "nextra/components";
24
import { getPageMap } from "nextra/page-map";
35
import { Footer, Layout, Navbar } from "nextra-theme-docs";
46
import "nextra-theme-docs/style.css";
5-
import Image from "next/image";
67
import type { ReactNode } from "react";
78
import "./globals.css";
89
import { Analytics } from "@vercel/analytics/next";
910
import { ThemeSwitcher } from "./_components/theme-switcher";
1011
import { ThemeWrapper } from "./_components/theme-wrapper";
1112

13+
const fontSans = Inter({
14+
subsets: ["latin"],
15+
variable: "--font-sans",
16+
display: "swap",
17+
});
18+
1219
export const metadata = {
1320
title: {
1421
default: "Apollo Vertex",
@@ -73,6 +80,7 @@ export default async function RootLayout({
7380
<html
7481
lang="en"
7582
dir="ltr"
83+
className={fontSans.variable}
7684
// Suggested by `next-themes` package https://github.com/pacocoursey/next-themes#with-app
7785
suppressHydrationWarning
7886
>

apps/apollo-vertex/registry.json

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"title": "Apollo Vertex Theme",
1010
"description": "Apollo Vertex design system tokens — colors, typography, spacing, shadows, and easing functions with light and dark mode support.",
1111
"dependencies": ["tw-animate-css"],
12+
"registryDependencies": ["font-inter"],
1213
"cssVars": {
1314
"theme": {
1415
"radius-sm": "calc(var(--radius) - 4px)",
@@ -64,7 +65,8 @@
6465
"color-sidebar-accent": "var(--sidebar-accent)",
6566
"color-sidebar-accent-foreground": "var(--sidebar-accent-foreground)",
6667
"color-sidebar-border": "var(--sidebar-border)",
67-
"color-sidebar-ring": "var(--sidebar-ring)"
68+
"color-sidebar-ring": "var(--sidebar-ring)",
69+
"font-sans": "var(--font-sans)"
6870
},
6971
"light": {
7072
"background": "oklch(1 0 89.8800)",
@@ -118,9 +120,6 @@
118120
"sidebar-accent-foreground": "oklch(0.1660 0.0283 203.3380)",
119121
"sidebar-border": "oklch(0.9237 0.0133 262.3780)",
120122
"sidebar-ring": "oklch(0.64 0.115 208)",
121-
"font-sans": "Inter, ui-sans-serif, sans-serif, system-ui",
122-
"font-serif": "IBM Plex Serif, ui-serif, serif",
123-
"font-mono": "IBM Plex Mono, ui-monospace, monospace",
124123
"radius": "0.625rem",
125124
"shadow-x": "0",
126125
"shadow-y": "0px",
@@ -207,9 +206,6 @@
207206
"sidebar-accent-foreground": "oklch(0.9525 0.0110 225.9830)",
208207
"sidebar-border": "oklch(0.9525 0.0110 225.9830)",
209208
"sidebar-ring": "oklch(0.69 0.112 207)",
210-
"font-sans": "Inter, ui-sans-serif, sans-serif, system-ui",
211-
"font-serif": "IBM Plex Serif, ui-serif, serif",
212-
"font-mono": "IBM Plex Mono, ui-monospace, monospace",
213209
"radius": "0.625rem",
214210
"shadow-x": "0",
215211
"shadow-y": "0px",
@@ -231,6 +227,20 @@
231227
}
232228
}
233229
},
230+
{
231+
"name": "font-inter",
232+
"type": "registry:font",
233+
"title": "Inter Font",
234+
"description": "Inter font configuration for Apollo Vertex. Sets --font-sans CSS variable.",
235+
"font": {
236+
"family": "Inter",
237+
"provider": "google",
238+
"import": "Inter",
239+
"variable": "--font-sans",
240+
"subsets": ["latin"],
241+
"dependency": "@fontsource-variable/inter"
242+
}
243+
},
234244
{
235245
"name": "accordion",
236246
"type": "registry:ui",

0 commit comments

Comments
 (0)