diff options
| author | Andrew Lee <andrew@alee14.me> | 2026-10-19 02:58:05 -0400 |
|---|---|---|
| committer | Andrew Lee <andrew@alee14.me> | 2026-10-19 02:58:05 -0400 |
| commit | 832590ee329a43b74cde0087f874aa68594cd46f (patch) | |
| tree | 0c081e9b63691e4f26912810bacaf933d8526923 /src/layouts | |
| parent | 7eaa858a500690f036ba23881c38648173905bb6 (diff) | |
| download | personal-website-832590ee329a43b74cde0087f874aa68594cd46f.tar.gz personal-website-832590ee329a43b74cde0087f874aa68594cd46f.tar.bz2 personal-website-832590ee329a43b74cde0087f874aa68594cd46f.zip | |
notice now uses regular JS; TS type on blogtesting
Diffstat (limited to 'src/layouts')
| -rw-r--r-- | src/layouts/Default.astro | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/layouts/Default.astro b/src/layouts/Default.astro index 9653392..0878e5a 100644 --- a/src/layouts/Default.astro +++ b/src/layouts/Default.astro @@ -41,6 +41,8 @@ const date = new Date(); <meta name="darkreader-lock"> + <!-- Discord Component Embed --> + {Astro.url.pathname == "/" && <Fragment set:html={toComponentEmbedScript(HomeEmbed())} /> } @@ -56,15 +58,21 @@ const date = new Date(); plausible.init() </script> + <!-- Show notice div only for alee14.me --> + <script> + const notice = document.getElementById("notice"); + if (location.hostname == "alee14.me") { + notice.style.display = "block"; + } + </script> + <ClientRouter fallback="animate" /> <title>{title}</title> </head> <body> - {(Astro.url.hostname == "alee14.me") && - <div class="notice"> + <div id="notice"> <span>NOTICE: alee14.me will be switching to alee14.ca. Links will soon start redirecting to the new domain.</span> </div> - } <Navbar client:load /> <div transition:name="main" transition:animate="fade"> <slot /> @@ -172,7 +180,8 @@ const date = new Date(); monospace; } - .notice { + #notice { + display: none; background-color: #660F0F; padding: 1.2em; border-radius: 20px; |
