From 76a716839a5e0c102522ecdd20a657583f8671d8 Mon Sep 17 00:00:00 2001 From: Leni Aniva Date: Sat, 14 Sep 2024 19:01:40 -0700 Subject: [PATCH] fix: Code block indent and content envvar reading --- src/routes/+page.svelte | 16 +++++++++++----- src/style/content.css | 4 ++++ svelte.config.js | 2 +- tailwind.config.ts | 19 ++++--------------- 4 files changed, 20 insertions(+), 21 deletions(-) diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index fa8ea03..2e7911f 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -75,7 +75,7 @@ -
+
@@ -149,9 +149,15 @@ height: 20vh; border-radius: 50%; } - :global(h1 after) { - content: ' '; - display: block; - border: 2px solid black; + #bio-core { + width: 100%; + } + #bio-core > :global(*):not(h1):not(h2) { + margin-left: 50px; + } + #bio-core > :global(h1) { + color: theme('colors.eucalyptus.700'); + font-weight: normal; + border-bottom: 1px solid; } diff --git a/src/style/content.css b/src/style/content.css index f4e36f6..2ea9832 100644 --- a/src/style/content.css +++ b/src/style/content.css @@ -1,3 +1,7 @@ +blockquote { + background: #fafaee; + font-style: italic; +} /* block quotes */ .note-blockquote { border-left: 4px solid #0078d4; /* Blue left border */ diff --git a/svelte.config.js b/svelte.config.js index 8eda562..ee37299 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -2,7 +2,7 @@ import adapter from '@sveltejs/adapter-auto'; import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; import { mdsvex } from 'mdsvex'; -const contentDir = import.meta.env.CHRYSOBLOG_CONTENT || "src/content"; +const contentDir = import.meta.env?.CHRYSOBLOG_CONTENT ?? "src/content"; /** @type {import('@sveltejs/kit').Config} */ const config = { diff --git a/tailwind.config.ts b/tailwind.config.ts index 326fd56..faf8f49 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -87,6 +87,9 @@ const config: Config = { }, typography: ((theme) => { let markdownCommon = { + h1: { + color: theme('colors.eucalyptus.700'), + }, h2: { color: theme('colors.eucalyptus.700'), }, @@ -104,27 +107,13 @@ const config: Config = { listStyleType: "decimal", listStylePosition: "outside", }, + maxWidth: "100%", }; return { - bio: { - css: { - ...markdownCommon, - h1: { - color: theme('colors.eucalyptus.700'), - "border-bottom": "1px solid", - }, - "*:not(h1):not(h2):not(span):not(code)": { - "margin-left": "50px", - }, - }, - }, DEFAULT: { css: { ...markdownCommon, - h1: { - color: theme('colors.eucalyptus.700'), - }, }, }, };