From e29dcb96be51ffaa3c16178e1b41f9e82c445148 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Fri, 12 Apr 2024 16:40:04 -0700 Subject: [PATCH] style: reduce top margin of first heading in post --- src/lib/styles/markdown.pcss | 4 +++- src/routes/blog/+layout.svelte | 2 -- src/routes/blog/[...slug]/+page.svelte | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/lib/styles/markdown.pcss b/src/lib/styles/markdown.pcss index eec04fb..947a0c6 100644 --- a/src/lib/styles/markdown.pcss +++ b/src/lib/styles/markdown.pcss @@ -3,7 +3,9 @@ h2 { @apply text-3xl font-serif mb-5 mt-16; } - + section:first-child h2 { + @apply mt-6; + } h3, h4 { @apply text-2xl mb-5 mt-12 text-muted-foreground; diff --git a/src/routes/blog/+layout.svelte b/src/routes/blog/+layout.svelte index 4e5ab24..3562b52 100644 --- a/src/routes/blog/+layout.svelte +++ b/src/routes/blog/+layout.svelte @@ -1,7 +1,5 @@ diff --git a/src/routes/blog/[...slug]/+page.svelte b/src/routes/blog/[...slug]/+page.svelte index d6e7a34..c4ec26e 100644 --- a/src/routes/blog/[...slug]/+page.svelte +++ b/src/routes/blog/[...slug]/+page.svelte @@ -4,7 +4,8 @@ import { toc, createTocStore } from '@svelte-put/toc'; import StickyToc from '$lib/components/Toc/StickyToc.svelte'; import TocHeader from '$lib/components/Toc/TocHeader.svelte'; - import { DateRangeField } from 'bits-ui'; + import '$lib/styles/katex.css'; + import '$lib/styles/markdown.pcss'; const tocStore = createTocStore();