A fast, local-first "redirection engine" for !bang users with a few extra features ^-^

chore: use local font thnks to @ronanru

+3
bun.lock
···
"": {
"name": "unduck",
"dependencies": {
+
"@fontsource/inter": "^5.2.5",
"@types/bun": "^1.2.4",
"vite-plugin-pwa": "^0.21.1",
},
···
"@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.25.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-eSNxISBu8XweVEWG31/JzjkIGbGIJN/TrRoiSVZwZ6pkC6VX4Im/WV2cz559/TXLcYbcrDN8JtKgd9DJVIo8GA=="],
"@esbuild/win32-x64": ["@esbuild/win32-x64@0.25.0", "", { "os": "win32", "cpu": "x64" }, "sha512-ZENoHJBxA20C2zFzh6AI4fT6RraMzjYw4xKWemRTRmRVtN9c5DcH9r/f2ihEkMjOW5eGgrwCslG/+Y/3bL+DHQ=="],
+
+
"@fontsource/inter": ["@fontsource/inter@5.2.5", "", {}, "sha512-kbsPKj0S4p44JdYRFiW78Td8Ge2sBVxi/PIBwmih+RpSXUdvS9nbs1HIiuUSPtRMi14CqLEZ/fbk7dj7vni1Sg=="],
"@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.8", "", { "dependencies": { "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA=="],
-21
index.html
···
title="Unduck"
href="/opensearch.xml"
/>
-
<link
-
rel="preconnect"
-
href="https://fonts.googleapis.com"
-
crossorigin="anonymous"
-
/>
-
<link
-
rel="preconnect"
-
href="https://fonts.gstatic.com"
-
crossorigin="anonymous"
-
/>
-
<link
-
rel="preload"
-
as="style"
-
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
-
/>
-
<link
-
rel="stylesheet"
-
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
-
media="print"
-
onload="this.media='all'"
-
/>
<style>
:root {
/* Light mode colors */
+1
package.json
···
"vite": "^6.1.0"
},
"dependencies": {
+
"@fontsource/inter": "^5.2.5",
"@types/bun": "^1.2.4",
"vite-plugin-pwa": "^0.21.1"
}
-2
src/global.css
···
-
/* @import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"); */
-
/* Font fallback that closely matches Inter metrics */
@font-face {
font-family: "Inter Fallback";
+5
src/main.ts
···
import { bangs } from "./hashbang.ts";
+
+
import "@fontsource/inter/latin-400.css";
+
import "@fontsource/inter/latin-500.css";
+
import "@fontsource/inter/latin-600.css";
+
import "@fontsource/inter/latin-700.css";
import "./global.css";
const CONSTANTS = {
+3
vite.config.ts
···
plugins: [
VitePWA({
registerType: "autoUpdate",
+
workbox: {
+
globPatterns: ["**/*.{js,css,html}", "assets/inter*.woff2"],
+
},
}),
],
});