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:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
/// <reference types="vite/client" />
|
||||
Reference in New Issue
Block a user