From 57a0795bce5e0f46c40b5b2a6c706c8ef964146c Mon Sep 17 00:00:00 2001 From: "Alessio \"Farfi\" Farfaglia" Date: Wed, 31 Jan 2024 23:26:51 +0100 Subject: [PATCH] some blog styling --- postcss.config.js | 2 ++ src/app.css | 3 ++ src/posts/second-post.md | 1 - src/routes/blog/[slug]/blog.css | 54 +++++++++++++++++++++++++++++++++ 4 files changed, 59 insertions(+), 1 deletion(-) diff --git a/postcss.config.js b/postcss.config.js index 0f77216..5559af3 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,5 +1,7 @@ export default { plugins: { + 'postcss-import': {}, + 'tailwindcss/nesting': {}, tailwindcss: {}, autoprefixer: {} } diff --git a/src/app.css b/src/app.css index 97756d5..2f0d2b5 100644 --- a/src/app.css +++ b/src/app.css @@ -13,8 +13,11 @@ html { h1, h2, h3, +h4, +h5, .poppins { font-family: 'Poppins', sans-serif; + font-weight: 600; } .text-main { diff --git a/src/posts/second-post.md b/src/posts/second-post.md index eb18add..2c23943 100644 --- a/src/posts/second-post.md +++ b/src/posts/second-post.md @@ -9,7 +9,6 @@ published: true --- - ## Table Of Contents hahahah diff --git a/src/routes/blog/[slug]/blog.css b/src/routes/blog/[slug]/blog.css index 8b13789..04fb66c 100644 --- a/src/routes/blog/[slug]/blog.css +++ b/src/routes/blog/[slug]/blog.css @@ -1 +1,55 @@ +.prose { + ul { + @apply ps-6; + list-style-type: circle; + list-style-position: inside; + } + + ol { + @apply ps-6; + list-style-type: decimal; + list-style-position: inside; + } + + #table-of-contents { + @apply bg-stone-200 dark:bg-stone-900 p-4 rounded-t; + } + + #table-of-contents+ul { + @apply bg-stone-200 dark:bg-stone-900 p-4 pt-0 rounded-b mb-8 text-lg; + + ul { + @apply border-s-2 border-stone-300 dark:border-stone-700; + } + + } + + a { + @apply hover:text-amber-600 hover:dark:text-amber-700; + } + + h1, + h2, + h3, + h4, + h5 { + @apply pt-6 + } + + + /* from https://github.com/shikijs/shiki/issues/3 */ + code { + counter-reset: step; + counter-increment: step 0; + } + + code .line::before { + content: counter(step); + counter-increment: step; + margin-right: 1.5rem; + display: inline-block; + text-align: right; + color: rgba(190, 190, 190, 0.4) + } +}