feat: integrate vite & update site
This commit is contained in:
+2
-2
@@ -1,2 +1,2 @@
|
|||||||
node_modules
|
dist/
|
||||||
generated.css
|
node_modules/
|
||||||
|
|||||||
@@ -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 |
@@ -1,4 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
npm i
|
|
||||||
npx @tailwindcss/cli -i ./style.css -o ./generated.css --minify
|
|
||||||
@@ -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");
|
||||||
+27
-38
@@ -1,42 +1,31 @@
|
|||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
<head>
|
||||||
<head>
|
<meta charset="UTF-8" />
|
||||||
<meta charset="UTF-8">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>futile</title>
|
<title>futile</title>
|
||||||
<link rel="icon" href="static/favicon.svg" type="image/svg+xml">
|
<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
|
||||||
<link rel="stylesheet" href="generated.css">
|
rel="preload"
|
||||||
</head>
|
href="static/fonts/Bokor-Regular.woff2"
|
||||||
|
as="font"
|
||||||
<body id="body" class="m-0 bg-black overflow-hidden flex justify-center items-center h-screen">
|
type="font/woff2"
|
||||||
<h1 id="header" class="futile text-white font-[Bokor] text-[clamp(1em,12em,40vw)] select-none leading-none overflow-hidden"
|
crossorigin
|
||||||
onclick="window.location.href='mailto:me@futile.eu'">futile</h1>
|
/>
|
||||||
</body>
|
<link rel="stylesheet" href="index.css" />
|
||||||
|
</head>
|
||||||
<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>
|
|
||||||
|
|
||||||
|
<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>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -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");
|
||||||
|
});
|
||||||
Generated
+1212
-466
File diff suppressed because it is too large
Load Diff
+9
-3
@@ -1,6 +1,12 @@
|
|||||||
{
|
{
|
||||||
"dependencies": {
|
"scripts": {
|
||||||
"tailwindcss": "^4.1.18",
|
"dev": "vite",
|
||||||
"@tailwindcss/cli": "^4.1.18"
|
"build": "vite build"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@tailwindcss/vite": "^4.2.0",
|
||||||
|
"tailwindcss": "^4.2.0",
|
||||||
|
"typescript": "^5.9.3",
|
||||||
|
"vite": "^7.3.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
import { defineConfig } from "vite";
|
||||||
|
import tailwindcss from "@tailwindcss/vite";
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
publicDir: "assets",
|
||||||
|
plugins: [tailwindcss()],
|
||||||
|
server: {
|
||||||
|
port: 6767,
|
||||||
|
},
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user