feat: integrate vite & update site

This commit is contained in:
2026-02-23 12:56:51 +00:00
parent 0ecad3d53d
commit 6139e1fea8
13 changed files with 1894 additions and 1126 deletions
+2 -2
View File
@@ -1,2 +1,2 @@
node_modules
generated.css
dist/
node_modules/
+13
View File
@@ -0,0 +1,13 @@
{
"lsp": {
"vscode-css-language-server": {
"settings": {
"css": {
"lint": {
"unknownAtRules": "ignore",
},
},
},
},
},
}

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Before

Width:  |  Height:  |  Size: 239 B

After

Width:  |  Height:  |  Size: 239 B

-4
View File
@@ -1,4 +0,0 @@
#!/usr/bin/env bash
npm i
npx @tailwindcss/cli -i ./style.css -o ./generated.css --minify
+9
View File
@@ -0,0 +1,9 @@
@font-face {
font-family: "Bokor";
src: url("assets/Bokor-Regular.woff2") format("woff2");
}
@import "tailwindcss";
@source inline("bg-white");
@source inline("text-black");
+24 -35
View File
@@ -1,42 +1,31 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>futile</title>
<link rel="icon" href="static/favicon.svg" type="image/svg+xml">
<link rel="preload" href="static/fonts/Bokor-Regular.woff2" as="font" type="font/woff2" crossorigin>
<link rel="stylesheet" href="generated.css">
<link rel="icon" href="assets/favicon.svg" type="image/svg+xml" />
<link
rel="preload"
href="static/fonts/Bokor-Regular.woff2"
as="font"
type="font/woff2"
crossorigin
/>
<link rel="stylesheet" href="index.css" />
</head>
<body id="body" class="m-0 bg-black overflow-hidden flex justify-center items-center h-screen">
<h1 id="header" class="futile text-white font-[Bokor] text-[clamp(1em,12em,40vw)] select-none leading-none overflow-hidden"
onclick="window.location.href='mailto:me@futile.eu'">futile</h1>
<body
id="body"
class="flex justify-center items-center h-screen overflow-hidden bg-black"
>
<h1
id="header"
onclick="window.location.href = 'mailto:me@futile.eu'"
class="font-semibold not-supports-[-moz-appearance:none]:font-normal font-[Bokor] text-[clamp(1em,12em,40vw)] select-none leading-none overflow-hidden text-white"
>
futile
</h1>
<script type="module" src="index.ts"></script>
</body>
<script>
function onKonamiCode(callback) {
let input = '';
let konamiCode = '38384040373937396665';
document.addEventListener('keydown', (event) => {
input += ('' + event.keyCode);
if (input === konamiCode) {
return callback();
}
if (!konamiCode.indexOf(input)) return;
input = ('' + event.keyCode);
});
}
onKonamiCode(() => {
let body = document.getElementById("body");
body.classList.toggle("bg-black");
body.classList.toggle("bg-white");
let header = document.getElementById("header");
header.classList.toggle("text-white");
header.classList.toggle("text-black");
})
</script>
</html>
+17
View File
@@ -0,0 +1,17 @@
function onKonamiCode(callback: () => void): void {
let input = "";
const konami =
"arrowuparrowuparrowdownarrowdownarrowleftarrowrightarrowleftarrowrightba";
document.addEventListener("keydown", (e: KeyboardEvent) => {
input = (input + e.key.toLowerCase()).slice(-konami.length);
if (input === konami) callback();
});
}
onKonamiCode(() => {
document.body.classList.toggle("bg-black");
document.body.classList.toggle("bg-white");
const header = document.getElementById("header");
header?.classList.toggle("text-white");
header?.classList.toggle("text-black");
});
+1212 -466
View File
File diff suppressed because it is too large Load Diff
+9 -3
View File
@@ -1,6 +1,12 @@
{
"dependencies": {
"tailwindcss": "^4.1.18",
"@tailwindcss/cli": "^4.1.18"
"scripts": {
"dev": "vite",
"build": "vite build"
},
"devDependencies": {
"@tailwindcss/vite": "^4.2.0",
"tailwindcss": "^4.2.0",
"typescript": "^5.9.3",
"vite": "^7.3.1"
}
}
-18
View File
@@ -1,18 +0,0 @@
@import "tailwindcss";
@source inline("bg-white");
@source inline("text-black");
@font-face {
font-family: "Bokor";
src: url("static/fonts/Bokor-Regular.woff2") format("woff2");
}
.futile {
font-weight: 600;
/* because chromium renders this font like dogshit at weight 600 */
@supports not (-moz-appearance: none) {
font-weight: 400;
}
}
+10
View File
@@ -0,0 +1,10 @@
import { defineConfig } from "vite";
import tailwindcss from "@tailwindcss/vite";
export default defineConfig({
publicDir: "assets",
plugins: [tailwindcss()],
server: {
port: 6767,
},
});