From 4999423af4c7c2b08c62437cc8f7e91ed7622611 Mon Sep 17 00:00:00 2001 From: Errilaz Date: Tue, 19 May 2026 00:19:01 +0200 Subject: [PATCH] feat: various improvements --- da.nfin.ch.code-workspace | 6 +++--- hypeup.config.ts | 12 ++++++++++++ oxfmt.config.ts | 5 +---- package.json | 8 ++++---- src/ui/Layout/Taskbar.ts | 2 +- src/ui/Layout/Theme.ts | 9 ++++----- src/ui/Layout/Window.ts | 2 +- src/ui/Projects/Projects.ts | 5 ++++- tsconfig.src.json | 16 ++++++++++++---- 9 files changed, 42 insertions(+), 23 deletions(-) create mode 100644 hypeup.config.ts diff --git a/da.nfin.ch.code-workspace b/da.nfin.ch.code-workspace index bb446d9..e90ad94 100644 --- a/da.nfin.ch.code-workspace +++ b/da.nfin.ch.code-workspace @@ -2,8 +2,8 @@ "folders": [ { "name": "da.nfin.ch", - "path": "." - } + "path": ".", + }, ], "settings": { "oxc.path.oxfmt": "node_modules/.bin/oxfmt", @@ -18,7 +18,7 @@ "explorer.fileNesting.enabled": true, "explorer.fileNesting.patterns": { "tsconfig.json": "tsconfig.*.json", - "package.json": "bun.lock, bunfig.toml, *.bun.plugin.ts, ox*.config.ts, .gitignore, .mirrorignore, regime.config.json, commitlint.config.*, release.config.*js", + "package.json": "bun.lock, bunfig.toml, *.bun.plugin.ts, ox*.config.ts, .gitignore, .mirrorignore, regime.*.json, regime.internal.json, commitlint.config.*, release.config.*js, hypeup.config.*", "vite.config.ts": "*.vite.plugin.ts", "README.md": "LICENSE, LICENSE.md", }, diff --git a/hypeup.config.ts b/hypeup.config.ts new file mode 100644 index 0000000..44e8357 --- /dev/null +++ b/hypeup.config.ts @@ -0,0 +1,12 @@ +import { defineConfig } from "hypeup" + +export default defineConfig({ + clean: true, + dir: "src/routes", + vite: { + server: { + allowedHosts: [Bun.env.HOSTNAME!], + host: true, + }, + }, +}) diff --git a/oxfmt.config.ts b/oxfmt.config.ts index c3bffa9..569ec45 100644 --- a/oxfmt.config.ts +++ b/oxfmt.config.ts @@ -15,13 +15,10 @@ export default defineConfig({ ignorePatterns: ["**/*.gen.ts"], overrides: [ { - files: [ - "**/ui/**/*.ts" - ], + files: ["**/ui/**/*.ts"], options: { printWidth: 60, }, }, ], }) - diff --git a/package.json b/package.json index 1b53a08..dbe1664 100644 --- a/package.json +++ b/package.json @@ -22,10 +22,10 @@ "check": "tsgo --build", "test": "bun test --pass-with-no-tests --tsconfig-override tsconfig.test.json", "lint": "oxlint", - "start": "hypeup generate --dir src/routes --watch", - "build": "hypeup generate --dir src/routes", - "publish:main": "rsync -avz dist/ quickbasic.org:~/da.nfin.ch", - "publish:errilaz": "rsync -avz errilaz.org/ quickbasic.org:~/errilaz.org", + "start": "hypeup generate --watch", + "build": "hypeup generate", + "publish:main": "rsync -avz --delete dist/ da.nfin.ch:~/da.nfin.ch", + "publish:errilaz": "rsync -avz --delete errilaz.org/ da.nfin.ch:~/errilaz.org", "publish": "bun run publish:main && bun run publish:errilaz" }, "files": [ diff --git a/src/ui/Layout/Taskbar.ts b/src/ui/Layout/Taskbar.ts index 767e9f4..40cc7be 100644 --- a/src/ui/Layout/Taskbar.ts +++ b/src/ui/Layout/Taskbar.ts @@ -86,7 +86,7 @@ function Task({ textAlign.left, div( width("100%"), - pad("4px"), + gap("4px"), display.flex, justifyContent.flexStart, img( diff --git a/src/ui/Layout/Theme.ts b/src/ui/Layout/Theme.ts index 67e86af..d4dfc99 100644 --- a/src/ui/Layout/Theme.ts +++ b/src/ui/Layout/Theme.ts @@ -12,8 +12,8 @@ export default function Theme() { ), ), rule("a.button", [ - textDecoration("none"), - cursor("default"), + textDecoration.none, + cursor._default, display.flex, alignItems.center, ]), @@ -27,14 +27,13 @@ export default function Theme() { fontSize("14px"), rule("h1", fontSize("28px")), rule("h2", fontSize("20px")), - rule( - "aside", + rule(aside, float.right, marginLeft("20px"), paddingBottom(0), ), rule("p, h1, h2, h3, ul", margin("12px 0")), ), - rule("iframe", border(0)), + rule(iframe, border(0)), ] } diff --git a/src/ui/Layout/Window.ts b/src/ui/Layout/Window.ts index 64c7e7c..14814e9 100644 --- a/src/ui/Layout/Window.ts +++ b/src/ui/Layout/Window.ts @@ -1,7 +1,7 @@ const DEFAULT_WIDTH = "770px" export default function Window( - props: { title: string; width?: Content; flat?: boolean }, + props: { title: Content; width?: Content; flat?: boolean }, ...contents: Content[] ) { return article.window( diff --git a/src/ui/Projects/Projects.ts b/src/ui/Projects/Projects.ts index 8f950e4..6e1cdd9 100644 --- a/src/ui/Projects/Projects.ts +++ b/src/ui/Projects/Projects.ts @@ -2,12 +2,15 @@ import Layout from "ui/Layout" import Window from "ui/Layout/Window" const title = "Dan Finch - Projects" +const sigitex = "https://sigitex.com" export default function Projects() { return Layout( { title, url: "/projects" }, Window( - { title }, + { + title: span(title, " (", a({ href: sigitex }, color.yellow, "SIGITEX.COM"), ")") + }, backgroundColor.black, display.flex, iframe({ src: "https://sigitex.com" }, diff --git a/tsconfig.src.json b/tsconfig.src.json index d824c33..58605e3 100644 --- a/tsconfig.src.json +++ b/tsconfig.src.json @@ -3,10 +3,18 @@ "compilerOptions": { "composite": true, "paths": { - "ui/*": ["./src/ui/*"], - "shared/*": ["./src/shared/*"], - "assets/*": ["./assets/*"], - "public/*": ["./public/*"] + "ui/*": [ + "./src/ui/*" + ], + "shared/*": [ + "./src/shared/*" + ], + "assets/*": [ + "./assets/*" + ], + "public/*": [ + "./public/*" + ] } }, "include": [