From 108ad19cc30a4353ed911bd7a15522e142daf6bd Mon Sep 17 00:00:00 2001 From: kitty Date: Wed, 5 Mar 2025 00:48:31 +0000 Subject: [PATCH 1/4] removed all tailwind font css --- src/components/Introduction.astro | 2 +- src/components/Post.astro | 2 +- src/layouts/BaseLayout.astro | 2 +- src/pages/blog/[...slug].astro | 6 +++--- tailwind.config.mjs | 5 +---- 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/components/Introduction.astro b/src/components/Introduction.astro index d445050..3cb3393 100644 --- a/src/components/Introduction.astro +++ b/src/components/Introduction.astro @@ -16,7 +16,7 @@ import profilePicture from "@/assets/profile-picture.png"; draggable="false" class="mx-auto size-32 rounded-full" /> -

{SITE.name}

+

{SITE.name}

diff --git a/src/components/Post.astro b/src/components/Post.astro index 4eb4317..3d4d320 100644 --- a/src/components/Post.astro +++ b/src/components/Post.astro @@ -7,7 +7,7 @@ const { post } = Astro.props;

  • {post.data.title}
    - +
    diff --git a/src/pages/blog/[...slug].astro b/src/pages/blog/[...slug].astro index 63f2fdd..c6d8bed 100644 --- a/src/pages/blog/[...slug].astro +++ b/src/pages/blog/[...slug].astro @@ -31,7 +31,7 @@ const { Content } = await entry.render();
    {`← ${SITE.name}`} { @@ -44,7 +44,7 @@ const { Content } = await entry.render(); ) }

    {entry.data.title}

    @@ -59,7 +59,7 @@ const { Content } = await entry.render();
    {`← ${SITE.name}`} diff --git a/tailwind.config.mjs b/tailwind.config.mjs index ac8c019..5344b1d 100644 --- a/tailwind.config.mjs +++ b/tailwind.config.mjs @@ -6,10 +6,7 @@ export default { }, plugins: [require("@tailwindcss/typography")], theme: { - extend: { - fontFamily: { - customFont: ['"JetBrainsMonoNLNerdFont-Regular.ttf"', ""], - }, + extend: { colors: { lightModeBackground: "rgb(var(--light-mode-background) / )", From c05dcca09127989139f462c88b9eeefc61343f11 Mon Sep 17 00:00:00 2001 From: kitty Date: Wed, 5 Mar 2025 15:42:56 +0000 Subject: [PATCH 2/4] after too many hours; fonts work now... --- .../JetBrainsMonoNLNerdFont-Regular.ttf | Bin src/layouts/BaseLayout.astro | 2 +- src/styles/global.css | 27 ++++++++++-------- tailwind.config.mjs | 4 +++ 4 files changed, 20 insertions(+), 13 deletions(-) rename src/assets/{ => fonts}/JetBrainsMonoNLNerdFont-Regular.ttf (100%) diff --git a/src/assets/JetBrainsMonoNLNerdFont-Regular.ttf b/src/assets/fonts/JetBrainsMonoNLNerdFont-Regular.ttf similarity index 100% rename from src/assets/JetBrainsMonoNLNerdFont-Regular.ttf rename to src/assets/fonts/JetBrainsMonoNLNerdFont-Regular.ttf diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index 7e86501..eae3fa3 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -9,7 +9,7 @@ import Footer from "@/components/Footer.astro"; - +
    diff --git a/src/styles/global.css b/src/styles/global.css index 20fba06..9a59397 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -1,15 +1,17 @@ +@font-face { + font-family: jb; + src: url("../assets/fonts/JetBrainsMonoNLNerdFont-Regular.ttf"); +} +/*@theme {*/ +/* --font-jb: jb;*/ +/*}*/ @tailwind base; @tailwind components; @tailwind utilities; -@font-face { - font-family: 'jb'; - src: url("/src/assets/JetBrainsMonoNLNerdFont-Regular.ttf") format("ttf"); -} -@layer base { - :root { - color-scheme: light dark; - font-family: 'jb'; +@layer base { + :root { + color-scheme: dark; /* replace colors from here... */ --light-mode-background: 240 240 240; --light-mode-foreground: 0 0 0; @@ -44,12 +46,13 @@ --dark-mode-custom-link-text-hover: 255 255 255; /* ...to here */ } + html { + font-family: "JetB"; + } body { background-color: light-dark( rgb(var(--light-mode-background)), rgb(var(--dark-mode-background)) ); - font-family: 'jb'; - } - -} \ No newline at end of file + } +} diff --git a/tailwind.config.mjs b/tailwind.config.mjs index 5344b1d..2d2369e 100644 --- a/tailwind.config.mjs +++ b/tailwind.config.mjs @@ -7,6 +7,10 @@ export default { plugins: [require("@tailwindcss/typography")], theme: { extend: { + fontFamily: { + jb: ['jb'], + //just testing shit + }, colors: { lightModeBackground: "rgb(var(--light-mode-background) / )", From 20d5c6dc4dac283056ba9c841c7d588774157888 Mon Sep 17 00:00:00 2001 From: kitty Date: Wed, 5 Mar 2025 15:47:53 +0000 Subject: [PATCH 3/4] tidy up --- src/layouts/BaseLayout.astro | 2 +- src/styles/global.css | 12 +++++------- tailwind.config.mjs | 3 +-- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index eae3fa3..4926d82 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -9,7 +9,7 @@ import Footer from "@/components/Footer.astro"; - +
    diff --git a/src/styles/global.css b/src/styles/global.css index 9a59397..7d3e6de 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -1,15 +1,13 @@ -@font-face { - font-family: jb; - src: url("../assets/fonts/JetBrainsMonoNLNerdFont-Regular.ttf"); -} -/*@theme {*/ -/* --font-jb: jb;*/ -/*}*/ @tailwind base; @tailwind components; @tailwind utilities; @layer base { + @font-face { + font-family: JetBrainsMono; + font-weight: 700; + src: url("../assets/fonts/JetBrainsMonoNLNerdFont-Regular.ttf"); + } :root { color-scheme: dark; /* replace colors from here... */ diff --git a/tailwind.config.mjs b/tailwind.config.mjs index 2d2369e..2bc2091 100644 --- a/tailwind.config.mjs +++ b/tailwind.config.mjs @@ -8,8 +8,7 @@ export default { theme: { extend: { fontFamily: { - jb: ['jb'], - //just testing shit + JetBrainsMono: ['JetBrainsMono'], }, colors: { lightModeBackground: From c84ac959089691ba7f690ab56d244b78ce9ca702 Mon Sep 17 00:00:00 2001 From: kitty Date: Wed, 5 Mar 2025 15:50:39 +0000 Subject: [PATCH 4/4] clearing white space --- tailwind.config.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tailwind.config.mjs b/tailwind.config.mjs index 2bc2091..f62d1b6 100644 --- a/tailwind.config.mjs +++ b/tailwind.config.mjs @@ -6,9 +6,9 @@ export default { }, plugins: [require("@tailwindcss/typography")], theme: { - extend: { + extend: { fontFamily: { - JetBrainsMono: ['JetBrainsMono'], + JetBrainsMono: ['JetBrainsMono'], }, colors: { lightModeBackground: