mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
## What Adds an optional `theme: 'light'` setting for go pages. When set, the page switches the root theme to light (`data-theme="light"` on `<html>`, restored on unmount) and renders on a white background, so the white HubSpot meetings embed no longer contrasts with a dark page. Pages that don't set it are unchanged. The root element has to be switched because the semantic color tokens are derived at `:root`, so a wrapper class alone leaves text light-on-white. Turns it on for `/go/aws-reinvent/schedule`. Also loads HubSpot's embed script as a plain `<script>` tag right after the container (as in HubSpot's snippet) instead of `next/script`, which loads after page load. Files changed: - `packages/marketing/src/go/schemas.ts`: optional `theme` field on the page schema - `apps/www/components/Go/ForceLightTheme.tsx`: sets the light theme on `<html>` while mounted - `apps/www/components/Go/GoPageRenderer.tsx`: uses it when `theme` is `'light'` - `apps/www/_go/events/aws-reinvent-2026/schedule.tsx`: sets `theme: 'light'`, plain embed script tag ## Review instructions Open `/go/aws-reinvent/schedule`: the page should be white with readable text, and the HubSpot calendar should load below the Growth Leads cards. Open another go page and confirm it is unchanged. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Wendie Cheung <wendie.cheung@supabase.io> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
56 lines
2.0 KiB
TypeScript
56 lines
2.0 KiB
TypeScript
import supabaseLogoIcon from 'common/assets/images/supabase-logo-icon.png'
|
|
import { GoPageRenderer as MarketingPageRenderer } from 'marketing'
|
|
import type { CustomSectionRenderers } from 'marketing'
|
|
import Image from 'next/image'
|
|
import Link from 'next/link'
|
|
import { SkipToContent } from 'ui-patterns/SkipToContent'
|
|
|
|
import { ForceLightTheme } from './ForceLightTheme'
|
|
import TweetsSection from './TweetsSection'
|
|
import type { GoPage } from '@/types/go'
|
|
|
|
const customRenderers: CustomSectionRenderers = {
|
|
tweets: TweetsSection,
|
|
}
|
|
|
|
// eslint-disable-next-line
|
|
export default function GoPageRenderer({ page }: { page: GoPage }) {
|
|
const isLight = 'theme' in page && page.theme === 'light'
|
|
|
|
return (
|
|
<div className={isLight ? 'bg-white' : undefined}>
|
|
{isLight && <ForceLightTheme />}
|
|
<SkipToContent href="#main" />
|
|
<nav className="absolute top-0 left-0 right-0 z-10">
|
|
<div className="max-w-7xl mx-auto flex items-center h-14 px-8">
|
|
<Link href="/">
|
|
<Image src={supabaseLogoIcon} width={24} height={24} alt="Supabase" priority />
|
|
<span className="sr-only">Supabase</span>
|
|
</Link>
|
|
</div>
|
|
</nav>
|
|
|
|
<main
|
|
id="main"
|
|
tabIndex={-1}
|
|
className="relative min-h-screen scroll-mt-14 pb-16 outline-hidden sm:pb-24"
|
|
>
|
|
<MarketingPageRenderer page={page} customRenderers={customRenderers} />
|
|
</main>
|
|
<footer className="border-t border-muted">
|
|
<div className="max-w-7xl mx-auto flex flex-col sm:flex-row items-center justify-between gap-2 py-4 sm:h-14 px-8 text-sm text-foreground-lighter">
|
|
<span>© {new Date().getFullYear()} Supabase Inc.</span>
|
|
<div className="flex gap-6">
|
|
<Link href="/privacy" className="hover:text-foreground transition-colors">
|
|
Privacy Policy
|
|
</Link>
|
|
<Link href="/terms" className="hover:text-foreground transition-colors">
|
|
Terms of Service
|
|
</Link>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
</div>
|
|
)
|
|
}
|