Skip to content

Commit 40b6a33

Browse files
committed
Example: add css font example
1 parent 1746733 commit 40b6a33

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

example/pages/font-css-front.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import Layout from "../components/layout";
2+
3+
export default function Page() {
4+
return (
5+
<Layout>
6+
<article>
7+
<h1>Font — CSS Font</h1>
8+
<p><b>Test 1:</b></p>
9+
<p>This uses default font.</p>
10+
<p style={{ fontFamily: 'MuseoModerno' }}>This uses MuseoModerno font.</p>
11+
</article>
12+
</Layout>
13+
);
14+
}

example/pages/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export default function Home({}) {
3939
<Link href={`/image-optimization-imported`}>Image Optimization — imported image</Link><br />
4040
<Link href={`/image-optimization-remote`}>Image Optimization — remote image</Link><br />
4141
<Link href={`/image-html-tag`}>Image using html image tag</Link><br />
42+
<Link href={`/font-css-front`}>Font — CSS Font</Link><br />
4243
<Link href={`/page-does-not-exist`}>404 Page not found</Link><br />
4344
</section>
4445
</Layout>
Binary file not shown.

example/styles/global.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,8 @@ img {
2525
max-width: 100%;
2626
display: block;
2727
}
28+
29+
@font-face {
30+
font-family: 'MuseoModerno';
31+
src: url('/fonts/MuseoModerno/MuseoModerno-Regular.ttf') format('truetype');
32+
}

0 commit comments

Comments
 (0)