Skip to content

Commit 120d91e

Browse files
author
Lailo
committed
adds custom font
1 parent 398f560 commit 120d91e

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

src/pages/_document.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Document extends NextDocument {
2323
content="initial-scale=1.0, width=device-width"
2424
/>
2525
<link
26-
href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,800;1,800&display=swap"
26+
href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;800&display=swap"
2727
rel="stylesheet"
2828
/>
2929
</Head>

src/pages/index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ const IndexPage: NextPage = () => {
99
return (
1010
<Layout title="Your Awesome App" className="container py-8 max-w-xl">
1111
<h1 className="dark:text-gray-100 text-3xl font-black mb-4">Welcome</h1>
12-
<p className="mb-4">
12+
<p className="mb-4 font-light text-lg">
1313
This is an template project using NextJS with TailwindCSS including dark
1414
mode switcher.
1515
</p>
16-
<p className="mb-6">
16+
<p className="mb-6 font-light text-lg">
1717
It includes some example components with jest testing and typography but
1818
it's not complete nor is it tested well.
1919
</p>

src/styles/main.css

+7-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,15 @@
88

99
body {
1010
@apply bg-gray-200;
11-
@apply text-black
11+
@apply text-black;
12+
@apply font-body;
1213
}
1314

1415
body.dark-mode {
1516
@apply bg-gray-900;
16-
@apply text-white
17+
@apply text-white;
18+
}
19+
20+
h1,h2,h3,h4,h5,h6 {
21+
@apply font-header;
1722
}

tailwind.config.js

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ module.exports = {
66
center: true,
77
padding: '1rem',
88
},
9+
fontFamily: {
10+
header: ['Open Sans', 'sans-serif'],
11+
body: ['Open Sans', 'sans-serif'],
12+
},
913
extend: {},
1014
},
1115
variants: {

0 commit comments

Comments
 (0)