Skip to content

Commit b2968f0

Browse files
committed
Import fonts
1 parent 06c4a45 commit b2968f0

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

source/layouts/layout.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
1818
<link
1919
rel="stylesheet"
20-
href="https://fonts.googleapis.com/css2?family=Reenie+Beanie&family=Source+Code+Pro&display=swap"
20+
href="https://fonts.googleapis.com/css2?family=Reenie+Beanie&family=Source+Code+Pro&family=Noto+Sans+JP:[email protected]&family=Noto+Sans+SC:[email protected]&family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap"
2121
/>
2222
<link
2323
rel="stylesheet"

source/stylesheets/application.css.scss

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,22 @@
1616

1717
--code-light-background-color: rgba(255, 255, 255, .4);
1818
--code-editor-border-color: #e2d1aa;
19+
20+
--noto-sans-subset: "Noto Sans JP";
1921
}
2022

2123
// Body
2224

23-
.tryruby-page {
25+
body {
2426
background-color: var(--background-color);
25-
26-
font: 1.2em "Plus Jakarta Sans", "Noto Sans JP", ui-sans-serif, system-ui, -apple-system, sans-serif;
2727
color: var(--text-color);
28+
29+
font: 1.2em "Plus Jakarta Sans", var(--noto-sans-subset), ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
2830
}
2931

32+
:root:lang(zh) body { --noto-sans-subset: "Noto Sans SC"; }
33+
:root:lang(ja) body { --noto-sans-subset: "Noto Sans JP"; }
34+
3035
// Navigation
3136

3237
.tryruby-navbar {

0 commit comments

Comments
 (0)