From 4258053fc18203a494641ec57f661ad7f3da0400 Mon Sep 17 00:00:00 2001 From: RetricSu Date: Sun, 26 Jan 2025 11:47:26 +0800 Subject: [PATCH] fix(build): font loading --- frontend/index.html | 4 +++- frontend/src/index.tsx | 2 +- frontend/src/{index.css => styles/global.css} | 10 +++++----- 3 files changed, 9 insertions(+), 7 deletions(-) rename frontend/src/{index.css => styles/global.css} (77%) diff --git a/frontend/index.html b/frontend/index.html index 2dfdfd8..4756466 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -2,7 +2,9 @@ - + + + CKB TX Elevator diff --git a/frontend/src/index.tsx b/frontend/src/index.tsx index 580bc2a..0b94295 100644 --- a/frontend/src/index.tsx +++ b/frontend/src/index.tsx @@ -1,5 +1,5 @@ import { render } from "preact"; -import "./index.css"; +import "./styles/global.css"; import App from "./app"; render(, document.getElementById("app")); diff --git a/frontend/src/index.css b/frontend/src/styles/global.css similarity index 77% rename from frontend/src/index.css rename to frontend/src/styles/global.css index e71c812..8d341da 100644 --- a/frontend/src/index.css +++ b/frontend/src/styles/global.css @@ -1,4 +1,4 @@ -@import "styles/animate.css"; +@import "animate.css"; @import "dseg/css/dseg.css"; @tailwind base; @@ -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; }