From 59c58d72b4a0deaf168fbc401a2a9227e5dd09bf Mon Sep 17 00:00:00 2001 From: 10vulture1005 Date: Sat, 29 Aug 2026 20:24:09 +0530 Subject: [PATCH 1/4] feat: implement typography system updates and integrate custom Google fonts via next/font - Add lib/fonts.js configuring Inter, JetBrains_Mono, and Source_Serif_4 via next/font/google with CSS variables (--font-sans, --font-mono, --font-serif). - Wire font variables in pages/_app.page.tsx and remove manual Google Fonts / tags from pages/_document.page.tsx. - Exclude lib/fonts from the dev babel-loader rule in next.config.js so next/font can process it. - Rewrite tailwind fontFamily to consume the CSS variables and rebuild fontSize (base, xl, h1-h5 + mobile variants) with line-height and letter-spacing tuples; add lineHeight, letterSpacing, and maxWidth.prose tokens. - Add @layer base in styles/globals.css with html/body font-family, font-feature-settings, text-wrap: balance/pretty, ::selection, and prefers-reduced-motion overrides. - Update components/Headlines.tsx, Code.tsx, and StyledMarkdownBlock.tsx to use the new type scale, max-w-prose for long-form content, and Source Serif for Bigquote/Regularquote. - Harmonize home and community pages with the new typography tokens and add an UpcomingEventsList with a 'Read more' expander. --- components/Code.tsx | 15 +- components/Headlines.tsx | 10 +- components/StyledMarkdownBlock.tsx | 25 +- lib/fonts.js | 23 + next.config.js | 2 +- pages/_app.page.tsx | 11 +- pages/_document.page.tsx | 10 - pages/community/index.page.tsx | 211 ++++---- pages/index.page.tsx | 836 ++++++++++++++--------------- styles/globals.css | 83 ++- tailwind.config.js | 51 +- 11 files changed, 684 insertions(+), 593 deletions(-) create mode 100644 lib/fonts.js diff --git a/components/Code.tsx b/components/Code.tsx index 7460fa4e8f..7c5c2524af 100644 --- a/components/Code.tsx +++ b/components/Code.tsx @@ -7,11 +7,16 @@ export default function Code({ children }: { children: any }) { const blockContext = useContext(BlockContext); return ( {children} diff --git a/components/Headlines.tsx b/components/Headlines.tsx index 73dbedc930..1c8ef480c0 100644 --- a/components/Headlines.tsx +++ b/components/Headlines.tsx @@ -66,7 +66,7 @@ const Headline = ({ ...propAttributes, id: propAttributes?.slug || slug, className: cn( - 'group cursor-pointer hover:underline', + 'group cursor-pointer hover:underline scroll-mt-28', isActive && 'text-startBlue dark:text-startBlue', propAttributes?.className, ), @@ -97,7 +97,7 @@ const Headline1Tag = ({ children, attributes }: TagProps) => (

@@ -108,7 +108,7 @@ const Headline2Tag = ({ children, attributes }: TagProps) => (

@@ -119,7 +119,7 @@ const Headline3Tag = ({ children, attributes }: TagProps) => (

@@ -130,7 +130,7 @@ const Headline4Tag = ({ children, attributes }: TagProps) => (

diff --git a/components/StyledMarkdownBlock.tsx b/components/StyledMarkdownBlock.tsx index eacebbf087..1bbeb2ccb5 100644 --- a/components/StyledMarkdownBlock.tsx +++ b/components/StyledMarkdownBlock.tsx @@ -48,7 +48,7 @@ export const StyledMarkdownBlock = ({ markdown }: StyledMarkdownBlockProps) => { }, p: { component: ({ children }) => ( -

+

{children}

), @@ -109,21 +109,21 @@ export const StyledMarkdownBlock = ({ markdown }: StyledMarkdownBlockProps) => { }, ol: { component: ({ children }) => ( -
    {children}
+
    + {children} +
), }, ul: { component: ({ children }) => ( -