From 2c9074538e56bc21cda94ecc6523ec3b8a8a3bab Mon Sep 17 00:00:00 2001 From: gbanyan Date: Mon, 17 Nov 2025 18:24:13 +0800 Subject: [PATCH] Fine-tune dark mode color layering for body, meta, and excerpts --- app/blog/[slug]/page.tsx | 4 ++-- components/post-list-item.tsx | 6 +++--- tailwind.config.js | 7 ++++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/app/blog/[slug]/page.tsx b/app/blog/[slug]/page.tsx index 114e119..beb1d9c 100644 --- a/app/blog/[slug]/page.tsx +++ b/app/blog/[slug]/page.tsx @@ -43,7 +43,7 @@ export default function BlogPostPage({ params }: Props) {
{post.published_at && ( -

+

{new Date(post.published_at).toLocaleDateString( siteConfig.defaultLocale )} @@ -57,7 +57,7 @@ export default function BlogPostPage({ params }: Props) { {post.tags.map((t) => ( #{t} diff --git a/components/post-list-item.tsx b/components/post-list-item.tsx index 0ef5a76..e3e7826 100644 --- a/components/post-list-item.tsx +++ b/components/post-list-item.tsx @@ -31,7 +31,7 @@ export function PostListItem({ post }: Props) { )}

{post.published_at && ( -

+

{new Date(post.published_at).toLocaleDateString( siteConfig.defaultLocale )} @@ -45,7 +45,7 @@ export function PostListItem({ post }: Props) { {post.tags.slice(0, 4).map((t) => ( #{t} @@ -53,7 +53,7 @@ export function PostListItem({ post }: Props) {

)} {excerpt && ( -

+

{excerpt}

)} diff --git a/tailwind.config.js b/tailwind.config.js index 269167b..6af7553 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -41,7 +41,8 @@ module.exports = { }, dark: { css: { - color: theme('colors.slate.50'), + // Slightly softer than pure white for body text + color: theme('colors.slate.200'), a: { color: theme('colors.blue.400'), '&:hover': { @@ -57,9 +58,9 @@ module.exports = { blockquote: { borderLeftColor: theme('colors.blue.500'), backgroundColor: theme('colors.slate.800'), - color: theme('colors.slate.50'), + color: theme('colors.slate.200'), p: { - color: theme('colors.slate.50') + color: theme('colors.slate.200') } }, code: {