Skip to content

Commit efcad57

Browse files
authored
Merge pull request #2311 from dappnode/mateu/use-local-fonts
Use fonts locally instead of google fonts
2 parents bedf386 + 4787244 commit efcad57

File tree

8 files changed

+45
-24
lines changed

8 files changed

+45
-24
lines changed

packages/admin-ui/index.html

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@
1010
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32" />
1111
<link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16" />
1212
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5" />
13-
<link rel="preconnect" href="https://fonts.googleapis.com" />
14-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
15-
<link
16-
href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap"
17-
rel="stylesheet"
18-
/>
1913
<meta name="theme-color" content="#ffffff" />
2014
<!--
2115
manifest.json provides metadata used when your web app is added to the
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

packages/admin-ui/src/fonts.scss

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
@font-face {
2+
font-family: "Montserrat";
3+
src: url("/fonts/montserrat/Montserrat-VariableFont_wght.ttf") format("truetype");
4+
font-weight: 100 900;
5+
font-style: normal;
6+
font-display: swap;
7+
}
8+
9+
@font-face {
10+
font-family: "Montserrat";
11+
src: url("/fonts/montserrat/Montserrat-Italic-VariableFont_wght.ttf") format("truetype");
12+
font-weight: 100 900;
13+
font-style: italic;
14+
font-display: swap;
15+
}
16+
17+
@font-face {
18+
font-family: "Inter";
19+
src: url("/fonts/inter/Inter-VariableFont_opsz,wght.ttf") format("truetype");
20+
font-weight: 100 900;
21+
font-style: normal;
22+
font-display: swap;
23+
}
24+
25+
@font-face {
26+
font-family: "Inter";
27+
src: url("/fonts/inter/Inter-Italic-VariableFont_opsz,wght.ttf") format("truetype");
28+
font-weight: 100 900;
29+
font-style: italic;
30+
font-display: swap;
31+
}
32+
33+
.section-title,
34+
.section-subtitle,
35+
.sidenav-item,
36+
.horizontal-navbar,
37+
.pkgs-back-btn {
38+
font-family: "Montserrat", sans-serif;
39+
}
40+
41+
// Body text style
42+
body {
43+
font-family: "Inter", sans-serif;
44+
}

packages/admin-ui/src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import "./dappnode_styles.scss";
1616
import "./dappnode_colors.scss";
1717
import "./light_dark.scss";
1818
import "./layout.scss";
19+
import "./fonts.scss";
1920
import { PwaInstallProvider } from "pages/system/components/App/PwaInstallContext";
2021

2122
// This process.env. vars will be substituted at build time

packages/admin-ui/src/layout.scss

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,6 @@
2626
--z-index-topbar: 1000;
2727
}
2828

29-
/*
30-
TEXT STYLES
31-
*/
32-
33-
// Titles and navigators
34-
.section-title,
35-
.section-subtitle,
36-
.sidenav-item,
37-
.horizontal-navbar,
38-
.pkgs-back-btn {
39-
font-family: "Montserrat", sans-serif;
40-
}
41-
42-
// Body text style
43-
body {
44-
font-family: "Inter", sans-serif;
45-
}
46-
4729
/* Reset margins and underlying sizes.
4830
The height 100% is necessary so child elements have a reference to be full width
4931
*/

0 commit comments

Comments
 (0)