Skip to content

Commit

Permalink
fix(build): font loading
Browse files Browse the repository at this point in the history
  • Loading branch information
RetricSu committed Jan 26, 2025
1 parent ff89ebd commit 4258053
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 3 additions & 1 deletion frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/icons/logo.svg" />
<link rel="icon" type="image/svg+xml" href="/assets/icons/logo.svg" />
<link rel="preload" href="/assets/fonts/OpenRunde-Medium.woff2" as="font" type="font/woff2" crossorigin>

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="color-scheme" content="light dark" />
<title>CKB TX Elevator</title>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render } from "preact";
import "./index.css";
import "./styles/global.css";
import App from "./app";

render(<App />, document.getElementById("app"));
10 changes: 5 additions & 5 deletions frontend/src/index.css → frontend/src/styles/global.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "styles/animate.css";
@import "animate.css";
@import "dseg/css/dseg.css";

@tailwind base;
Expand All @@ -7,10 +7,10 @@

@font-face {
font-family: "Open Runde";
src: url("./assets/fonts/OpenRunde-Medium.woff2") format("woff2"),
url("./assets/fonts/OpenRunde-Medium.woff") format("woff"),
url("./assets/fonts/OpenRunde-Semibold.woff2") format("woff2"),
url("./assets/fonts/OpenRunde-Semibold.woff") format("woff");
src: url("/assets/fonts/OpenRunde-Medium.woff2") format("woff2"),
url("/assets/fonts/OpenRunde-Medium.woff") format("woff"),
url("/assets/fonts/OpenRunde-Semibold.woff2") format("woff2"),
url("/assets/fonts/OpenRunde-Semibold.woff") format("woff");
font-weight: normal;
font-style: normal;
}
Expand Down

0 comments on commit 4258053

Please sign in to comment.