Skip to content

Commit 2b24cf2

Browse files
committed
feat: フォントファミリーを設定
1 parent 9677b68 commit 2b24cf2

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

website/src/components/templates/BaseTemplate.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,21 +73,29 @@ export const BaseTemplate: FC<BaseTemplateProps> = ({
7373
rel="preload"
7474
href="/assets/fonts/HKGrotesk-Regular.woff2"
7575
as="font"
76+
type="font/woff2"
77+
crossOrigin="anonymous"
7678
/>
7779
<link
7880
rel="preload"
7981
href="/assets/fonts/HKGrotesk-Bold.woff2"
8082
as="font"
83+
type="font/woff2"
84+
crossOrigin="anonymous"
8185
/>
8286
<link
8387
rel="preload"
8488
href="/assets/fonts/HKGrotesk-SemiBold.woff2"
8589
as="font"
90+
type="font/woff2"
91+
crossOrigin="anonymous"
8692
/>
8793
<link
8894
rel="preload"
8995
href="/assets/fonts/CascadiaMono-Regular-Sub.woff2"
9096
as="font"
97+
type="font/woff2"
98+
crossOrigin="anonymous"
9199
/>
92100
<link href="/src/styles.css" rel="stylesheet"></link>
93101
<script

website/src/styles.css

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,48 @@
11
@import "tailwindcss";
22
@plugin "@tailwindcss/typography";
3+
4+
@font-face {
5+
font-family: "HK Grotesk";
6+
src: url("/assets/fonts/HKGrotesk-Regular.woff2") format("woff2");
7+
font-weight: 400;
8+
font-style: normal;
9+
font-display: swap;
10+
}
11+
12+
@font-face {
13+
font-family: "HK Grotesk";
14+
src: url("/assets/fonts/HKGrotesk-SemiBold.woff2") format("woff2");
15+
font-weight: 600;
16+
font-style: normal;
17+
font-display: swap;
18+
}
19+
20+
@font-face {
21+
font-family: "HK Grotesk";
22+
src: url("/assets/fonts/HKGrotesk-Bold.woff2") format("woff2");
23+
font-weight: 700;
24+
font-style: normal;
25+
font-display: swap;
26+
}
27+
28+
@font-face {
29+
font-family: "Cascadia Mono";
30+
src: url("/assets/fonts/CascadiaMono-Regular-Sub.woff2") format("woff2");
31+
font-weight: 400;
32+
font-style: normal;
33+
font-display: swap;
34+
}
35+
36+
body {
37+
font-family: "HK Grotesk", Inter, "BIZ UDGothic", "BIZ UDPGothic", system-ui,
38+
-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
39+
Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
40+
}
41+
42+
code,
43+
pre,
44+
kbd,
45+
samp {
46+
font-family: "Cascadia Mono", SFMono-Regular, Menlo, Monaco, Consolas,
47+
"Liberation Mono", "Courier New", monospace;
48+
}

0 commit comments

Comments
 (0)