Skip to content

Commit afb2c78

Browse files
authored
Рефакторит использование шрифтов (#410)
1 parent 36e7fb9 commit afb2c78

File tree

8 files changed

+12
-6
lines changed

8 files changed

+12
-6
lines changed

src/layouts/page.njk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
<meta charset="utf-8">
99
<meta name="viewport" content="width=device-width, initial-scale=1.0">
1010
<meta name="description" content="{{ preview or site.description }}">
11+
12+
<link rel="preload" fetchpriority="high" href="/fonts/dewi-regular-cyrillic.woff2" as="font" type="font/woff2">
13+
<link rel="preload" fetchpriority="high" href="/fonts/dewi-bold-cyrillic.woff2" as="font" type="font/woff2">
14+
<link rel="preload" fetchpriority="high" href="/fonts/dewi-regular-latin.woff2" as="font" type="font/woff2">
15+
<link rel="preload" fetchpriority="high" href="/fonts/dewi-bold-latin.woff2" as="font" type="font/woff2">
16+
1117
<meta name="theme-color" content="#81c36d" media="(prefers-color-scheme: light)">
1218
<meta name="theme-color" content="#273238" media="(prefers-color-scheme: dark)">
1319
<style media="(prefers-color-scheme: light)">

src/styles/blocks/article-card.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272
margin: 0;
7373
font-weight: normal;
7474
font-size: 21px;
75-
font-family: 'Dewi', sans-serif;
7675
line-height: 1.2;
7776
text-wrap: balance;
7877
}

src/styles/blocks/content.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@
286286
.content code {
287287
padding-right: 0.25em;
288288
padding-left: 0.25em;
289-
font-family: 'Rostin', monospace;
289+
font-family: var(--font-mono);
290290
word-wrap: break-word;
291291
background-color: var(--token-color-content-inline-code-background);
292292
}

src/styles/blocks/page.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
.page {
99
container-type: inline-size;
1010
color: var(--token-color-text-primary);
11-
font-family: 'Dewi', sans-serif;
11+
font-family: var(--font-main);
1212
background-color: var(--token-color-background-primary);
1313
scroll-behavior: smooth;
1414
}

src/styles/blocks/podcast-preview.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
margin: 0;
1919
font-weight: normal;
2020
font-size: 21px;
21-
font-family: 'Dewi', sans-serif;
2221
line-height: 1.2;
2322
}
2423

src/styles/blocks/podcast.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
margin-right: 5px;
168168
color: var(--token-color-podcast-timecode-link);
169169
font-size: 15px;
170-
font-family: 'Rostin', monospace;
170+
font-family: var(--font-mono);
171171
text-decoration: none;
172172
}
173173

src/styles/blocks/tooltip.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
color: #ffffff;
3535
font-weight: normal;
3636
font-size: 14px;
37-
font-family: 'Dewi', sans-serif;
3837
letter-spacing: normal;
3938
white-space: nowrap;
4039
text-transform: none;

src/styles/styles.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,7 @@
8484
--color-dark-text-header: #f1f6fb;
8585
--color-dark-text-link: #539dd4;
8686
--color-dark-text-link-visited: #6885ec;
87+
88+
--font-main: 'Dewi', sans-serif;
89+
--font-mono: 'Rostin', monospace;
8790
}

0 commit comments

Comments
 (0)