diff --git a/apps/web/pages/_document.tsx b/apps/web/pages/_document.tsx index 42f5d49216..0d2ebc7389 100644 --- a/apps/web/pages/_document.tsx +++ b/apps/web/pages/_document.tsx @@ -28,17 +28,18 @@ class MyDocument extends Document { // Use a dummy URL as default so that URL parsing works for relative URLs as well. We care about searchParams and pathname only const parsedUrl = new URL(asPath, "https://dummyurl"); const isEmbed = parsedUrl.pathname.endsWith("/embed") || parsedUrl.searchParams.get("embedType") !== null; + const embedColorScheme = parsedUrl.searchParams.get("ui.color-scheme"); const initialProps = await Document.getInitialProps(ctx); - return { isEmbed, nonce, ...initialProps }; + return { isEmbed, embedColorScheme, nonce, ...initialProps }; } render() { const { locale } = this.props.__NEXT_DATA__; - const { isEmbed } = this.props; + const { isEmbed, embedColorScheme } = this.props; const nonceParsed = z.string().safeParse(this.props.nonce); const nonce = nonceParsed.success ? nonceParsed.data : ""; return ( - + diff --git a/packages/embeds/embed-core/index.html b/packages/embeds/embed-core/index.html index 3ea6a85498..d62d51ee2a 100644 --- a/packages/embeds/embed-core/index.html +++ b/packages/embeds/embed-core/index.html @@ -82,10 +82,13 @@ + With Dark Color Scheme for the Page Non responsive version of this page here Go to Pre-render test page only + +