fix: issues in last commit

This commit is contained in:
radishzzz 2025-01-20 13:51:19 +00:00
parent 6ff3d30f80
commit 42fa1be00f
3 changed files with 39 additions and 29 deletions

View file

@ -27,9 +27,9 @@ const { cdn, commentURL = '', imageHostURL = '', customGoogleAnalyticsURL = '',
<meta name="description" content={postDescription || description} /> <meta name="description" content={postDescription || description} />
<meta name="author" content={author} /> <meta name="author" content={author} />
<meta name="generator" content={Astro.generator} /> <meta name="generator" content={Astro.generator} />
<meta name="theme-color" content=`"${lightMode}"` /> <meta name="theme-color" content={lightMode} />
<meta name="theme-color" media="(prefers-color-scheme: light)" content={`"${lightMode}"`} /> <meta name="theme-color" media="(prefers-color-scheme: light)" content={lightMode} />
<meta name="theme-color" media="(prefers-color-scheme: dark)" content={`"${darkMode}"`} /> <meta name="theme-color" media="(prefers-color-scheme: dark)" content={darkMode} />
<meta itemprop="name" content={postTitle || title} /> <meta itemprop="name" content={postTitle || title} />
<meta itemprop="image" content={postImage || siteScreenshot} /> <meta itemprop="image" content={postImage || siteScreenshot} />
<meta itemprop="description" content={postDescription || subtitle} /> <meta itemprop="description" content={postDescription || subtitle} />

View file

@ -31,10 +31,20 @@ function TOGGLE_THEME() {
TOGGLE.addEventListener('click', TOGGLE_THEME) TOGGLE.addEventListener('click', TOGGLE_THEME)
</script> </script>
<style>
[aria-pressed='true'] .moon-icon,
.sun-icon {
display: none;
}
[aria-pressed='true'] .sun-icon {
display: block;
}
</style>
<button <button
aria-pressed="false" aria-pressed="false"
aria-label="Theme Toggle Button" aria-label="Theme Toggle Button"
class="absolute right-10 top-10 z-999 aspect-square w-8 text-secondary [&[aria-pressed='true']_.sun-icon]:block [&_.sun-icon]:hidden [&[aria-pressed='true']_.moon-icon]:hidden" class="absolute right-10 top-10 z-999 aspect-square w-8 text-secondary"
> >
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" class="moon-icon" fill="currentColor"> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" class="moon-icon" fill="currentColor">
<g> <g>

View file

@ -4,10 +4,10 @@
--uno-colors-background: theme('colors.background'); --uno-colors-background: theme('colors.background');
} }
html { html {
--at-apply: 'min-h-screen min-h-dvh scroll-smooth antialiased text-62.5%'; --at-apply: 'h-[-webkit-fill-available] scroll-smooth antialiased text-62.5%';
} }
body { body {
--at-apply: 'min-h-screen min-h-dvh bg-background text-primary text-1.6rem'; --at-apply: 'min-h-screen min-h-[-webkit-fill-available] bg-background text-primary text-1.6rem';
} }
@supports not (view-transition-name: none) { @supports not (view-transition-name: none) {
body { body {