diff --git a/astro.config.mjs b/astro.config.mjs index 87c4c0f..dde729c 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -6,5 +6,14 @@ import preact from "@astrojs/preact"; // https://astro.build/config export default defineConfig({ site: "https://blog.n-daisuke897.com/", - integrations: [preact()] + integrations: [preact()], + markdown: { + shikiConfig: { + themes: { + light: 'github-light', + dark: 'github-dark', + }, + wrap: true, + }, + }, }); \ No newline at end of file diff --git a/src/components/BlogPost.astro b/src/components/BlogPost.astro index e10aa0b..32cfb32 100644 --- a/src/components/BlogPost.astro +++ b/src/components/BlogPost.astro @@ -12,11 +12,19 @@ const { title, url, datetime } = Astro.props; font-size: 14px; color: #666; } + :global(.dark) .new-article-date { + color: #94a3b8; + } .new-article-title { font-size: 18px; font-weight: bold; - color: #333f; + color: var(--text-color); + text-decoration: none; } + .new-article-title:hover { + text-decoration: underline; + } + /* Removed specific dark mode color to inherit var(--text-color) */
{datetime}
diff --git a/src/components/Header.astro b/src/components/Header.astro index b058c25..bd43431 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -9,3 +9,11 @@ import Navigation from "./Navigation.astro"; + + diff --git a/src/components/Navigation.astro b/src/components/Navigation.astro index 67284b2..fe72b60 100644 --- a/src/components/Navigation.astro +++ b/src/components/Navigation.astro @@ -1,8 +1,9 @@ --- - +import ThemeIcon from "./ThemeIcon.astro"; ---