The page (pages/, components/, styles/) is rewritten in Cottage's brand, replacing Mantine. - Brand files: tokens, fonts and component CSS copied from Hearth; logo, pod row, status pill and banner ported from the brand handbook. - Themes: light by default, dark when the OS asks. - Services: grouped; each has a status pill, uptime and 90 daily bars (30 on phones). - Bars: each bar has a text label, keyboard navigation and a day card. - Response-time chart: optional, drawn in brand colours. - Notices: colour-coded posted notices and planned maintenance. - Incident history: by month, with the brand's empty state. The check worker, D1 storage, types and Terraform are untouched, so upstream merges stay clean. uptime.config.ts lists Cottage's services (website, dashboard, apps in US East). `npm run dev` shows sample data (?sample=outage|maintenance|empty) since there's no D1. Deploys are gated on the CLOUDFLARE_DEPLOY repository variable until launch, Wrangler telemetry is off, and a Check workflow lints, type-checks and builds every pull request. Removed upstream's issue-translation workflow, funding file and translations.
24 lines
1.1 KiB
TypeScript
24 lines
1.1 KiB
TypeScript
import { Html, Head, Main, NextScript } from 'next/document'
|
|
|
|
// Cottage is light-first; dark ("evening") follows the OS setting. The tokens switch on
|
|
// data-theme, set here before first paint so there's no flash.
|
|
const themeScript = `(function(){var m=window.matchMedia('(prefers-color-scheme: dark)');function s(){document.documentElement.setAttribute('data-theme',m.matches?'dark':'light')}s();m.addEventListener('change',s)})()`
|
|
|
|
export default function Document() {
|
|
return (
|
|
<Html lang="en" data-theme="light">
|
|
<Head>
|
|
<script dangerouslySetInnerHTML={{ __html: themeScript }} />
|
|
<link rel="preload" href="/fonts/HankenGrotesk-400-700.woff2" as="font" type="font/woff2" crossOrigin="anonymous" />
|
|
<link rel="preload" href="/fonts/Fraunces-400-700.woff2" as="font" type="font/woff2" crossOrigin="anonymous" />
|
|
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
|
|
<meta name="color-scheme" content="light dark" />
|
|
</Head>
|
|
<body>
|
|
<Main />
|
|
<NextScript />
|
|
</body>
|
|
</Html>
|
|
)
|
|
}
|