test: meta theme-color issue

This commit is contained in:
radishzzz 2025-01-20 21:49:33 +00:00
parent dce0b3a786
commit fa3d73fe17
4 changed files with 17 additions and 7 deletions

View file

@ -59,7 +59,17 @@ export default defineConfig({
policy: [{ userAgent: '*', allow: '/' }],
sitemap: true,
}),
compress(),
compress({
HTML: {
'html-minifier-terser': {
removeAttributeQuotes: false,
collapseWhitespace: true,
removeComments: true,
removeEmptyAttributes: true,
removeRedundantAttributes: true,
},
},
}),
],
markdown: {
remarkPlugins: [

View file

@ -28,7 +28,7 @@ const { cdn, commentURL = '', imageHostURL = '', customGoogleAnalyticsURL = '',
<meta name="author" content={author} />
<meta name="generator" content={Astro.generator} />
<meta name="color-scheme" content="light dark" />
<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: dark)" content={darkMode} />
<meta itemprop="name" content={postTitle || title} />
<meta itemprop="image" content={postImage || siteScreenshot} />

View file

@ -16,13 +16,13 @@ export const themeConfig: ThemeConfig = {
color: {
mode: 'light', // light, dark, DEFAULT to match system theme
light: {
primary: '#505050', // title text color in light mode
secondary: '#17191A', // posts text color in light mode
primary: '#17191A', // title text color in light mode
secondary: '#505050', // post text color in light mode
background: '#F7EEEC', // background color in light mode
},
dark: {
primary: '#A0A09F', // title text color in dark mode
secondary: '#BEBEBE', // posts text color in dark mode
primary: '#BEBEBE', // title text color in dark mode
secondary: '#A0A09F', // post text color in dark mode
background: '#161616', // background color in dark mode
},
},

View file

@ -7,7 +7,7 @@ html {
--at-apply: 'scroll-smooth antialiased text-62.5%';
}
body {
--at-apply: 'bg-background text-primary text-1.6rem';
--at-apply: 'bg-background text-secondary text-1.6rem';
}
@supports not (view-transition-name: none) {
body {