Dough Git

commit

Use iconsax icons and Comic Code for monospace

commit
bb52ce2732266a2dcde4b6d3ec21b374ea105a34
author
Clove Twilight <[email protected]>
date
2026-10-29 08:59
Matches doughmination.gay's icon set and fonts.

diff --git a/bun.lock b/bun.lock
index aa5aed7..e34649e 100644
--- a/bun.lock
+++ b/bun.lock
@@ -6,6 +6,7 @@
       "name": "cdn",
       "dependencies": {
         "hono": "^4.13.13",
+        "iconsax": "0.1.1",
         "jose": "^6.2.13",
         "marked": "^18.1.1",
       },
@@ -278,6 +279,8 @@
 
     "hono": ["[email protected]", "", {}, "sha512-CQ46U0ZkAGmbT/4UxdzzGJpacP2IeKgY4a5/tOI9AABbpOMfK739wfDXmv1usCk+3RkKj1hQy4/fjhiwa2xlrA=="],
 
+    "iconsax": ["[email protected]", "", { "bin": { "iconsax": "bin/iconsax.js" } }, "sha512-/HXomG+SuhytKH/Yw4ZdunDGyWP02Osuk/pjony1k9CCMOsg7dUpnomu7HZUOHNu0yK0b3phErjH2IgUTJFjPA=="],
+
     "is-reference": ["[email protected]", "", { "dependencies": { "@types/estree": "^1.0.6" } }, "sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw=="],
 
     "jose": ["[email protected]", "", {}, "sha512-7TIg10ZE1x82YediN+lcrPNvGMKge9yFHQD+Qho/b8y2adfugU3AsvvHfxV0fzyFllT6l9xCjf4RWY9g/Z9PJQ=="],
diff --git a/package.json b/package.json
index 66dd63e..898d2db 100644
--- a/package.json
+++ b/package.json
@@ -13,6 +13,7 @@
   },
   "dependencies": {
     "hono": "^4.13.13",
+    "iconsax": "0.1.1",
     "jose": "^6.2.13",
     "marked": "^18.1.1"
   },
diff --git a/public/style.css b/public/style.css
index 94d6db9..638ff9c 100644
--- a/public/style.css
+++ b/public/style.css
@@ -31,6 +31,40 @@
   font-display: swap;
 }
 
+/* Comic Code for anything monospace */
+
+@font-face {
+  font-family: "Comic Code";
+  src: url("https://raw.doughmination.gay/f/Comic-Code/woff2/ComicCode-Regular.woff2") format("woff2");
+  font-weight: 400;
+  font-style: normal;
+  font-display: swap;
+}
+
+@font-face {
+  font-family: "Comic Code";
+  src: url("https://raw.doughmination.gay/f/Comic-Code/woff2/ComicCode-Italic.woff2") format("woff2");
+  font-weight: 400;
+  font-style: italic;
+  font-display: swap;
+}
+
+@font-face {
+  font-family: "Comic Code";
+  src: url("https://raw.doughmination.gay/f/Comic-Code/woff2/ComicCode-Medium.woff2") format("woff2");
+  font-weight: 500;
+  font-style: normal;
+  font-display: swap;
+}
+
+@font-face {
+  font-family: "Comic Code";
+  src: url("https://raw.doughmination.gay/f/Comic-Code/woff2/ComicCode-Bold.woff2") format("woff2");
+  font-weight: 700;
+  font-style: normal;
+  font-display: swap;
+}
+
 :root {
   --bg: #0b0a0d;
   --raised: rgb(255 255 255 / 3.5%);
@@ -40,7 +74,7 @@
   --accent: #eb459e;
   --accent-dim: rgb(235 69 158 / 14%);
   --danger: #ed4245;
-  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
+  --mono: "Comic Code", ui-monospace, SFMono-Regular, Menlo, monospace;
 
   color-scheme: dark;
   font-family: "IBM Plex Sans", system-ui, sans-serif;
@@ -515,3 +549,11 @@ footer img { border-radius: 50%; }
   .row .remove,
   .drop { transition: none; }
 }
+
+/* iconsax renders its <svg> inside the element */
+iconsax-icon {
+  display: inline-flex;
+  flex-shrink: 0;
+  vertical-align: -0.2em;
+  margin-right: 0.35em;
+}
diff --git a/vite.config.ts b/vite.config.ts
index e7a0a45..213079a 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -8,6 +8,10 @@ export default defineConfig({
   root: "web",
   publicDir: "../public",
   plugins: [svelte()],
+  // iconsax fetches its icon data relative to its own file, which pre-bundling breaks
+  optimizeDeps: {
+    exclude: ["iconsax"],
+  },
   build: {
     outDir: "../dist",
     emptyOutDir: true,
diff --git a/web/src/iconsax.d.ts b/web/src/iconsax.d.ts
new file mode 100644
index 0000000..98e92f2
--- /dev/null
+++ b/web/src/iconsax.d.ts
@@ -0,0 +1,14 @@
+// <iconsax-icon> is registered by `import "iconsax"` in main.ts
+declare module "svelte/elements" {
+  export interface SvelteHTMLElements {
+    "iconsax-icon": HTMLAttributes<HTMLElement> & {
+      name: string;
+      type?: "bold" | "broken" | "bulk" | "linear" | "outline" | "twotone";
+      size?: number | string;
+      color?: string;
+      pro?: boolean;
+    };
+  }
+}
+
+export {};
diff --git a/web/src/lib/Icon.svelte b/web/src/lib/Icon.svelte
index 678dd7f..7353074 100644
--- a/web/src/lib/Icon.svelte
+++ b/web/src/lib/Icon.svelte
@@ -1,14 +1,12 @@
 <script lang="ts">
-  // Small blocky stroke icons.
-  let { name }: { name: "folder" | "file" | "upload" } = $props();
+  // The three icons the browser uses, from iconsax like the rest of doughmination.gay
+  const NAMES = {
+    folder: "folder-2",
+    file: "document",
+    upload: "document-upload",
+  };
+
+  let { name }: { name: keyof typeof NAMES } = $props();
 </script>
 
-<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="square" style="vertical-align:-2px;margin-right:0.35em">
-  {#if name === "folder"}
-    <path d="M3 6h6l2 3h10v11H3V6z" />
-  {:else if name === "file"}
-    <path d="M5 2h10l4 4v16H5V2z" /><path d="M15 2v4h4" />
-  {:else}
-    <path d="M12 17V4M7 9l5-5 5 5M4 21h16" />
-  {/if}
-</svg>
+<iconsax-icon name={NAMES[name]} type="bulk" size="15" aria-hidden="true"></iconsax-icon>
diff --git a/web/src/main.ts b/web/src/main.ts
index 99fc6a4..09e4247 100644
--- a/web/src/main.ts
+++ b/web/src/main.ts
@@ -1,4 +1,6 @@
 import { mount } from "svelte";
 import App from "./App.svelte";
+// Registers <iconsax-icon>, the icon set doughmination.gay uses
+import "iconsax";
 
 mount(App, { target: document.getElementById("app")! });