theme-ui#InitializeColorMode JavaScript Examples
The following examples show how to use
theme-ui#InitializeColorMode.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: _document.js From nextjs-prismic-blog-starter with MIT License | 6 votes |
render() {
return (
<Html>
<Head />
<body>
<InitializeColorMode />
<Main />
<NextScript />
</body>
</Html>
)
}
Example #2
Source File: _document.js From developer-portal with Apache License 2.0 | 5 votes |
render() {
return (
<Html>
<Head>
<meta name="description" content={DESCRIPTION} />
<meta property="og:url" content={URL} />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="Maker Protocol" />
<meta property="og:description" content={DESCRIPTION} />
<meta property="og:title" content={TITLE} />
<meta property="og:image" content="/images/makerlogo.png" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content={TITLE} />
<meta name="twitter:description" content={DESCRIPTION} />
<meta name="twitter:image" content="/images/makerlogo.png" />
<meta name="twitter:image:alt" content={TITLE} />
<link rel="alternate icon" href="/favicon.ico" />
<link rel="shortcut icon" href="/favicon.ico" />
<script async src={`https://www.googletagmanager.com/gtag/js?id=${GA_TRACKING_ID}`} />
<script
dangerouslySetInnerHTML={{
__html: `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '${GA_TRACKING_ID}', {
page_path: window.location.pathname,
});
`,
}}
/>
</Head>
<body>
<InitializeColorMode />
<Main />
<NextScript />
</body>
</Html>
);
}