diff options
author | 2021-07-30 22:39:15 -0700 | |
---|---|---|
committer | 2021-07-30 22:39:15 -0700 | |
commit | 7c744961494ca80f82b3ad66c98ff0a1c0496db7 (patch) | |
tree | 6f0ed586edd85076b2660b3b00c0fbb91f470449 /docs/src/components/HeadCommon.astro | |
parent | d0b8485ddfd8dca1376ea0d417ce37282d092cd9 (diff) | |
download | astro-7c744961494ca80f82b3ad66c98ff0a1c0496db7.tar.gz astro-7c744961494ca80f82b3ad66c98ff0a1c0496db7.tar.zst astro-7c744961494ca80f82b3ad66c98ff0a1c0496db7.zip |
Docs site cleanup (#948)
* add language selector
* docs site cleanup
* review feedback
* code review comments
Diffstat (limited to 'docs/src/components/HeadCommon.astro')
-rw-r--r-- | docs/src/components/HeadCommon.astro | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/docs/src/components/HeadCommon.astro b/docs/src/components/HeadCommon.astro new file mode 100644 index 000000000..3a58af07b --- /dev/null +++ b/docs/src/components/HeadCommon.astro @@ -0,0 +1,37 @@ +<!-- Global Metadata --> +<meta name="viewport" content="width=device-width, initial-scale=1.0"> +<link rel="icon" type="image/svg+xml" href="/favicon.svg"/> +<link rel="sitemap" href="/sitemap.xml"/> + +<!-- Global CSS --> +<link rel="stylesheet" href="/theme.css" /> +<link rel="stylesheet" href="/code.css" /> +<link rel="stylesheet" href="/index.css" /> + +<!-- Preload Fonts --> +<link rel="preconnect" href="https://fonts.googleapis.com"> +<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> +<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital@0;1&display=swap" rel="stylesheet"> + +<!-- Scrollable a11y code helper --> +<script type="module" src="/make-scrollable-code-focusable.js" /> + +<!-- This is intentionally inlined to avoid FOUC --> +<script> + const root = document.documentElement; + const theme = localStorage.getItem('theme'); + if (theme === 'dark' || (!theme) && window.matchMedia('(prefers-color-scheme: dark)').matches) { + root.classList.add('theme-dark'); + } else { + root.classList.remove('theme-dark'); + } +</script> + +<!-- Global site tag (gtag.js) - Google Analytics --> +<script async src="https://www.googletagmanager.com/gtag/js?id=G-TEL60V1WM9"></script> +<script> + window.dataLayer = window.dataLayer || []; + function gtag(){dataLayer.push(arguments);} + gtag('js', new Date()); + gtag('config', 'G-TEL60V1WM9'); +</script>
\ No newline at end of file |