Add bundled fonts, token CSS, and local font-face loading

Add bundled fonts, token CSS, and local font-face loading

Co-authored-by: grok <24+grok@code.cubecraftcreations.com>
Co-committed-by: grok <24+grok@code.cubecraftcreations.com>
This commit was merged in pull request #124.
This commit is contained in:
2026-09-20 11:16:17 -04:00
committed by dev_agent
parent edca25affa
commit 89f517b3ad
19 changed files with 520 additions and 186 deletions
+4 -1
View File
@@ -1,4 +1,5 @@
import { LitElement, html } from "lit";
import { LitElement, html, unsafeCSS } from "lit";
import adminTokens from "../../../custom_components/nestquest/www/nestquest-admin-tokens.css?inline";
import { registerCustomCard, type CardConfig, type HassLike } from "../types";
@@ -8,6 +9,8 @@ export class NestQuestAdminCard extends LitElement {
_config: { state: true },
};
static styles = [unsafeCSS(adminTokens)];
hass?: HassLike;
_config?: CardConfig;
+4 -1
View File
@@ -1,4 +1,5 @@
import { LitElement, html } from "lit";
import { LitElement, html, unsafeCSS } from "lit";
import panelTokens from "../../../custom_components/nestquest/www/nestquest-panel-tokens.css?inline";
import { registerCustomCard, type CardConfig, type HassLike } from "../types";
@@ -8,6 +9,8 @@ export class NestQuestPartyBoardCard extends LitElement {
_config: { state: true },
};
static styles = [unsafeCSS(panelTokens)];
hass?: HassLike;
_config?: CardConfig;
+4 -1
View File
@@ -1,4 +1,5 @@
import { LitElement, html } from "lit";
import { LitElement, html, unsafeCSS } from "lit";
import panelTokens from "../../../custom_components/nestquest/www/nestquest-panel-tokens.css?inline";
import { registerCustomCard, type CardConfig, type HassLike } from "../types";
@@ -8,6 +9,8 @@ export class NestQuestQuestLogCard extends LitElement {
_config: { state: true },
};
static styles = [unsafeCSS(panelTokens)];
hass?: HassLike;
_config?: CardConfig;
+9
View File
@@ -1,3 +1,12 @@
import "./cards/party-board";
import "./cards/quest-log";
import "./cards/admin";
const FONTS_HREF = "/nestquest-static/nestquest-fonts.css";
if (!document.querySelector('link[data-nq-fonts=""]')) {
const link = document.createElement("link");
link.rel = "stylesheet";
link.href = FONTS_HREF;
link.dataset.nqFonts = "";
document.head.appendChild(link);
}
+1
View File
@@ -0,0 +1 @@
/// <reference types="vite/client" />