Skip to content

Commit 0efa2bb

Browse files
committed
feat: include offline fonts/icons from https://fontsource.org/ instead of static repository
1 parent 0c4b77d commit 0efa2bb

24 files changed

+90
-20686
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Changed
1313
* Frontend: Update to SvelteKit 2.21.1, Typescript 5.8.3 and various frontend dependency updates
14+
* Frontend: Include offline fonts/icons from https://fontsource.org/ instead of static repository
1415

1516
### Removed
1617

frontend/package-lock.json

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"format": "prettier --write ."
2020
},
2121
"devDependencies": {
22+
"@fontsource/material-icons": "^5.2.5",
2223
"@playwright/test": "^1.52.0",
2324
"@smui/button": "^8.0.0-beta.3",
2425
"@smui/data-table": "^8.0.0-beta.3",
@@ -38,6 +39,7 @@
3839
"eslint-plugin-svelte": "^3.9.0",
3940
"prettier": "^3.5.3",
4041
"prettier-plugin-svelte": "^3.4.0",
42+
"sass": "^1.89.1",
4143
"smui-theme": "^8.0.0-beta.0",
4244
"svelte": "^5.33.10",
4345
"svelte-check": "^4.2.1",

frontend/src/app.html

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,6 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<!-- Material Icons -->
6-
<link rel="stylesheet" href="../css/material-icons.css" />
7-
<!-- Material Symbols Outlined -->
8-
<link rel="stylesheet" href="../css/material-symbols-outlined.css" />
9-
<!-- Roboto -->
10-
<link rel="stylesheet" href="../css/roboto.css" />
11-
<!-- Roboto Mono -->
12-
<link rel="stylesheet" href="../css/roboto-mono.css" />
135
<!-- SMUI Styles -->
146
<link rel="stylesheet" href="../css/smui.css" media="(prefers-color-scheme: light)" />
157
<link

frontend/src/app.scss

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2+
3+
14
// Elevation mixins.
25
@use '@material/elevation/index' as elevation;
36

@@ -13,6 +16,7 @@
1316
@use '@material/theme/color-palette';
1417
@use '@material/theme/theme-color';
1518

19+
1620
.mdc-snackbar.httpclient-error {
1721
@include snackbar.fill-color(color-palette.$red-500);
1822
@include snackbar.label-ink-color(theme-color.accessible-ink-color(color-palette.$red-500));
@@ -25,3 +29,29 @@
2529
.table-data {
2630
width: 100%;
2731
}
32+
33+
// see routes/+layout.svelte on the import of the fontsource package
34+
.material-icons {
35+
font-family: 'Material Icons';
36+
font-weight: normal;
37+
font-style: normal;
38+
font-size: 24px; /* Preferred icon size */
39+
display: inline-block;
40+
line-height: 1;
41+
text-transform: none;
42+
letter-spacing: normal;
43+
word-wrap: normal;
44+
white-space: nowrap;
45+
direction: ltr;
46+
47+
/* Support for all WebKit browsers. */
48+
-webkit-font-smoothing: antialiased;
49+
/* Support for Safari and Chrome. */
50+
text-rendering: optimizeLegibility;
51+
52+
/* Support for Firefox. */
53+
-moz-osx-font-smoothing: grayscale;
54+
55+
/* Support for IE. */
56+
font-feature-settings: 'liga';
57+
}

frontend/src/routes/+layout.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<script lang="ts">
2+
import "@fontsource/material-icons";
23
import { assets } from '$app/paths';
34
import Header from '../lib/header/Header.svelte';
45
interface Props {

frontend/static/css/material-icons.css

Lines changed: 0 additions & 22 deletions
This file was deleted.

frontend/static/css/material-symbols-outlined.css

Lines changed: 0 additions & 23 deletions
This file was deleted.

frontend/static/css/roboto-mono.css

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)