From 529888ad7ee277cef728e896c1a4852629017c10 Mon Sep 17 00:00:00 2001 From: thomasabishop Date: Sat, 27 Dec 2025 17:22:26 +0000 Subject: [PATCH] style: use inter font --- src/index.css | 16 ++--- src/styles/_variables.css | 2 +- src/templates/BlogTemplate.jsx | 86 +++++++++++++------------- src/templates/MainTemplate.jsx | 110 ++++++++++++++++----------------- 4 files changed, 108 insertions(+), 106 deletions(-) diff --git a/src/index.css b/src/index.css index 5f347ae..ed4eeb7 100644 --- a/src/index.css +++ b/src/index.css @@ -1,4 +1,4 @@ -@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&family=IBM+Plex+Sans+Condensed:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700&display=swap"); +@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap"); @import "./styles/_variables.css"; @import "tailwindcss"; @import "tw-animate-css"; @@ -17,30 +17,32 @@ body { } .condensed { - font-family: "IBM Plex Sans Condensed"; + font-family: "Inter"; } figcaption { font-weight: 500; - font-family: "IBM Plex Sans Condensed"; + font-family: "Inter"; } h1 { color: var(--color-orange-light); - font-family: "IBM Plex Sans Condensed"; + font-family: "Inter"; } h2 { - font-family: "IBM Plex Sans"; + font-family: "Inter"; color: var(--color-green-light); } .h2-home { - font-family: "IBM Plex Sans Condensed"; + font-family: "Inter"; + font-weight: 600; } h3 { - font-family: "IBM Plex Sans"; + font-family: "Inter"; + font-weight: 600 !important; } .monospaced-font { diff --git a/src/styles/_variables.css b/src/styles/_variables.css index 4f349d2..4b25c4a 100644 --- a/src/styles/_variables.css +++ b/src/styles/_variables.css @@ -37,7 +37,7 @@ --sidebar-border: oklch(0.922 0 0); --sidebar-ring: oklch(0.708 0 0); --font-monospaced: "IBM Plex Mono"; - --font-sansserif: "IBM Plex Sans", sans-serif; + --font-sansserif: "Inter", sans-serif; } @theme inline { diff --git a/src/templates/BlogTemplate.jsx b/src/templates/BlogTemplate.jsx index 33b48e6..ce6fcd9 100644 --- a/src/templates/BlogTemplate.jsx +++ b/src/templates/BlogTemplate.jsx @@ -5,44 +5,44 @@ import { convertDate } from "@/utils/convertDate" import { usePosts } from "@/hooks/usePosts" const BlogTemplate = () => { - const { slug } = useParams() - const { posts } = usePosts() - const post = posts?.find((x) => x.slug === slug) + const { slug } = useParams() + const { posts } = usePosts() + const post = posts?.find((x) => x.slug === slug) - return ( - -
- {!post ? ( -
Loading...
- ) : ( -
-
-

- {post?.title} -

-
- -
- {post?.tags?.map((tag, i) => ( - - {tag} - - ))} -
-
-
+ return ( + +
+ {!post ? ( +
Loading...
+ ) : ( +
+
+

+ {post?.title} +

+
+ +
+ {post?.tags?.map((tag, i) => ( + + {tag} + + ))} +
+
+
-
h2]:text-2xl [&>h2]:font-bold [&>h2]:my-4 [&>h2]:text-[#ebdbb2]! + [&>h3]:text-xl [&>h3]:font-bold [&>h3]:my-4 [&>h3]:text-[#ebdbb2]! + [&>h4]:text-lg [&>h4]:font-bold [&>h4]:my-4 [&>h4]:text-[#ebdbb2]! [&>p]:leading-7 [&>p:not(:first-child)]:mt-4 [&>p+:is(h1,h2,h3,h4,h5,h6)]:mt-6 [&>blockquote]:mt-4 [&>blockquote]:border-l-2 [&>blockquote]:pl-6 [&>blockquote]:text-muted-foreground @@ -65,13 +65,13 @@ const BlogTemplate = () => { [&>table>tbody>tr]:m-0 [&>table>tbody>tr]:border-t [&>table>tbody>tr]:p-0 [&>table>tbody>tr:even]:bg-muted [&>table>tbody>tr>td]:border [&>table>tbody>tr>td]:px-4 [&>table>tbody>tr>td]:py-2 [&>table>tbody>tr>td]:text-left [&>table>tbody>tr>td[align=center]]:text-center [&>table>tbody>tr>td[align=right]]:text-right " - dangerouslySetInnerHTML={{ __html: post?.html }} - /> -
- )} -
-
- ) + dangerouslySetInnerHTML={{ __html: post?.html }} + /> +
+ )} +
+
+ ) } export default BlogTemplate diff --git a/src/templates/MainTemplate.jsx b/src/templates/MainTemplate.jsx index 213c0d4..cdb8e3d 100644 --- a/src/templates/MainTemplate.jsx +++ b/src/templates/MainTemplate.jsx @@ -3,66 +3,66 @@ import gruvboxComputer from "../images/gruvbox-computer.svg" import { Link } from "react-router" const Header = () => { - return ( -
- -
- ) + return ( +
+ +
+ ) } const Footer = () => { - return ( - - ) + return ( + + ) } const MainTemplate = ({ children }) => { - return ( -
-
-
-
{children}
-
-
-
- ) + return ( +
+
+
+
{children}
+
+
+ ) } export default MainTemplate