Fine-tune dark mode color layering for body, meta, and excerpts
This commit is contained in:
@@ -43,7 +43,7 @@ export default function BlogPostPage({ params }: Props) {
|
|||||||
<div className="flex-1">
|
<div className="flex-1">
|
||||||
<header className="mb-6 space-y-2">
|
<header className="mb-6 space-y-2">
|
||||||
{post.published_at && (
|
{post.published_at && (
|
||||||
<p className="text-xs text-slate-500 dark:text-slate-400">
|
<p className="text-xs text-slate-500 dark:text-slate-500">
|
||||||
{new Date(post.published_at).toLocaleDateString(
|
{new Date(post.published_at).toLocaleDateString(
|
||||||
siteConfig.defaultLocale
|
siteConfig.defaultLocale
|
||||||
)}
|
)}
|
||||||
@@ -57,7 +57,7 @@ export default function BlogPostPage({ params }: Props) {
|
|||||||
{post.tags.map((t) => (
|
{post.tags.map((t) => (
|
||||||
<span
|
<span
|
||||||
key={t}
|
key={t}
|
||||||
className="rounded-full bg-slate-100 px-2 py-0.5 text-xs text-slate-700 dark:bg-slate-800 dark:text-slate-200"
|
className="rounded-full bg-slate-100 px-2 py-0.5 text-xs text-slate-700 dark:bg-slate-800 dark:text-slate-300"
|
||||||
>
|
>
|
||||||
#{t}
|
#{t}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export function PostListItem({ post }: Props) {
|
|||||||
)}
|
)}
|
||||||
<div className="flex-1 space-y-1.5">
|
<div className="flex-1 space-y-1.5">
|
||||||
{post.published_at && (
|
{post.published_at && (
|
||||||
<p className="text-xs text-slate-500 dark:text-slate-400">
|
<p className="text-xs text-slate-500 dark:text-slate-500">
|
||||||
{new Date(post.published_at).toLocaleDateString(
|
{new Date(post.published_at).toLocaleDateString(
|
||||||
siteConfig.defaultLocale
|
siteConfig.defaultLocale
|
||||||
)}
|
)}
|
||||||
@@ -45,7 +45,7 @@ export function PostListItem({ post }: Props) {
|
|||||||
{post.tags.slice(0, 4).map((t) => (
|
{post.tags.slice(0, 4).map((t) => (
|
||||||
<span
|
<span
|
||||||
key={t}
|
key={t}
|
||||||
className="rounded-full bg-slate-100 px-2 py-0.5 text-[11px] text-slate-600 group-hover:bg-slate-200 dark:bg-slate-800 dark:text-slate-200 dark:group-hover:bg-slate-700"
|
className="rounded-full bg-slate-100 px-2 py-0.5 text-[11px] text-slate-600 group-hover:bg-slate-200 dark:bg-slate-800 dark:text-slate-300 dark:group-hover:bg-slate-700"
|
||||||
>
|
>
|
||||||
#{t}
|
#{t}
|
||||||
</span>
|
</span>
|
||||||
@@ -53,7 +53,7 @@ export function PostListItem({ post }: Props) {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{excerpt && (
|
{excerpt && (
|
||||||
<p className="line-clamp-2 text-sm text-slate-600 group-hover:text-slate-800 dark:text-slate-200 dark:group-hover:text-slate-100">
|
<p className="line-clamp-2 text-sm text-slate-600 group-hover:text-slate-800 dark:text-slate-300 dark:group-hover:text-slate-100">
|
||||||
{excerpt}
|
{excerpt}
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -41,7 +41,8 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
dark: {
|
dark: {
|
||||||
css: {
|
css: {
|
||||||
color: theme('colors.slate.50'),
|
// Slightly softer than pure white for body text
|
||||||
|
color: theme('colors.slate.200'),
|
||||||
a: {
|
a: {
|
||||||
color: theme('colors.blue.400'),
|
color: theme('colors.blue.400'),
|
||||||
'&:hover': {
|
'&:hover': {
|
||||||
@@ -57,9 +58,9 @@ module.exports = {
|
|||||||
blockquote: {
|
blockquote: {
|
||||||
borderLeftColor: theme('colors.blue.500'),
|
borderLeftColor: theme('colors.blue.500'),
|
||||||
backgroundColor: theme('colors.slate.800'),
|
backgroundColor: theme('colors.slate.800'),
|
||||||
color: theme('colors.slate.50'),
|
color: theme('colors.slate.200'),
|
||||||
p: {
|
p: {
|
||||||
color: theme('colors.slate.50')
|
color: theme('colors.slate.200')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
code: {
|
code: {
|
||||||
|
|||||||
Reference in New Issue
Block a user