diff options
author | 2022-07-08 22:08:32 +0200 | |
---|---|---|
committer | 2022-07-08 22:08:32 +0200 | |
commit | 59e8c71786fd1c154904b3fefa7d26d88f4d92d2 (patch) | |
tree | 3a352e838b25a402c608913aeca21f471d75a826 /examples/docs/src/components/HeadCommon.astro | |
parent | 1f9e4857ff2b2cb7db89d619618cdf546cd3b3dc (diff) | |
download | astro-59e8c71786fd1c154904b3fefa7d26d88f4d92d2.tar.gz astro-59e8c71786fd1c154904b3fefa7d26d88f4d92d2.tar.zst astro-59e8c71786fd1c154904b3fefa7d26d88f4d92d2.zip |
Format astro files in examples (#3862)
Diffstat (limited to 'examples/docs/src/components/HeadCommon.astro')
-rw-r--r-- | examples/docs/src/components/HeadCommon.astro | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/examples/docs/src/components/HeadCommon.astro b/examples/docs/src/components/HeadCommon.astro index b6a74cdc6..bc3a3955a 100644 --- a/examples/docs/src/components/HeadCommon.astro +++ b/examples/docs/src/components/HeadCommon.astro @@ -1,6 +1,6 @@ --- -import '../styles/theme.css'; -import '../styles/index.css'; +import "../styles/theme.css"; +import "../styles/index.css"; --- <!-- Global Metadata --> @@ -15,19 +15,24 @@ import '../styles/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" /> +<link + href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital@0;1&display=swap" + rel="stylesheet" +/> <!-- Scrollable a11y code helper --> -<script src="/make-scrollable-code-focusable.js" is:inline></script> +<script src="/make-scrollable-code-focusable.js" is:inline> + +</script> <!-- This is intentionally inlined to avoid FOUC --> <script is:inline> 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'); + 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'); + root.classList.remove("theme-dark"); } </script> |