Skip to content

Commit 549a03c

Browse files
committed
Add font imports and apply fonts to text elements
1 parent 89e89a6 commit 549a03c

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

app/layout.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import '@/app/ui/global.css';
2+
import { inter } from '@/app/ui/fonts';
23

34
export default function RootLayout({
45
children,
@@ -7,7 +8,7 @@ export default function RootLayout({
78
}) {
89
return (
910
<html lang="en">
10-
<body>{children}</body>
11+
<body className={`${inter.className} antialiased`}>{children}</body>
1112
</html>
1213
);
1314
}

app/page.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,26 @@ import styles from '@/app/ui/home.module.css';
22
import AcmeLogo from '@/app/ui/acme-logo';
33
import { ArrowRightIcon } from '@heroicons/react/24/outline';
44
import Link from 'next/link';
5+
import { lusitana } from '@/app/ui/fonts';
56

67
export default function Page() {
78
return (
89
<main className="flex min-h-screen flex-col p-6">
910
<div className="flex h-20 shrink-0 items-end rounded-lg bg-blue-500 p-4 md:h-52">
10-
{/* <AcmeLogo /> */}
11+
<AcmeLogo />
1112
</div>
1213
<div className="mt-4 flex grow flex-col gap-4 md:flex-row">
1314
<div className="flex flex-col justify-center gap-6 rounded-lg bg-gray-50 px-6 py-10 md:w-2/5 md:px-20">
14-
<p className={`text-xl text-gray-800 md:text-3xl md:leading-normal`}>
15-
<div className={styles.shape}></div>
15+
<p
16+
className={`${lusitana.className} text-xl text-gray-800 md:text-3xl md:leading-normal`}
17+
>
1618
<strong>Welcome to Acme.</strong> This is the example for the{' '}
1719
<a href="https://nextjs.org/learn/" className="text-blue-500">
1820
Next.js Learn Course
1921
</a>
2022
, brought to you by Vercel.
2123
</p>
24+
<div className={styles.shape}></div>
2225
<Link
2326
href="/login"
2427
className="flex items-center gap-5 self-start rounded-lg bg-blue-500 px-6 py-3 text-sm font-medium text-white transition-colors hover:bg-blue-400 md:text-base"

app/ui/fonts.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { Inter, Lusitana } from 'next/font/google';
2+
3+
export const inter = Inter({ subsets: ['latin'] });
4+
export const lusitana = Lusitana({
5+
weight: ['400', '700'],
6+
subsets: ['latin'],
7+
});

0 commit comments

Comments
 (0)