Skip to content

Commit a33293a

Browse files
authored
Merge pull request #128 from inkonchain/feat/add-jakarta-sans-font
feat: add jakarta sans font
2 parents 26c70f2 + 041c235 commit a33293a

File tree

4 files changed

+29
-10
lines changed

4 files changed

+29
-10
lines changed

src/fonts.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { Inter, Plus_Jakarta_Sans } from "next/font/google";
2+
3+
export const inter = Inter({
4+
subsets: ["latin"],
5+
variable: "--font-inter",
6+
display: "swap",
7+
});
8+
9+
export const plus_jakarta_sans = Plus_Jakarta_Sans({
10+
subsets: ["latin"],
11+
variable: "--font-plus-jakarta-sans",
12+
display: "swap",
13+
});

src/globals.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
@tailwind components;
33
@tailwind utilities;
44

5+
6+
@layer utilities {
7+
body {
8+
background-color: blue;
9+
font-family: var(--font-plus-jakarta-sans), var(--font-inter), -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
10+
-webkit-font-smoothing: antialiased;
11+
-moz-osx-font-smoothing: grayscale;
12+
}
13+
}
14+
515
@layer base {
616
h1,
717
h2,

src/pages/_app.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
// These styles apply to every route in the application
22
import type { AppProps } from "next/app";
3-
import { Inter } from "next/font/google";
43
import { ThemeProvider } from "next-themes";
54

6-
import "../globals.css";
5+
import { inter, plus_jakarta_sans } from "../fonts";
76

8-
const inter = Inter({
9-
subsets: ["latin"],
10-
variable: "--font-inter",
11-
});
7+
import "../globals.css";
128

139
export default function App({ Component, pageProps }: AppProps) {
1410
return (
1511
<ThemeProvider attribute="class">
16-
<div className={`${inter.variable} font-sans`}>
12+
<div className={`${inter.variable} ${plus_jakarta_sans.variable} font-sans`}>
1713
<div className="bg-white dark:bg-magic-black">
1814
<Component {...pageProps} />
1915
</div>

tailwind.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/** @type {import('tailwindcss').Config} */
22
module.exports = {
3-
darkMode : 'class',
3+
darkMode: 'class',
44
content: [
55
'./src/**/*.{js,jsx,ts,tsx,md,mdx}',
66
'./theme.config.tsx'
@@ -23,9 +23,9 @@ module.exports = {
2323
},
2424
},
2525
fontFamily: {
26-
sans: ['var(--font-inter)'],
26+
sans: ['var(--font-plus-jakarta-sans)', 'var(--font-inter)', '-apple-system', 'BlinkMacSystemFont', 'Segoe UI', 'Helvetica', 'Apple Color Emoji', 'Arial', 'sans-serif', 'Segoe UI Emoji', 'Segoe UI Symbol'],
2727
},
2828
},
2929
},
3030
plugins: [],
31-
}
31+
}

0 commit comments

Comments
 (0)