mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-07-30 17:59:13 -04:00
- Introduced `capture-search.mjs` script for end-to-end mobile search flow captures. - Added `SearchDemo` scene as a Remotion composition for the home-page hero clip. - Integrated dynamic video selection based on theme in `home/search-demo.tsx` component. - Included `fetch-media.mjs` script for fetching demo assets during build. - Enabled optional email verification bypass for local captures (`dev-flags.ts`). - Updated related documentation and scripts for media creation and deployment.
78 lines
3.4 KiB
TypeScript
78 lines
3.4 KiB
TypeScript
import clsx from 'clsx'
|
||
import {ENV_CONFIG} from 'common/envs/constants'
|
||
import {IS_DEPLOYED} from 'common/hosting/constants'
|
||
import {Head, Html, Main, NextScript} from 'next/document'
|
||
import Script from 'next/script'
|
||
|
||
declare global {
|
||
interface Window {
|
||
AndroidBridge?: {
|
||
downloadFile: (filename: string, content: string) => void
|
||
getPendingDeepLink: () => string | null
|
||
}
|
||
}
|
||
}
|
||
|
||
export default function Document() {
|
||
return (
|
||
<Html lang="en">
|
||
<Head>
|
||
<link rel="icon" href={ENV_CONFIG.faviconPath} />
|
||
<link
|
||
// href="https://fonts.googleapis.com/css2?family=Crimson+Pro:wght@400;500;600;700&display=swap"
|
||
href="https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible+Next:wght@400;500;600;700&display=swap"
|
||
// href="https://fonts.googleapis.com/css2?family=Merriweather:wght@400;500;600;700&display=swap"
|
||
// href="https://fonts.googleapis.com/css2?family=EB+Garamond:wght@400;500;600;700&display=swap"
|
||
rel="stylesheet"
|
||
/>
|
||
<link
|
||
href="https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap"
|
||
rel="stylesheet"
|
||
/>
|
||
{/* Newsreader is the heading face (see the h1–h6 rule in globals.css and the `heading` family
|
||
in tailwind.config.js). Cormorant Garamond above is kept only for the wordmark `.logo`,
|
||
which is brand identity rather than a heading. */}
|
||
<link
|
||
href="https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;0,6..72,800;1,6..72,400&display=swap"
|
||
rel="stylesheet"
|
||
/>
|
||
|
||
{/* PWA primary color */}
|
||
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#ffffff" />
|
||
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#0d1117" />
|
||
|
||
{/*/!* Link to your manifest *!/*/}
|
||
<link rel="manifest" href="/manifest.json" />
|
||
{/*/!* App icons *!/*/}
|
||
<link rel="apple-touch-icon" href={ENV_CONFIG.faviconPath} />
|
||
|
||
<Script src="/init-theme.js" strategy="beforeInteractive" />
|
||
{IS_DEPLOYED && (
|
||
<Script
|
||
id="devtools-warning"
|
||
strategy="afterInteractive"
|
||
dangerouslySetInnerHTML={{
|
||
__html: `(() => { try {
|
||
const title = 'Hold Up!';
|
||
const msg1 = "If someone told you to copy/paste something here you have an 11/10 chance you're being scammed.";
|
||
const msg2 = 'Pasting anything in here could give attackers access to your Compass account.';
|
||
const msg3 = 'Unless you understand exactly what you are doing, close this window and stay safe.';
|
||
const styleText = 'font-size:24px;font-weight:700;padding:8px 12px;border-radius:4px;';
|
||
const styleTitle = 'color:#d32f2f;font-size:28px;font-weight:700;padding:8px 12px;border-radius:4px;';
|
||
console.log('%c' + title, styleTitle);
|
||
console.log('%c' + msg1, styleText);
|
||
console.log('%c' + msg2, styleTitle);
|
||
console.log('%c' + msg3, styleText);
|
||
} catch(e){} })();`,
|
||
}}
|
||
/>
|
||
)}
|
||
</Head>
|
||
<body className={clsx('body-bg text-ink-1000', 'safe-top')}>
|
||
<Main />
|
||
<NextScript />
|
||
</body>
|
||
</Html>
|
||
)
|
||
}
|