commit
Meow
diff --git a/public/cursors/default-dark.png b/public/cursors/default-dark.png
new file mode 100644
index 0000000..df31375
Binary files /dev/null and b/public/cursors/default-dark.png differ
diff --git a/public/cursors/pointer-dark.png b/public/cursors/pointer-dark.png
new file mode 100644
index 0000000..554a18d
Binary files /dev/null and b/public/cursors/pointer-dark.png differ
diff --git a/src/server.ts b/src/server.ts
index 3057513..34c170e 100644
--- a/src/server.ts
+++ b/src/server.ts
@@ -92,6 +92,7 @@ import {
type GitService,
} from "./smart-http.ts";
import * as view from "./views.ts";
+import { FONT_ORIGIN } from "./styles/index.ts";
type Env = { Variables: { user: SessionUser | null } };
const app = new Hono<Env>({ strict: false });
@@ -111,7 +112,7 @@ const CSP = [
"script-src 'self'",
"style-src 'self'",
"img-src 'self' data: https:",
- "font-src 'self'",
+ `font-src 'self' ${FONT_ORIGIN}`,
"connect-src 'self'",
"form-action 'self'",
"frame-ancestors 'none'",
diff --git a/src/styles/fonts.css.ts b/src/styles/fonts.css.ts
index 8472e44..70aa7ae 100644
--- a/src/styles/fonts.css.ts
+++ b/src/styles/fonts.css.ts
@@ -7,7 +7,11 @@
import { globalFontFace } from "@vanilla-extract/css";
-const CDN = "https://m.doughmination.gay/f";
+// Exported so the server can name this origin in font-src. A CSP of 'self'
+// alone blocks every face below, and the page silently falls back to system-ui.
+export const FONT_ORIGIN = "https://m.doughmination.gay";
+
+const CDN = `${FONT_ORIGIN}/f`;
const COMIC_CODE = [
{ file: "ComicCode-Regular", weight: 400, style: "normal" },
diff --git a/src/styles/global.css.ts b/src/styles/global.css.ts
index 486316d..5859228 100644
--- a/src/styles/global.css.ts
+++ b/src/styles/global.css.ts
@@ -30,7 +30,11 @@ globalStyle("a", {
globalStyle("a:hover", { textDecoration: "underline" });
-// Self-hosted pixel cursor (dark art, since dough-git is always dark).
+// Self-hosted pixel cursor (dark art only, since dough-git is always dark).
+// The PNGs are pixelarticons' free cursors, downloaded from
+// https://pixelarticons.com/free/cursors/ and committed to public/cursors/ —
+// they are NOT part of the pixelarticons npm package that src/icons.ts reads,
+// so they have to travel with the repo. The trailing numbers are the hotspot.
globalStyle("a, button", {
cursor: "url('/static/cursors/pointer-dark.png') 12 1, pointer",
});
diff --git a/src/styles/index.ts b/src/styles/index.ts
index c765f4f..1884e40 100644
--- a/src/styles/index.ts
+++ b/src/styles/index.ts
@@ -6,5 +6,6 @@ import "./fonts.css.ts";
import "./theme.css.ts";
import "./global.css.ts";
+export { FONT_ORIGIN } from "./fonts.css.ts";
export { classes } from "./app.css.ts";
export type { Classes } from "./app.css.ts";