Brighten single post typography in dark mode

This commit is contained in:
2025-11-17 18:03:29 +08:00
parent 0399b303c8
commit e83150ae46
2 changed files with 8 additions and 2 deletions

View File

@@ -40,7 +40,7 @@ export default function BlogPostPage({ params }: Props) {
<aside className="hidden w-56 shrink-0 lg:block"> <aside className="hidden w-56 shrink-0 lg:block">
<PostToc /> <PostToc />
</aside> </aside>
<article className="prose max-w-none flex-1"> <article className="prose prose-slate max-w-none flex-1 dark:prose-dark">
<h1>{post.title}</h1> <h1>{post.title}</h1>
{post.feature_image && ( {post.feature_image && (
// feature_image is stored as "../assets/xyz", serve from "/assets/xyz" // feature_image is stored as "../assets/xyz", serve from "/assets/xyz"

View File

@@ -41,13 +41,19 @@ module.exports = {
}, },
dark: { dark: {
css: { css: {
color: theme('colors.slate.100'), color: theme('colors.slate.50'),
a: { a: {
color: theme('colors.blue.400'), color: theme('colors.blue.400'),
'&:hover': { '&:hover': {
color: theme('colors.blue.300') color: theme('colors.blue.300')
} }
}, },
h1: {
color: theme('colors.slate.50')
},
h2: {
color: theme('colors.slate.50')
},
blockquote: { blockquote: {
borderLeftColor: theme('colors.blue.500'), borderLeftColor: theme('colors.blue.500'),
backgroundColor: theme('colors.slate.900') backgroundColor: theme('colors.slate.900')