From c5f75116d36b4baffc3c4758e450b38971fee6ef Mon Sep 17 00:00:00 2001 From: Sebastian Graz Date: Thu, 21 Dec 2023 12:27:12 +0100 Subject: [PATCH] Commit (#45) --- src/app/[spaceId]/[[...pathname]]/layout.tsx | 3 ++- src/components/DocumentView/CodeBlock/CodeBlock.tsx | 6 ++---- src/fonts/index.ts | 9 +++++++++ tailwind.config.ts | 2 +- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/app/[spaceId]/[[...pathname]]/layout.tsx b/src/app/[spaceId]/[[...pathname]]/layout.tsx index e19222a46..c0955409d 100644 --- a/src/app/[spaceId]/[[...pathname]]/layout.tsx +++ b/src/app/[spaceId]/[[...pathname]]/layout.tsx @@ -3,7 +3,7 @@ import assertNever from 'assert-never'; import Script from 'next/script'; import colors from 'tailwindcss/colors'; -import { fonts } from '@/fonts'; +import { fonts, ibmPlexMono } from '@/fonts'; import { getSpaceContent } from '@/lib/api'; import { hexToRgb, shadesOfColor } from '@/lib/colors'; import { getContentSecurityPolicyNonce } from '@/lib/csp'; @@ -65,6 +65,7 @@ export default async function SpaceRootLayout(props: { ) { 'items-center', 'justify-start', '[grid-area:1/1]', - /* 'mb-2', */ 'text-sm', 'gap-2', )} @@ -146,7 +145,6 @@ function CodeHighlightLine(props: { 'relative', 'linear-mask-util', 'ring-2', - /* 'ring-inset', */ 'ring-transparent', 'hover:ring-dark/2', 'dark:hover:ring-light/2', @@ -178,6 +176,7 @@ function CodeHighlightLine(props: { ) : null} - + {isLast ? null : !withLineNumbers && line.tokens.length === 0 && 0 ? ( {'\u200B'} diff --git a/src/fonts/index.ts b/src/fonts/index.ts index e6cc4f0f3..a1d3ceba0 100644 --- a/src/fonts/index.ts +++ b/src/fonts/index.ts @@ -3,6 +3,7 @@ import { Inter, Fira_Sans_Extra_Condensed, IBM_Plex_Serif, + IBM_Plex_Mono, Lato, Merriweather, Noto_Sans, @@ -22,6 +23,13 @@ const inter = Inter({ preload: false, }); +export const ibmPlexMono = IBM_Plex_Mono({ + weight: ['400'], + variable: '--font-mono', + style: 'normal', + preload: false, +}); + const firaSans = Fira_Sans_Extra_Condensed({ weight: ['400', '500', '600', '700'], variable: '--font-content', @@ -132,6 +140,7 @@ const abcFavorit = localFont({ */ export const fonts: { [fontName in CustomizationFont]: { className: string } } = { [CustomizationFont.Inter]: inter, + [CustomizationFont.IBMPlexMono]: ibmPlexMono, [CustomizationFont.FiraSans]: firaSans, [CustomizationFont.IBMPlexSerif]: ibmPlexSerif, [CustomizationFont.Lato]: lato, diff --git a/tailwind.config.ts b/tailwind.config.ts index 91e9b01d3..118869906 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -36,7 +36,7 @@ const config: Config = { extend: { fontFamily: { sans: ['var(--font-content)'], - /* mono: ['var(--font-mono)'], */ // TODO: try Cartograph + mono: ['var(--font-mono)'], }, colors: {