diff --git a/.gitignore b/.gitignore index 05eef16..d2b4c48 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,9 @@ * -!.gitignore - !site/ -!site/**/ - -!*.nu - -!*.ts -!*.css +!site/_includes/ +!site/assets/ +!site/blog/ !*.md !*.vto @@ -17,4 +12,11 @@ !*.webp !*.woff2 -!deno.* +!.gitignore + +!*.json +!*.lock +!*.ts +!*.tsx + +!*.nu diff --git a/README.md b/README.md index fb3e71c..dce5e00 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,20 @@ # RGBCube's Homepage -The home directory and journal of RGBCube and his work. +The official website and link portal of RGBCube and his work. ## Building To build the site, you will need deno, simply run this command: -```sh +``` deno task build ``` -and the site contents will be under the `_site` directory. +and the site contents will be under the `_site/` directory. ## License -All the human writing (non-HTML and not templating related) under the `site` +All the human writing (non-HTML and not templating related) under the `site/` directory is licensed under [CC BY-NC-ND 4.0](https://creativecommons.org/licenses/by-nc-nd/4.0/). @@ -22,7 +22,7 @@ The other HTML and templating code is licensed under the GPU General Public License (`LICENSE_GPL.md`): ``` -Copyright (C) 2023-present RGBCube +Copyright (C) 2023-present RGBCube This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/_config.ts b/_config.ts new file mode 100644 index 0000000..ec6418f --- /dev/null +++ b/_config.ts @@ -0,0 +1,87 @@ +import lume from "lume/mod.ts"; + +import codeHighlight from "lume/plugins/code_highlight.ts"; +import esbuild from "lume/plugins/esbuild.ts"; +import feed from "lume/plugins/feed.ts"; +import jsx from "lume/plugins/jsx.ts"; +import minifyHTML from "lume/plugins/minify_html.ts"; +import sitemap from "lume/plugins/sitemap.ts"; + +const site = lume({ + src: "./site", + + server: { + debugBar: false, + }, +}); + +site.add("."); + +site.use(jsx()); + +site.process([".html"], (pages) => { + pages.forEach((page) => { + const document = page.document!; + + document.querySelectorAll("table").forEach((table) => { + const div = document.createElement("div"); + + table.classList.add("rotated"); + div.classList.add("overflow", "rotated"); + + table.parentNode!.insertBefore(div, table); + div.appendChild(table); + }); + + document.querySelectorAll("pre code").forEach((code) => { + const pre = code.parentElement!; + const div = document.createElement("div"); + + code.classList.add("rotated"); + pre.classList.add("rotated"); + div.classList.add("overflow", "rotated"); + + pre.parentNode?.insertBefore(div, pre); + div.appendChild(pre); + }); + }); +}); + +site.use(feed({ + output: ["/blog.rss", "/blog.json"], + + query: "type=article", + sort: "date=asc", + limit: Infinity, + + info: { + title: "RGBCube's Blog", + description: + "The blog where RGBCube dumps his schizophrenic ramblings about software and all the likes.", + generator: false, + }, + items: { + title: "=title", + description: "=description", + published: "=date", + content: "$.content", + }, +})); + +site.use(sitemap({ + items: { + // @ts-ignore: We don't want lastmods. + lastmod: null, + }, +})); + +site.use(esbuild()); +site.use(codeHighlight()); +site.use(minifyHTML({ + options: { + minify_css: true, + minify_js: true, + }, +})); + +export default site; diff --git a/apply.nu b/apply.nu index 3539cfb..ecda059 100755 --- a/apply.nu +++ b/apply.nu @@ -14,7 +14,7 @@ def main [] { if (pwd | str starts-with "/data/data/com.termux") { sync ./ nine:site - ssh -tt nine " + ssh -qtt nine " cd site LUME_DRAFTS=false nix run default#deno -- task build --location https://rgbcu.be/ " @@ -28,13 +28,13 @@ def main [] { let host = "root@best"; - ssh -tt $host " + ssh -qtt $host " rm --force --recursive /var/www/site mkdir /var/www/site " sync --chown nginx:users ./ ($host + ":/var/www/site") - ssh -tt $host " + ssh -qtt $host " chown nginx:users -R /var/www chmod 775 -R /var/www " diff --git a/deno.json b/deno.json index bb27e5b..26cc458 100644 --- a/deno.json +++ b/deno.json @@ -1,26 +1,24 @@ { - "imports": { - "lume/": "https://deno.land/x/lume@v3.0.2/", - "lume/jsx-runtime": "https://deno.land/x/ssx@v0.1.10/jsx-runtime.ts" + "compilerOptions": { + "jsx": "react-jsx", + "jsxImportSource": "lume", + "types": [ + "lume/types.ts" + ] }, "tasks": { - "lume": "echo \"import 'lume/cli.ts'\" | deno run --allow-all - --config site.ts", + "lume": "echo \"import 'lume/cli.ts'\" | deno run --allow-all -", "build": "deno task lume", "serve": "deno task lume --serve" }, - "compilerOptions": { - "types": [ - "lume/types.ts" - ], - "jsx": "react-jsx", - "jsxImportSource": "lume" + "imports": { + "std/": "https://deno.land/std@0.217.0/", + "lume/": "https://deno.land/x/lume@v3.0.2/", + "lume/jsx-runtime": "https://deno.land/x/ssx@v0.1.9/jsx-runtime.ts" }, - "unstable": [ - "temporal" - ], "lint": { "plugins": [ - "https://deno.land/x/lume@v3.0.2/lint.ts" + "https://deno.land/x/lume@v3.0.1/lint.ts" ] } } diff --git a/deno.lock b/deno.lock index 1d63253..6c9db01 100644 --- a/deno.lock +++ b/deno.lock @@ -21,7 +21,6 @@ "jsr:@std/http@1.0.16": "1.0.16", "jsr:@std/json@^1.0.2": "1.0.2", "jsr:@std/jsonc@1.0.2": "1.0.2", - "jsr:@std/media-types@1.1.0": "1.1.0", "jsr:@std/media-types@^1.1.0": "1.1.0", "jsr:@std/net@^1.0.4": "1.0.4", "jsr:@std/path@1.0.8": "1.0.8", @@ -33,8 +32,7 @@ "jsr:@std/toml@^1.0.3": "1.0.6", "jsr:@std/yaml@1.0.6": "1.0.6", "jsr:@std/yaml@^1.0.5": "1.0.6", - "npm:@tailwindcss/node@4.1.7": "4.1.7", - "npm:@tailwindcss/oxide@4.1.7": "4.1.7", + "npm:@lumeland/ssx@*": "0.1.10", "npm:@types/estree@1.0.6": "1.0.6", "npm:estree-walker@3.0.3": "3.0.3", "npm:highlight.js@11.11.1": "11.11.1", @@ -43,8 +41,8 @@ "npm:markdown-it-deflist@3.0.0": "3.0.0", "npm:markdown-it@14.1.0": "14.1.0", "npm:meriyah@6.0.5": "6.0.5", - "npm:remove-markdown@0.6.2": "0.6.2", - "npm:tailwindcss@4.1.7": "4.1.7" + "npm:react@*": "19.0.0", + "npm:remove-markdown@0.6.2": "0.6.2" }, "jsr": { "@davidbonnet/astring@1.8.6": { @@ -105,7 +103,7 @@ "jsr:@std/encoding@^1.0.10", "jsr:@std/fmt@^1.0.8", "jsr:@std/html@^1.0.4", - "jsr:@std/media-types@^1.1.0", + "jsr:@std/media-types", "jsr:@std/net", "jsr:@std/path@^1.0.9", "jsr:@std/streams" @@ -146,150 +144,8 @@ } }, "npm": { - "@ampproject/remapping@2.3.0": { - "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", - "dependencies": [ - "@jridgewell/gen-mapping", - "@jridgewell/trace-mapping" - ] - }, - "@emnapi/core@1.4.3": { - "integrity": "sha512-4m62DuCE07lw01soJwPiBGC0nAww0Q+RY70VZ+n49yDIO13yyinhbWCeNnaob0lakDtWQzSdtNWzJeOJt2ma+g==", - "dependencies": [ - "@emnapi/wasi-threads", - "tslib" - ] - }, - "@emnapi/runtime@1.4.3": { - "integrity": "sha512-pBPWdu6MLKROBX05wSNKcNb++m5Er+KQ9QkB+WVM+pW2Kx9hoSrVTnu3BdkI5eBLZoKu/J6mW/B6i6bJB2ytXQ==", - "dependencies": [ - "tslib" - ] - }, - "@emnapi/wasi-threads@1.0.2": { - "integrity": "sha512-5n3nTJblwRi8LlXkJ9eBzu+kZR8Yxcc7ubakyQTFzPMtIhFpUBRbsnc2Dv88IZDIbCDlBiWrknhB4Lsz7mg6BA==", - "dependencies": [ - "tslib" - ] - }, - "@isaacs/fs-minipass@4.0.1": { - "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==", - "dependencies": [ - "minipass" - ] - }, - "@jridgewell/gen-mapping@0.3.8": { - "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", - "dependencies": [ - "@jridgewell/set-array", - "@jridgewell/sourcemap-codec", - "@jridgewell/trace-mapping" - ] - }, - "@jridgewell/resolve-uri@3.1.2": { - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==" - }, - "@jridgewell/set-array@1.2.1": { - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==" - }, - "@jridgewell/sourcemap-codec@1.5.0": { - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==" - }, - "@jridgewell/trace-mapping@0.3.25": { - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dependencies": [ - "@jridgewell/resolve-uri", - "@jridgewell/sourcemap-codec" - ] - }, - "@napi-rs/wasm-runtime@0.2.10": { - "integrity": "sha512-bCsCyeZEwVErsGmyPNSzwfwFn4OdxBj0mmv6hOFucB/k81Ojdu68RbZdxYsRQUPc9l6SU5F/cG+bXgWs3oUgsQ==", - "dependencies": [ - "@emnapi/core", - "@emnapi/runtime", - "@tybys/wasm-util" - ] - }, - "@tailwindcss/node@4.1.7": { - "integrity": "sha512-9rsOpdY9idRI2NH6CL4wORFY0+Q6fnx9XP9Ju+iq/0wJwGD5IByIgFmwVbyy4ymuyprj8Qh4ErxMKTUL4uNh3g==", - "dependencies": [ - "@ampproject/remapping", - "enhanced-resolve", - "jiti", - "lightningcss", - "magic-string", - "source-map-js", - "tailwindcss" - ] - }, - "@tailwindcss/oxide-android-arm64@4.1.7": { - "integrity": "sha512-IWA410JZ8fF7kACus6BrUwY2Z1t1hm0+ZWNEzykKmMNM09wQooOcN/VXr0p/WJdtHZ90PvJf2AIBS/Ceqx1emg==" - }, - "@tailwindcss/oxide-darwin-arm64@4.1.7": { - "integrity": "sha512-81jUw9To7fimGGkuJ2W5h3/oGonTOZKZ8C2ghm/TTxbwvfSiFSDPd6/A/KE2N7Jp4mv3Ps9OFqg2fEKgZFfsvg==" - }, - "@tailwindcss/oxide-darwin-x64@4.1.7": { - "integrity": "sha512-q77rWjEyGHV4PdDBtrzO0tgBBPlQWKY7wZK0cUok/HaGgbNKecegNxCGikuPJn5wFAlIywC3v+WMBt0PEBtwGw==" - }, - "@tailwindcss/oxide-freebsd-x64@4.1.7": { - "integrity": "sha512-RfmdbbK6G6ptgF4qqbzoxmH+PKfP4KSVs7SRlTwcbRgBwezJkAO3Qta/7gDy10Q2DcUVkKxFLXUQO6J3CRvBGw==" - }, - "@tailwindcss/oxide-linux-arm-gnueabihf@4.1.7": { - "integrity": "sha512-OZqsGvpwOa13lVd1z6JVwQXadEobmesxQ4AxhrwRiPuE04quvZHWn/LnihMg7/XkN+dTioXp/VMu/p6A5eZP3g==" - }, - "@tailwindcss/oxide-linux-arm64-gnu@4.1.7": { - "integrity": "sha512-voMvBTnJSfKecJxGkoeAyW/2XRToLZ227LxswLAwKY7YslG/Xkw9/tJNH+3IVh5bdYzYE7DfiaPbRkSHFxY1xA==" - }, - "@tailwindcss/oxide-linux-arm64-musl@4.1.7": { - "integrity": "sha512-PjGuNNmJeKHnP58M7XyjJyla8LPo+RmwHQpBI+W/OxqrwojyuCQ+GUtygu7jUqTEexejZHr/z3nBc/gTiXBj4A==" - }, - "@tailwindcss/oxide-linux-x64-gnu@4.1.7": { - "integrity": "sha512-HMs+Va+ZR3gC3mLZE00gXxtBo3JoSQxtu9lobbZd+DmfkIxR54NO7Z+UQNPsa0P/ITn1TevtFxXTpsRU7qEvWg==" - }, - "@tailwindcss/oxide-linux-x64-musl@4.1.7": { - "integrity": "sha512-MHZ6jyNlutdHH8rd+YTdr3QbXrHXqwIhHw9e7yXEBcQdluGwhpQY2Eku8UZK6ReLaWtQ4gijIv5QoM5eE+qlsA==" - }, - "@tailwindcss/oxide-wasm32-wasi@4.1.7": { - "integrity": "sha512-ANaSKt74ZRzE2TvJmUcbFQ8zS201cIPxUDm5qez5rLEwWkie2SkGtA4P+GPTj+u8N6JbPrC8MtY8RmJA35Oo+A==", - "dependencies": [ - "@emnapi/core", - "@emnapi/runtime", - "@emnapi/wasi-threads", - "@napi-rs/wasm-runtime", - "@tybys/wasm-util", - "tslib" - ] - }, - "@tailwindcss/oxide-win32-arm64-msvc@4.1.7": { - "integrity": "sha512-HUiSiXQ9gLJBAPCMVRk2RT1ZrBjto7WvqsPBwUrNK2BcdSxMnk19h4pjZjI7zgPhDxlAbJSumTC4ljeA9y0tEw==" - }, - "@tailwindcss/oxide-win32-x64-msvc@4.1.7": { - "integrity": "sha512-rYHGmvoHiLJ8hWucSfSOEmdCBIGZIq7SpkPRSqLsH2Ab2YUNgKeAPT1Fi2cx3+hnYOrAb0jp9cRyode3bBW4mQ==" - }, - "@tailwindcss/oxide@4.1.7": { - "integrity": "sha512-5SF95Ctm9DFiUyjUPnDGkoKItPX/k+xifcQhcqX5RA85m50jw1pT/KzjdvlqxRja45Y52nR4MR9fD1JYd7f8NQ==", - "dependencies": [ - "@tailwindcss/oxide-android-arm64", - "@tailwindcss/oxide-darwin-arm64", - "@tailwindcss/oxide-darwin-x64", - "@tailwindcss/oxide-freebsd-x64", - "@tailwindcss/oxide-linux-arm-gnueabihf", - "@tailwindcss/oxide-linux-arm64-gnu", - "@tailwindcss/oxide-linux-arm64-musl", - "@tailwindcss/oxide-linux-x64-gnu", - "@tailwindcss/oxide-linux-x64-musl", - "@tailwindcss/oxide-wasm32-wasi", - "@tailwindcss/oxide-win32-arm64-msvc", - "@tailwindcss/oxide-win32-x64-msvc", - "detect-libc", - "tar" - ] - }, - "@tybys/wasm-util@0.9.0": { - "integrity": "sha512-6+7nlbMVX/PVDCwaIQ8nTOPveOcFLSt8GcXdx8hD0bt39uWxYT88uXzqTd4fTvqta7oeUJqudepapKNt2DYJFw==", - "dependencies": [ - "tslib" - ] + "@lumeland/ssx@0.1.10": { + "integrity": "sha512-mZQYxtXkFYAUnFhXH+nOzhxp32ZsRMmiTLBNlrZu5qtXgHh+5PE5i1fVZ8leZ4yxOC0besV4PYZ78wQlf2Ggog==" }, "@types/estree@1.0.6": { "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==" @@ -300,19 +156,6 @@ "argparse@2.0.1": { "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, - "chownr@3.0.0": { - "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==" - }, - "detect-libc@2.0.4": { - "integrity": "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==" - }, - "enhanced-resolve@5.18.1": { - "integrity": "sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==", - "dependencies": [ - "graceful-fs", - "tapable" - ] - }, "entities@4.5.0": { "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==" }, @@ -322,79 +165,21 @@ "@types/estree@1.0.7" ] }, - "graceful-fs@4.2.11": { - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" - }, "highlight.js@11.11.1": { "integrity": "sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==" }, - "jiti@2.4.2": { - "integrity": "sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==" - }, - "lightningcss-darwin-arm64@1.30.1": { - "integrity": "sha512-c8JK7hyE65X1MHMN+Viq9n11RRC7hgin3HhYKhrMyaXflk5GVplZ60IxyoVtzILeKr+xAJwg6zK6sjTBJ0FKYQ==" - }, - "lightningcss-darwin-x64@1.30.1": { - "integrity": "sha512-k1EvjakfumAQoTfcXUcHQZhSpLlkAuEkdMBsI/ivWw9hL+7FtilQc0Cy3hrx0AAQrVtQAbMI7YjCgYgvn37PzA==" - }, - "lightningcss-freebsd-x64@1.30.1": { - "integrity": "sha512-kmW6UGCGg2PcyUE59K5r0kWfKPAVy4SltVeut+umLCFoJ53RdCUWxcRDzO1eTaxf/7Q2H7LTquFHPL5R+Gjyig==" - }, - "lightningcss-linux-arm-gnueabihf@1.30.1": { - "integrity": "sha512-MjxUShl1v8pit+6D/zSPq9S9dQ2NPFSQwGvxBCYaBYLPlCWuPh9/t1MRS8iUaR8i+a6w7aps+B4N0S1TYP/R+Q==" - }, - "lightningcss-linux-arm64-gnu@1.30.1": { - "integrity": "sha512-gB72maP8rmrKsnKYy8XUuXi/4OctJiuQjcuqWNlJQ6jZiWqtPvqFziskH3hnajfvKB27ynbVCucKSm2rkQp4Bw==" - }, - "lightningcss-linux-arm64-musl@1.30.1": { - "integrity": "sha512-jmUQVx4331m6LIX+0wUhBbmMX7TCfjF5FoOH6SD1CttzuYlGNVpA7QnrmLxrsub43ClTINfGSYyHe2HWeLl5CQ==" - }, - "lightningcss-linux-x64-gnu@1.30.1": { - "integrity": "sha512-piWx3z4wN8J8z3+O5kO74+yr6ze/dKmPnI7vLqfSqI8bccaTGY5xiSGVIJBDd5K5BHlvVLpUB3S2YCfelyJ1bw==" - }, - "lightningcss-linux-x64-musl@1.30.1": { - "integrity": "sha512-rRomAK7eIkL+tHY0YPxbc5Dra2gXlI63HL+v1Pdi1a3sC+tJTcFrHX+E86sulgAXeI7rSzDYhPSeHHjqFhqfeQ==" - }, "lightningcss-wasm@1.30.1": { "integrity": "sha512-KJTnKEn0REV6DoJzxG0m5EKVEFA1CVE1isDYpXjsuqWXwLKFPJtA9Z9BSzPZJwAZFN2KaUzy+IWGP59p5bm2sA==", "dependencies": [ "napi-wasm" ] }, - "lightningcss-win32-arm64-msvc@1.30.1": { - "integrity": "sha512-mSL4rqPi4iXq5YVqzSsJgMVFENoa4nGTT/GjO2c0Yl9OuQfPsIfncvLrEW6RbbB24WtZ3xP/2CCmI3tNkNV4oA==" - }, - "lightningcss-win32-x64-msvc@1.30.1": { - "integrity": "sha512-PVqXh48wh4T53F/1CCu8PIPCxLzWyCnn/9T5W1Jpmdy5h9Cwd+0YQS6/LwhHXSafuc61/xg9Lv5OrCby6a++jg==" - }, - "lightningcss@1.30.1": { - "integrity": "sha512-xi6IyHML+c9+Q3W0S4fCQJOym42pyurFiJUHEcEyHS0CeKzia4yZDEsLlqOFykxOdHpNy0NmvVO31vcSqAxJCg==", - "dependencies": [ - "detect-libc", - "lightningcss-darwin-arm64", - "lightningcss-darwin-x64", - "lightningcss-freebsd-x64", - "lightningcss-linux-arm-gnueabihf", - "lightningcss-linux-arm64-gnu", - "lightningcss-linux-arm64-musl", - "lightningcss-linux-x64-gnu", - "lightningcss-linux-x64-musl", - "lightningcss-win32-arm64-msvc", - "lightningcss-win32-x64-msvc" - ] - }, "linkify-it@5.0.0": { "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", "dependencies": [ "uc.micro" ] }, - "magic-string@0.30.17": { - "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", - "dependencies": [ - "@jridgewell/sourcemap-codec" - ] - }, "markdown-it-attrs@4.3.1_markdown-it@14.1.0": { "integrity": "sha512-/ko6cba+H6gdZ0DOw7BbNMZtfuJTRp9g/IrGIuz8lYc/EfnmWRpaR3CFPnNbVz0LDvF8Gf1hFGPqrQqq7De0rg==", "dependencies": [ @@ -421,55 +206,20 @@ "meriyah@6.0.5": { "integrity": "sha512-SrMqQCox7TTwtftWKHy/ZaVe+ZRpRl20pAgDo+PS9hzcAJrMjYsBJQPPiLXTnjztrqdfGS+Zz99r6Bwvydta1w==" }, - "minipass@7.1.2": { - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==" - }, - "minizlib@3.0.2": { - "integrity": "sha512-oG62iEk+CYt5Xj2YqI5Xi9xWUeZhDI8jjQmC5oThVH5JGCTgIjr7ciJDzC7MBzYd//WvR1OTmP5Q38Q8ShQtVA==", - "dependencies": [ - "minipass" - ] - }, - "mkdirp@3.0.1": { - "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==" - }, "napi-wasm@1.1.3": { "integrity": "sha512-h/4nMGsHjZDCYmQVNODIrYACVJ+I9KItbG+0si6W/jSjdA9JbWDoU4LLeMXVcEQGHjttI2tuXqDrbGF7qkUHHg==" }, "punycode.js@2.3.1": { "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==" }, + "react@19.0.0": { + "integrity": "sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==" + }, "remove-markdown@0.6.2": { "integrity": "sha512-EijDXJZbzpGbQBd852ViUzcqgpMujthM+SAEHiWCMcZonRbZ+xViWKLJA/vrwbDwYdxrs1aFDjpBhcGrZoJRGA==" }, - "source-map-js@1.2.1": { - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==" - }, - "tailwindcss@4.1.7": { - "integrity": "sha512-kr1o/ErIdNhTz8uzAYL7TpaUuzKIE6QPQ4qmSdxnoX/lo+5wmUHQA6h3L5yIqEImSRnAAURDirLu/BgiXGPAhg==" - }, - "tapable@2.2.2": { - "integrity": "sha512-Re10+NauLTMCudc7T5WLFLAwDhQ0JWdrMK+9B2M8zR5hRExKmsRDCBA7/aV/pNJFltmBFO5BAMlQFi/vq3nKOg==" - }, - "tar@7.4.3": { - "integrity": "sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==", - "dependencies": [ - "@isaacs/fs-minipass", - "chownr", - "minipass", - "minizlib", - "mkdirp", - "yallist" - ] - }, - "tslib@2.8.1": { - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" - }, "uc.micro@2.1.0": { "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==" - }, - "yallist@5.0.0": { - "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==" } }, "remote": { @@ -596,6 +346,8 @@ "https://deno.land/x/denoflate@1.2.1/pkg/denoflate.js": "b9f9ad9457d3f12f28b1fb35c555f57443427f74decb403113d67364e4f2caf4", "https://deno.land/x/denoflate@1.2.1/pkg/denoflate_bg.wasm.js": "d581956245407a2115a3d7e8d85a9641c032940a8e810acbd59ca86afd34d44d", "https://deno.land/x/esbuild@v0.25.4/mod.js": "566ac37ed8acdb49b5cd72e0276de4014eb47b112a8ef31e30659220d8119226", + "https://deno.land/x/lume@v3.0.1/core/utils/lume_config.ts": "3715adca952a4c6054b0f4a25792859ae683a85b11c225b36d027ac26baabe95", + "https://deno.land/x/lume@v3.0.1/lint.ts": "4b369361e0cff20a8dfd9e3ff8cb642aa805e7532825ea3a5378eb1f80901fc6", "https://deno.land/x/lume@v3.0.2/cli.ts": "a3254363ab2d55df4ff1f25e253f5edc53da1088c33a74efe36e605e74bb67c4", "https://deno.land/x/lume@v3.0.2/cli/build.ts": "a3acda3c702d6a51a8fe65ea3abc17813deea0db71e442de6120a747f56a2466", "https://deno.land/x/lume@v3.0.2/cli/build_worker.ts": "34781766980dcee3c433aaa65df138168cb163a2cbd89bac53efce167ed6bfbf", @@ -626,16 +378,13 @@ "https://deno.land/x/lume@v3.0.2/core/searcher.ts": "19530e0149ca925334f98052863a52cdfbbeea9977342b209829999a34e816a6", "https://deno.land/x/lume@v3.0.2/core/server.ts": "19cdd234f18c601d8386c7aa6d589616ce367fc571a96d4715f220a522e17ae8", "https://deno.land/x/lume@v3.0.2/core/site.ts": "2fd2103559eeed80574947c5b357b05c0d55d90e6135d82ffd2e5facac4bfef0", - "https://deno.land/x/lume@v3.0.2/core/slugifier.ts": "614c35473ea6a5b91b70a0cbd0df87c137e6572cf154cb3e1c5e514f520f9676", "https://deno.land/x/lume@v3.0.2/core/source.ts": "d4dbe91058369ffaf23778da7e8d8287234f3901eed378accb7933e76529a216", "https://deno.land/x/lume@v3.0.2/core/utils/cli_options.ts": "ce8731a5e9c23b95217b6967dc4e5c434637a33d16806189acc6a87728b2e649", "https://deno.land/x/lume@v3.0.2/core/utils/concurrent.ts": "cb0775b3d95f3faa356aa3a3e489dccef8807ed93cc4f84fcf5bc81e87c29504", - "https://deno.land/x/lume@v3.0.2/core/utils/css_urls.ts": "aab446be75151a054524f8f913809dca722bf1da40c174745688208d8513ff53", "https://deno.land/x/lume@v3.0.2/core/utils/data_values.ts": "589eb8299f7e767a10c2f2c4b9ef03ca9e79ba232b7f22fd151be9d1d68e1dc0", "https://deno.land/x/lume@v3.0.2/core/utils/date.ts": "3eb0b0e2ea15a95cdfe737be70cd4f48cbe49401928cb04c25a230f411ab2478", "https://deno.land/x/lume@v3.0.2/core/utils/digest.ts": "445b387983391af73269686292a65bb677119a25a327776885ff1242a9397ad8", "https://deno.land/x/lume@v3.0.2/core/utils/dom.ts": "fffb0c0c3ae613282e0447c3e4c122a62f44c776771d525a0ca09759883b4b9e", - "https://deno.land/x/lume@v3.0.2/core/utils/dom_links.ts": "f4a197edd4a77b504e82d097613b02684fb5ba73cd415608b913bc658e6ddb28", "https://deno.land/x/lume@v3.0.2/core/utils/env.ts": "d2440f14ad27e65b0a42b35a52f59ccce0430dd52950bd5df103bb1c9ba1a4a7", "https://deno.land/x/lume@v3.0.2/core/utils/format.ts": "387a489e505978d87f0a6d591d902bd493ea2c3b8a6a75f768d79c47c31272f2", "https://deno.land/x/lume@v3.0.2/core/utils/generator.ts": "1e664e9fd4c469e38a0acf5c94fd49dac4f38cb6334563ea4b7fc498b5958877", @@ -666,21 +415,18 @@ "https://deno.land/x/lume@v3.0.2/deps/hex.ts": "828718f24a780ff3ade8d0a8a5b57497cb31c257560ef12af99b6eb1a31e3bbd", "https://deno.land/x/lume@v3.0.2/deps/highlight.ts": "e8f830a1137ff7e8246ce21518452b8cbf8089db409458c6d9c31040c11d8428", "https://deno.land/x/lume@v3.0.2/deps/http.ts": "6d9add7c6fe0c0381050aa773ae8590166ccc84c5115d2cde271320c315a110d", - "https://deno.land/x/lume@v3.0.2/deps/icons.ts": "4379e1443d982ab4f85237342d165ae54c981cdb7e06480c222d208999e21f15", "https://deno.land/x/lume@v3.0.2/deps/init.ts": "05d45af66ebdfe63e43540618f51ece8f99d98dc49de890f10eeb43abe9ed0f3", "https://deno.land/x/lume@v3.0.2/deps/jsonc.ts": "79f0eddc3c9e593310eb8e5918eb1506b1c7d7816e4ecb96894f634ecbe626ff", "https://deno.land/x/lume@v3.0.2/deps/lightningcss.ts": "5f5167c6eb306ef759f0043f8f33f2eaf63c69210aa1aa837505e990ee619c46", "https://deno.land/x/lume@v3.0.2/deps/markdown_it.ts": "24c1c0fd18c99b9067d9ff5d051f934cb7c3446e6afbad934f6268af8d1ceb4d", - "https://deno.land/x/lume@v3.0.2/deps/media_types.ts": "fab5c276f8abd1db34ed7c5ccdc3d88f7a1a075cc1d1156919cab0ef35587afc", "https://deno.land/x/lume@v3.0.2/deps/minify_html.ts": "4dff2674ed8b4d068a487c46c5f222e910869e21db62f6dc5dc93cff89be30eb", "https://deno.land/x/lume@v3.0.2/deps/path.ts": "a1a2e0269901d5eb033bfcaef9eab71e761c91edacb184098245b6468123e11d", "https://deno.land/x/lume@v3.0.2/deps/remove-markdown.ts": "e304dcdd2c1042a1de5b2df53c9c8c39f4462307f95d13e4b2fa1ded26851013", - "https://deno.land/x/lume@v3.0.2/deps/tailwindcss.ts": "df89be40eca607d0ba4f4fc8e82957c19dee40eaab59e51eea040ab0ae518b24", + "https://deno.land/x/lume@v3.0.2/deps/ssx.ts": "2095ddc308fa4736fa91f96a9cd7d4dd3fe1fd70cdf477a13742e02f8818e7d9", "https://deno.land/x/lume@v3.0.2/deps/toml.ts": "c9eb39b7b5c313d0c83d9b5c3295e22b5cf3dfd730677c305a5466f7dd2d1f8e", "https://deno.land/x/lume@v3.0.2/deps/vento.ts": "56cfaa39bc2bc8d67f4460a46e29f9174df223dffcb815bda0d8a8cd1cd19f75", "https://deno.land/x/lume@v3.0.2/deps/xml.ts": "a2171f6ed75576354faa685ebd62b63cf1d4ee518477f295604526416dd27e2f", "https://deno.land/x/lume@v3.0.2/deps/yaml.ts": "d0f41ff80ce1eee045a87bf055c199b5c6f316571dcad0fff99fba17e34990a2", - "https://deno.land/x/lume@v3.0.2/lint.ts": "4b369361e0cff20a8dfd9e3ff8cb642aa805e7532825ea3a5378eb1f80901fc6", "https://deno.land/x/lume@v3.0.2/middlewares/logger.ts": "c96f1a9f9d5757555b6f141865ce8551ac176f90c8ee3e9ad797b2b400a9a567", "https://deno.land/x/lume@v3.0.2/middlewares/no_cache.ts": "0119e3ae3a596ab12c42df693b93e5b03dd9608e289d862242751a9739438f35", "https://deno.land/x/lume@v3.0.2/middlewares/no_cors.ts": "4d24619b5373c98bcc3baf404db47ba088c87ac8538ea1784e58d197b81d4d02", @@ -688,34 +434,26 @@ "https://deno.land/x/lume@v3.0.2/middlewares/reload.ts": "7639d19e7a92979ac8dd9536040ed8c6c638e08cd75139895cf8e9266c830810", "https://deno.land/x/lume@v3.0.2/middlewares/reload_client.js": "64dca5eda6e36a0871d237d3006ad5c6b0bba2a6928b314b22d7242fb3bb296f", "https://deno.land/x/lume@v3.0.2/mod.ts": "4ed2edf622df6109304095952f8a02844f5abc2992b6c9886af632b058f1a8f4", - "https://deno.land/x/lume@v3.0.2/plugins/check_urls.ts": "787e4d9376e76e4a2377236097d43d055d6f030110d70d4e997699f6764312f3", "https://deno.land/x/lume@v3.0.2/plugins/code_highlight.ts": "ac6327e688e9e8fbd7798bdcc5f76b46d27db3e22ea3b74f545dc3296e8a1261", - "https://deno.land/x/lume@v3.0.2/plugins/extract_date.ts": "38af8e5960d66a74a72977eb19521da4353ab32d3941e97c1526aa3b91175a9e", + "https://deno.land/x/lume@v3.0.2/plugins/esbuild.ts": "74d275124a2cc547fedfa2ae59392b44a475eb31b497dbff0c741179af139515", "https://deno.land/x/lume@v3.0.2/plugins/feed.ts": "b07aed4cda270cfaacb26f9974dbb962f936dbfde4d770c53e478e4682c791e1", - "https://deno.land/x/lume@v3.0.2/plugins/icons.ts": "c69428254024d694eca34f9b5c4888aedf83d2d9b38f860533952c28cc814333", - "https://deno.land/x/lume@v3.0.2/plugins/inline.ts": "737d7de09d196476b55ecbe7ddb0e651ba2d5d39ca5a418cb15ff48e124907c1", "https://deno.land/x/lume@v3.0.2/plugins/json.ts": "5c49499e56b919ec848d4118ec97dd4fe0a323a6cc4c648dc45ab55297614c12", - "https://deno.land/x/lume@v3.0.2/plugins/lightningcss.ts": "6b5236cc78c1ae4af5b4a0037a0345797381f5043c667ae1ddeb4f67e445c7c4", + "https://deno.land/x/lume@v3.0.2/plugins/jsx.ts": "952dfe644efc6e4f1bf72f8a68e682d0680fdfb44ee5f868ca6dfd04cf87e77f", "https://deno.land/x/lume@v3.0.2/plugins/markdown.ts": "7e82d897c1e35bf119dcd18b6aec7a6ba5aa06848897b34ff9cd161ec7c8757e", "https://deno.land/x/lume@v3.0.2/plugins/minify_html.ts": "f8a817bc43107389d0ce4ce9a048ced06c001407da34e9e2b8ef7a19db90c933", - "https://deno.land/x/lume@v3.0.2/plugins/modify_urls.ts": "9c1b7cc856038d46b64f395065d2852f9b4af94ef9a41c2e9e3021d448b1d3b6", "https://deno.land/x/lume@v3.0.2/plugins/modules.ts": "4e177c0ffe972b9deef10db2bf0ae52b405418af4dbac03db9e7ffbd6a3ec6ae", "https://deno.land/x/lume@v3.0.2/plugins/paginate.ts": "6a1a9a24d0fabed2f722a6a6f29d98559219c69475685034181816e82d367f2e", - "https://deno.land/x/lume@v3.0.2/plugins/redirects.ts": "5ae50e20bc32b0e8836920148b25ea3ae057a209b62691a67471fa4a52e6507a", - "https://deno.land/x/lume@v3.0.2/plugins/resolve_urls.ts": "910dbccd25fcacacc72d577a3df37c5f3cc4adce0ec52b2fc8903863c2e2afae", "https://deno.land/x/lume@v3.0.2/plugins/search.ts": "5acb5be828bbbd012fb9226cb97ec3e370d43d05aa44d16e7e7d50bab368b442", "https://deno.land/x/lume@v3.0.2/plugins/sitemap.ts": "cd701c4c8c3d3db827781c393a059f0cff98e609f00442b66ac883a1c7c3c08a", - "https://deno.land/x/lume@v3.0.2/plugins/slugify_urls.ts": "8b6ccaae23c2d5f49debf8363e3a6df9fcb60dc66b2d11c3d8b09b89f4261431", "https://deno.land/x/lume@v3.0.2/plugins/source_maps.ts": "490efa0e103d9133078117f6e855b4b1351292f562c75bda5f3240d45dacbe52", - "https://deno.land/x/lume@v3.0.2/plugins/tailwindcss.ts": "eb17c46f560b4b70a3eb950ec7aad788dc76d3b51b7c0f9aed39435afa93d49d", "https://deno.land/x/lume@v3.0.2/plugins/toml.ts": "e5bf35ed4915587acd453f002b00ae9b88c1782cadc25c703d7642a390af43ea", "https://deno.land/x/lume@v3.0.2/plugins/url.ts": "15f2e80b6fcbf86f8795a3676b8d533bab003ac016ff127e58165a6ac3bffc1a", "https://deno.land/x/lume@v3.0.2/plugins/vento.ts": "908ffbf31864507afa72c506584f2d28c2449b57a339ddfe8a7220eecf082766", "https://deno.land/x/lume@v3.0.2/plugins/yaml.ts": "d0ebf37c38648172c6b95c502753a3edf60278ab4f6a063f3ca00f31e0dd90cc", "https://deno.land/x/lume@v3.0.2/types.ts": "5f580502f366b9b25106eb72d49b30d9af7715c8a304fe6e21f382d3c2a4cc38", - "https://deno.land/x/ssx@v0.1.10/css.ts": "39972fa9e375465b82e4fbf735dcc727acc89fdd836f93a395cfb3ccab54e7f0", - "https://deno.land/x/ssx@v0.1.10/html.ts": "5ad7bfd7a6a5b676b2686d406c105bbb02bea537183d95e0c04e76853a9ee155", - "https://deno.land/x/ssx@v0.1.10/jsx-runtime.ts": "f3d37c172698f0b0d7510c2023119264057cbc64a5602d4ca9091e80199a2abe", + "https://deno.land/x/ssx@v0.1.9/css.ts": "39972fa9e375465b82e4fbf735dcc727acc89fdd836f93a395cfb3ccab54e7f0", + "https://deno.land/x/ssx@v0.1.9/html.ts": "5ad7bfd7a6a5b676b2686d406c105bbb02bea537183d95e0c04e76853a9ee155", + "https://deno.land/x/ssx@v0.1.9/jsx-runtime.ts": "d0df99b2a626dbe06d0fc5d968746bb070672365f15e7fdd3b84285843af3148", "https://deno.land/x/vento@v1.13.0/bare.ts": "b6cdcc245d4626832ab3a7fb4f2885541e997d2806334d8048d39401fa63d50e", "https://deno.land/x/vento@v1.13.0/deps.ts": "155958dfada8d8cb3c8a001413c759928647b23e0e9db25195614549b58d085f", "https://deno.land/x/vento@v1.13.0/mod.ts": "53262793b5e0176acdec84aa9c34ed3ecb0c45cc9d396bf34a06ed4ad3d9930a", diff --git a/site.ts b/site.ts deleted file mode 100644 index 89c4035..0000000 --- a/site.ts +++ /dev/null @@ -1,133 +0,0 @@ -import lume from "lume/mod.ts"; -import extract_date from "lume/plugins/extract_date.ts"; -import code_highlight from "lume/plugins/code_highlight.ts"; -import redirects from "lume/plugins/redirects.ts"; -import tailwindcss from "lume/plugins/tailwindcss.ts"; -import lightningcss from "lume/plugins/lightningcss.ts"; -import resolve_urls from "lume/plugins/resolve_urls.ts"; -import slugify_urls from "lume/plugins/slugify_urls.ts"; -import check_urls from "lume/plugins/check_urls.ts"; -import inline from "lume/plugins/inline.ts"; -import feed from "lume/plugins/feed.ts"; -import sitemap from "lume/plugins/sitemap.ts"; -import minify_html from "lume/plugins/minify_html.ts"; - -const site_name = "RGBCube"; -const site_description = - "The home directory and journal of RGBCube and his work."; - -const author = "RGBCube"; -const color = "#00FFFF"; - -const path_assets = "/assets"; - -const site = lume({ - src: "./site", - - server: { - debugBar: false, - }, -}); - -site.data("layout", "default.vto"); - -site.data("site_name", site_name); -site.data("title", site_name); -site.data("description", site_description); -site.data("author", author); -site.data("color", color); - -site.add("."); - -site.process([".html"], (pages) => { - pages.forEach((page) => { - const document = page.document; - - document.querySelectorAll("table").forEach((element) => { - const wrapper = document.createElement("div"); - - element.classList.add("transform-[rotateX(180deg)]"); - wrapper.classList.add( - "transform-[rotateX(180deg)]", - "overflow-x-auto", - ); - - element.parentNode!.insertBefore(wrapper, element); - wrapper.appendChild(element); - }); - - document.querySelectorAll("pre code").forEach((code) => { - const element = code.parentElement!; - const wrapper = document.createElement("div"); - - element.classList.add("transform-[rotateX(180deg)]"); - wrapper.classList.add( - "transform-[rotateX(180deg)]", - "overflow-x-auto", - ); - - element.parentNode!.insertBefore(wrapper, element); - wrapper.appendChild(element); - }); - }); -}); - -site.use(extract_date()); -site.use(redirects()); - -site.use(tailwindcss()); -site.use(code_highlight()); - -site.use(resolve_urls()); -site.use(slugify_urls({ - extensions: "*", -})); -site.use(check_urls({ - strict: true, - throw: true, -})); - -site.use(feed({ - output: ["/blog.rss", "/blog.json"], - - query: "type=article", - sort: "date=asc", - limit: Infinity, - - info: { - title: site_name, - description: site_description, - authorName: author, - - image: `${path_assets}/icons/icon.webp`, - icon: `${path_assets}/icons/icon.webp`, - - color, - - generator: false, - }, - - items: { - content: "$ .text-content", - }, -})); - -site.use(sitemap({ - items: { - // @ts-ignore: We don't want lastmods. - lastmod: null, - }, -})); - -site.use(lightningcss()); // TODO: LightningCSS doesn't handle inline styles. -site.use(inline()); - -site.use(minify_html({ - options: { - // TODO: This breaks tailwind. - // minify_css: true, - minify_js: true, - }, -})); - -export default site; diff --git a/site/404.page.tsx b/site/404.page.tsx new file mode 100644 index 0000000..dfd86b8 --- /dev/null +++ b/site/404.page.tsx @@ -0,0 +1,71 @@ +import Cube from "./_includes/cube.tsx"; + +export const title = "404"; +export const viewportFixed = true; + +export default (_data: Lume.Data, helpers: Lume.Helpers) => { + const face = ( + <> +
+ + 404 + +
+
+
+
+
+ + ); + + return ( + <> + + + + + ); +}; diff --git a/site/404.vto b/site/404.vto deleted file mode 100644 index 209b2ad..0000000 --- a/site/404.vto +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: � -prevent_zoom: true ---- - - - -{{ set cube_face }} -
- - url(true) }}> - url(true) }}> - url(true) }}> - url(true) }}> -{{ /set }} - -{{ set cube_face_front = cube_face }} -{{ set cube_face_back = cube_face }} -{{ set cube_face_left = cube_face }} -{{ set cube_face_right = cube_face }} -{{ set cube_face_top = cube_face }} -{{ set cube_face_bottom = cube_face }} - -{{ include "cube.vto" }} diff --git a/site/_data.json b/site/_data.json new file mode 100644 index 0000000..8f3898d --- /dev/null +++ b/site/_data.json @@ -0,0 +1,10 @@ +{ + "layout": "base.vto", + "type": "website", + + "color": "#00FFFF", + "description": "The official website and link portal of RGBCube and his work.", + "thumbnail": null, + + "viewportFixed": false +} diff --git a/site/_includes/article.vto b/site/_includes/article.vto new file mode 100644 index 0000000..2b60c33 --- /dev/null +++ b/site/_includes/article.vto @@ -0,0 +1,14 @@ +--- +layout: text.vto +--- + +
{{ content }}
+ +{{ if tags.length !== 0 }} +

Tags: {{ tags.join(", ") }}

+{{ /if }} + +

+ Also, if you are a dinosaur that enjoys good technology, check out my + RSS Feed. +

diff --git a/site/_includes/base.vto b/site/_includes/base.vto new file mode 100644 index 0000000..29f9bd4 --- /dev/null +++ b/site/_includes/base.vto @@ -0,0 +1,165 @@ + + + + + + + {{ title }} + + + + + + + + + + + + + + + + + + + + + + + + + {{ if tags.length !== 0 }} + + + {{ /if }} + + {{ if date }} + + {{ /if }} + + {{ if thumbnail }} + + + + {{ else }} + + + {{ /if }} + + + + + + + + + + + + + + + + + {{ content }} + + diff --git a/site/_includes/cube.tsx b/site/_includes/cube.tsx new file mode 100644 index 0000000..a337c95 --- /dev/null +++ b/site/_includes/cube.tsx @@ -0,0 +1,117 @@ +interface CubeProps { + front?: Node; + back?: Node; + left?: Node; + right?: Node; + top?: Node; + bottom?: Node; +} + +const Cube = (props: CubeProps) => ( + <> + + +
+
+
{props.front}
+
{props.back}
+
{props.left}
+
{props.right}
+
{props.top}
+
{props.bottom}
+
+
+ + + +); + +export default Cube; diff --git a/site/_includes/cube.vto b/site/_includes/cube.vto deleted file mode 100644 index c18947e..0000000 --- a/site/_includes/cube.vto +++ /dev/null @@ -1,273 +0,0 @@ - - - - - {{> const style = ` - size-(--cube-width) absolute - flex items-center justify-center - ` }} - {{ cube_face_front }} - {{ cube_face_back }} - {{ cube_face_left }} - {{ cube_face_right }} - {{ cube_face_top }} - {{ cube_face_bottom }} - - - - diff --git a/site/_includes/default.vto b/site/_includes/default.vto deleted file mode 100644 index d462484..0000000 --- a/site/_includes/default.vto +++ /dev/null @@ -1,63 +0,0 @@ ---- -layout: null ---- - - - - - - - - - - - - - {{ if title }} {{ title }} {{ /if }} - {{ if description }} {{ /if }} - {{ if author }} {{ /if }} - {{ if keywords }} {{ /if }} - - - - - - - - - - - - - - {{ if title }} {{ /if }} - {{ if description}} {{ /if }} - - - - - {{ if thumbnail }} - - {{ else }} - url(true) }}"> - {{ /if }} - - - {{ if title }} {{ /if }} - - {{ if thumbnail }} - - - {{ else }} - - url(true) }}"> - {{ /if }} - - - - - - - - {{ content }} - diff --git a/site/_includes/text.vto b/site/_includes/text.vto index d863d6b..25cb69b 100644 --- a/site/_includes/text.vto +++ b/site/_includes/text.vto @@ -1,47 +1,196 @@ --- -layout: default.vto +layout: base.vto --- -
-
+ - home - about - blog - contact -
- + /* Make wrapping pretty */ + h1, + h2, + h3, + h4 { + text-wrap: balance; + } + + p { + text-wrap: pretty; + } + + /* Rotate nav, tables and codeblocks so the scrollbar is at the top */ + .rotated { + transform: rotateX(180deg); + } + + /* Make tables and other elements scroll horizontally */ + .overflow { + overflow-x: auto; + } + + /* Style nav */ + nav { + font-size: larger; + word-break: normal; + + overflow-wrap: normal; + overflow-x: auto; + + background-color: white; + padding: 0.3rem 0.6rem; + + /* Rotated 180deg so it's top instead of bottom. */ + border-top-left-radius: 1rem; + border-top-right-radius: 1rem; + } + + @media (prefers-color-scheme: light) { + nav { + border: 0.15rem solid black; + border-bottom-width: 0; + } + } + + nav a { + color: black; + font-weight: bold; + margin-right: 0.6rem; + } + + /* Make images fit */ + p:has(img) { + display: flex; + justify-content: center; + } + + img { + max-width: 100%; + height: auto; + } + + /* Style content */ + .content { + overflow-wrap: break-word; + } + + a { + color: var(--link); + } + + a:hover { + font-style: italic; + } + + blockquote { + border-left: 0.15rem solid var(--foreground); + + padding: 0.05rem 1rem; + margin: 1.3rem 1rem; + } + + @media (prefers-color-scheme: dark) { + blockquote { + background-color: #222; + } + } + + @media (prefers-color-scheme: light) { + blockquote { + background-color: #EEE; + } + } + + /* Style tables */ + table { + border-collapse: collapse; + white-space: nowrap; + } + + /* Doesn't seem to work with the scrolling? */ + /* thead { + position: sticky; + top: 0; + } */ + + th, td { + border: 0.15rem solid var(--foreground); + padding: 0.3rem; + } + + th { + background-color: var(--foreground); + color: var(--background); + } + + /* Codeblocks */ + .rotated:has(pre) { + padding: 0.6rem; + border: 0.15rem solid var(--foreground); + } + + pre { + margin: 0; + } + + @media (prefers-color-scheme: dark) { + .hljs-attr { color: lightblue; } + .hljs-built_in { color: firebrick; } + .hljs-keyword { color: firebrick; } + .hljs-number { color: mediumslateblue; } + .hljs-string { color: limegreen; } + .hljs-title { color: lightcoral; } + .hljs-type { color: aquamarine; } + } + + @media (prefers-color-scheme: light) { + .hljs-attr { color: darkblue; } + .hljs-built_in { color: darkred; } + .hljs-keyword { color: darkred; } + .hljs-number { color: darkslateblue; } + .hljs-string { color: darkgreen; } + .hljs-title { color: darkgoldenrod; } + .hljs-type { color: darkcyan; } + } + + /* The end */ + hr { + border: 0.15rem solid var(--foreground); + } + + footer { + display: flex; + justify-content: center; + + font-size: small; + + margin-bottom: 1rem; + padding-top: 0.5rem; + } + + +
+ -{{> const padding = 4 }} -
{{ content }} -
- -
- -
- Copyright {{ Temporal.Now.plainDateISO().year }} © - RGBCube -
-
+
+
Copyright {{ new Date().getFullYear() }} © RGBCube
diff --git a/site/about.md b/site/about.md index 28be19e..c41c60c 100644 --- a/site/about.md +++ b/site/about.md @@ -1,10 +1,31 @@ --- layout: text.vto -title: about:rgbcube +title: About --- -
+## Hi. -# [TODO](#) +I'm yet another high schooler that is interested in programming. I'm from +Türkiye 🇹🇷. -
+I primarily use [Rust](https://rust-lang.org) and also know quite a bit of +Python, [**Nix**](https://nixos.org/), [Nushell](https://nushell.sh/), a little +bit of Java, Kotlin, Go, and JavaScript (No frameworks, though!). + +I created this site using [Lume](https://lume.land/). It is served by Nginx on +my small VPS that runs [NixOS](https://nixos.org/). + +I also host other services like Synapse (Matrix homeserver), Forgejo, Nextcloud +and Grafana on the VPS, which are all configured using Nix. + +Historically, this blog was made using Rust, [Axum](https://lib.rs/crates/axum), +[Maud](https://maud.lambda.xyz/) and a bunch of other neat crates (some which I +created, like [embd-rs](https://github.com/RGBCube/embd-rs), which sped up +development). But I decided to abandon this strategy as I was reinventing too +much for just a simple static website. Development was also _really_ slow on a +i5 from 2015 so I decided to ditch it and use Lume. + +Here is the up to date +[GitHub repository for said site](https://github.com/RGBCube/Site), and here is +the +[historical version written in Rust](https://github.com/RGBCube/Site/tree/rust-legacy). diff --git a/site/assets/BaiJamjureeBold.woff2 b/site/assets/BaiJamjureeBold.woff2 new file mode 100644 index 0000000..e14827b Binary files /dev/null and b/site/assets/BaiJamjureeBold.woff2 differ diff --git a/site/assets/BaiJamjureeBoldItalic.woff2 b/site/assets/BaiJamjureeBoldItalic.woff2 new file mode 100644 index 0000000..5587cdf Binary files /dev/null and b/site/assets/BaiJamjureeBoldItalic.woff2 differ diff --git a/site/assets/BaiJamjureeMedium.woff2 b/site/assets/BaiJamjureeMedium.woff2 new file mode 100644 index 0000000..dfc55e1 Binary files /dev/null and b/site/assets/BaiJamjureeMedium.woff2 differ diff --git a/site/assets/BaiJamjureeMediumItalic.woff2 b/site/assets/BaiJamjureeMediumItalic.woff2 new file mode 100644 index 0000000..739978b Binary files /dev/null and b/site/assets/BaiJamjureeMediumItalic.woff2 differ diff --git a/site/assets/JetBrainsMonoBold.woff2 b/site/assets/JetBrainsMonoBold.woff2 new file mode 100644 index 0000000..7080d06 Binary files /dev/null and b/site/assets/JetBrainsMonoBold.woff2 differ diff --git a/site/assets/JetBrainsMonoBoldItalic.woff2 b/site/assets/JetBrainsMonoBoldItalic.woff2 new file mode 100644 index 0000000..edfd8cc Binary files /dev/null and b/site/assets/JetBrainsMonoBoldItalic.woff2 differ diff --git a/site/assets/JetBrainsMonoMedium.woff2 b/site/assets/JetBrainsMonoMedium.woff2 new file mode 100644 index 0000000..f2ca96c Binary files /dev/null and b/site/assets/JetBrainsMonoMedium.woff2 differ diff --git a/site/assets/JetBrainsMonoMediumItalic.woff2 b/site/assets/JetBrainsMonoMediumItalic.woff2 new file mode 100644 index 0000000..28fdb56 Binary files /dev/null and b/site/assets/JetBrainsMonoMediumItalic.woff2 differ diff --git a/site/assets/css/default.css b/site/assets/css/default.css deleted file mode 100644 index 8b18890..0000000 --- a/site/assets/css/default.css +++ /dev/null @@ -1,255 +0,0 @@ -@import "tailwindcss"; - -@theme { - --font-sans: "Exo 2"; - --font-serif: "Exo 2"; - --font-mono: "Ubuntu Mono"; - - @keyframes blink { - 0%, 100% { - opacity: 100%; - } - 50% { - opacity: 0%; - } - } - - --animate-blink: blink 0.2s steps(1) infinite; - - @keyframes blink-red-white { - 0%, 100% { - background-color: red; - } - 50% { - background-color: white; - } - } - - --animate-blink-red-white: blink-red-white 0.2s steps(1) infinite; - - @keyframes to-the-future { - 0% { - transform: skewX(0deg); - } - 100% { - transform: skewX(-89.9deg); - } - } - - --animate-to-the-future: to-the-future 50ms cubic-bezier( - 0.16, - 0.56, - 0.44, - 0.93 - ) 1; - - @keyframes shake-x { - 0%, 100% {} - - 50% { - transform: translateX(4px); - } - } - - --animate-shake-x: shake-x 0.07s linear infinite; - - @keyframes shake-y { - 0%, 100% {} - - 50% { - transform: translateY(4px); - } - } - - --animate-shake-y: shake-y 0.08s linear infinite; - - @keyframes slide-down-shake { - 0% { - transform: translateY(-100%); - } - 70% { - transform: translateY(0); - } - 75% { - transform: translateY(0) translateX(2px); - } - 80% { - transform: translateY(0) translateX(-2px); - } - 85% { - transform: translateY(0) translateX(1px); - } - 90% { - transform: translateY(0) translateX(-1px); - } - 95% { - transform: translateY(0) translateX(0.5px); - } - 100% { - transform: translateY(0) translateX(0); - } - } - - --animate-slide-down-shake: slide-down-shake 0.8s linear forwards; -} - -.shake { - @apply animate-shake-x; - - & > * { - @apply animate-shake-y; - } -} - -.nuclear { - &:active { - @apply animate-blink-red-white text-white; - - -webkit-text-stroke: 0.05rem black; - } - - &:hover { - @apply text-white; - - -webkit-text-stroke: 0.05rem black; - - &:not(:active) { - background: repeating-linear-gradient( - 45deg, - yellow 0rem, - yellow 0.625rem, - black 0.625rem, - black 1.25rem - ); - } - } -} - -.text-content { - @apply space-y-3; - - * { - @apply wrap-break-word text-pretty; - - &:not(ol, ul) { - @apply space-y-3; - } - } - - h1, h2, h3, h4, h5, h6 { - @apply text-balance before:pr-2 font-bold; - } - - h1 { - @apply text-4xl before:content-["#"]; - } - h2 { - @apply text-3xl before:content-["##"]; - } - h3 { - @apply text-2xl before:content-["###"]; - } - h4 { - @apply text-xl before:content-["####"]; - } - - p { - &:has(img) { - @apply flex justify-center; - } - } - - a { - @apply inline-block wrap-anywhere text-[red] dark:text-[yellow] px-1 pb-0.75 - border-2 border-[transparent] border-dashed; - - * { - @apply wrap-anywhere; - } - - &:hover { - @apply border-[red] dark:border-[yellow]; - } - - &:active { - @apply border-[fuchsia] dark:border-[springgreen] animate-to-the-future; - } - } - - /* TODO: Make it better. */ - table { - @apply border-collapse whitespace-nowrap; - } - - th, td { - @apply p-1 border-2; - } - - th { - @apply bg-black text-white border-black dark:bg-white dark:text-black - dark:border-white; - } - - td { - @apply border-black dark:border-white; - } - - div:has(> pre code) { - @apply outline-1 outline-dotted outline-offset-1 outline-[#444] border-1 - border-black p-2 bg-[#eee] dark:outline-[#bbb] dark:border-white - dark:bg-[#111]; - } - - li { - @apply relative pl-4; - - &::before { - @apply content-[""] absolute left-0 size-2 top-1/2 -translate-y-1/3 - rotate-45 border-t-2 border-r-2 border-black dark:border-white; - } - - &:hover { - &::before { - @apply size-4 -translate-x-2/3 border-[red] dark:border-[yellow]; - } - } - } - - hr { - @apply border-1 border-black dark:border-white - -mx-4; /* Keep in sync with p-N in text.vto. */ - } - - blockquote { - @apply border-1 p-2 bg-[#eee] shadow-[4px_4px_#444] dark:border-white - dark:bg-[#111] dark:shadow-[4px_4px_#bbb]; - } - - .hljs-attr { - @apply text-[darkblue] dark:text-[lightblue]; - } - .hljs-built_in { - @apply text-[darkred] dark:text-[firebrick]; - } - .hljs-comment { - @apply italic text-[dimgray] dark:text-[darkgray]; - } - .hljs-keyword { - @apply text-[darkred] dark:text-[firebrick]; - } - .hljs-number { - @apply text-[darkslateblue] dark:text-[mediumslateblue]; - } - .hljs-string { - @apply text-[darkgreen] dark:text-[limegreen]; - } - .hljs-symbol { - @apply text-[darkgoldenrod] dark:text-[gold]; - } - .hljs-title { - @apply text-[indianred] dark:text-[lightcoral]; - } - .hljs-type { - @apply text-[darkcyan] dark:text-[aquamarine]; - } -} diff --git a/site/assets/css/fonts.css b/site/assets/css/fonts.css deleted file mode 100644 index 03bee63..0000000 --- a/site/assets/css/fonts.css +++ /dev/null @@ -1,595 +0,0 @@ -@font-face { - font-family: "Exo 2"; - font-style: italic; - font-weight: 100 900; - font-display: block; - src: url("/assets/fonts/Exo_2-cyrillic-ext-italic.woff2") format("woff2"); - unicode-range: - U+0460-052F, - U+1C80-1C8A, - U+20B4, - U+2DE0-2DFF, - U+A640-A69F, - U+FE2E-FE2F; -} -@font-face { - font-family: "Exo 2"; - font-style: italic; - font-weight: 100 900; - font-display: block; - src: url("/assets/fonts/Exo_2-cyrillic-italic.woff2") format("woff2"); - unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; -} -@font-face { - font-family: "Exo 2"; - font-style: italic; - font-weight: 100 900; - font-display: block; - src: url("/assets/fonts/Exo_2-vietnamese-italic.woff2") format("woff2"); - unicode-range: - U+0102-0103, - U+0110-0111, - U+0128-0129, - U+0168-0169, - U+01A0-01A1, - U+01AF-01B0, - U+0300-0301, - U+0303-0304, - U+0308-0309, - U+0323, - U+0329, - U+1EA0-1EF9, - U+20AB; -} -@font-face { - font-family: "Exo 2"; - font-style: italic; - font-weight: 100 900; - font-display: block; - src: url("/assets/fonts/Exo_2-latin-ext-italic.woff2") format("woff2"); - unicode-range: - U+0100-02BA, - U+02BD-02C5, - U+02C7-02CC, - U+02CE-02D7, - U+02DD-02FF, - U+0304, - U+0308, - U+0329, - U+1D00-1DBF, - U+1E00-1E9F, - U+1EF2-1EFF, - U+2020, - U+20A0-20AB, - U+20AD-20C0, - U+2113, - U+2C60-2C7F, - U+A720-A7FF; -} -@font-face { - font-family: "Exo 2"; - font-style: italic; - font-weight: 100 900; - font-display: block; - src: url("/assets/fonts/Exo_2-latin-italic.woff2") format("woff2"); - unicode-range: - U+0000-00FF, - U+0131, - U+0152-0153, - U+02BB-02BC, - U+02C6, - U+02DA, - U+02DC, - U+0304, - U+0308, - U+0329, - U+2000-206F, - U+20AC, - U+2122, - U+2191, - U+2193, - U+2212, - U+2215, - U+FEFF, - U+FFFD; -} -@font-face { - font-family: "Exo 2"; - font-style: normal; - font-weight: 100 900; - font-display: block; - src: url("/assets/fonts/Exo_2-cyrillic-ext-normal.woff2") format("woff2"); - unicode-range: - U+0460-052F, - U+1C80-1C8A, - U+20B4, - U+2DE0-2DFF, - U+A640-A69F, - U+FE2E-FE2F; -} -@font-face { - font-family: "Exo 2"; - font-style: normal; - font-weight: 100 900; - font-display: block; - src: url("/assets/fonts/Exo_2-cyrillic-normal.woff2") format("woff2"); - unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; -} -@font-face { - font-family: "Exo 2"; - font-style: normal; - font-weight: 100 900; - font-display: block; - src: url("/assets/fonts/Exo_2-vietnamese-normal.woff2") format("woff2"); - unicode-range: - U+0102-0103, - U+0110-0111, - U+0128-0129, - U+0168-0169, - U+01A0-01A1, - U+01AF-01B0, - U+0300-0301, - U+0303-0304, - U+0308-0309, - U+0323, - U+0329, - U+1EA0-1EF9, - U+20AB; -} -@font-face { - font-family: "Exo 2"; - font-style: normal; - font-weight: 100 900; - font-display: block; - src: url("/assets/fonts/Exo_2-latin-ext-normal.woff2") format("woff2"); - unicode-range: - U+0100-02BA, - U+02BD-02C5, - U+02C7-02CC, - U+02CE-02D7, - U+02DD-02FF, - U+0304, - U+0308, - U+0329, - U+1D00-1DBF, - U+1E00-1E9F, - U+1EF2-1EFF, - U+2020, - U+20A0-20AB, - U+20AD-20C0, - U+2113, - U+2C60-2C7F, - U+A720-A7FF; -} -@font-face { - font-family: "Exo 2"; - font-style: normal; - font-weight: 100 900; - font-display: block; - src: url("/assets/fonts/Exo_2-latin-normal.woff2") format("woff2"); - unicode-range: - U+0000-00FF, - U+0131, - U+0152-0153, - U+02BB-02BC, - U+02C6, - U+02DA, - U+02DC, - U+0304, - U+0308, - U+0329, - U+2000-206F, - U+20AC, - U+2122, - U+2191, - U+2193, - U+2212, - U+2215, - U+FEFF, - U+FFFD; -} -@font-face { - font-family: "Ubuntu Mono"; - font-style: italic; - font-weight: 400; - font-display: block; - src: url(/assets/fonts/Ubuntu_Mono-italic-400-cyrillic-ext.woff2) - format("woff2"); - unicode-range: - U+0460-052F, - U+1C80-1C8A, - U+20B4, - U+2DE0-2DFF, - U+A640-A69F, - U+FE2E-FE2F; -} -@font-face { - font-family: "Ubuntu Mono"; - font-style: italic; - font-weight: 400; - font-display: block; - src: url("/assets/fonts/Ubuntu_Mono-italic-400-cyrillic.woff2") - format("woff2"); - unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; -} -@font-face { - font-family: "Ubuntu Mono"; - font-style: italic; - font-weight: 400; - font-display: block; - src: url("/assets/fonts/Ubuntu_Mono-italic-400-greek-ext.woff2") - format("woff2"); - unicode-range: U+1F00-1FFF; -} -@font-face { - font-family: "Ubuntu Mono"; - font-style: italic; - font-weight: 400; - font-display: block; - src: url("/assets/fonts/Ubuntu_Mono-italic-400-greek.woff2") format("woff2"); - unicode-range: - U+0370-0377, - U+037A-037F, - U+0384-038A, - U+038C, - U+038E-03A1, - U+03A3-03FF; -} -@font-face { - font-family: "Ubuntu Mono"; - font-style: italic; - font-weight: 400; - font-display: block; - src: url("/assets/fonts/Ubuntu_Mono-italic-400-latin-ext.woff2") - format("woff2"); - unicode-range: - U+0100-02BA, - U+02BD-02C5, - U+02C7-02CC, - U+02CE-02D7, - U+02DD-02FF, - U+0304, - U+0308, - U+0329, - U+1D00-1DBF, - U+1E00-1E9F, - U+1EF2-1EFF, - U+2020, - U+20A0-20AB, - U+20AD-20C0, - U+2113, - U+2C60-2C7F, - U+A720-A7FF; -} -@font-face { - font-family: "Ubuntu Mono"; - font-style: italic; - font-weight: 400; - font-display: block; - src: url("/assets/fonts/Ubuntu_Mono-italic-400-latin.woff2") format("woff2"); - unicode-range: - U+0000-00FF, - U+0131, - U+0152-0153, - U+02BB-02BC, - U+02C6, - U+02DA, - U+02DC, - U+0304, - U+0308, - U+0329, - U+2000-206F, - U+20AC, - U+2122, - U+2191, - U+2193, - U+2212, - U+2215, - U+FEFF, - U+FFFD; -} -@font-face { - font-family: "Ubuntu Mono"; - font-style: italic; - font-weight: 700; - font-display: block; - src: url("/assets/fonts/Ubuntu_Mono-italic-700-cyrillic-ext.woff2") - format("woff2"); - unicode-range: - U+0460-052F, - U+1C80-1C8A, - U+20B4, - U+2DE0-2DFF, - U+A640-A69F, - U+FE2E-FE2F; -} -@font-face { - font-family: "Ubuntu Mono"; - font-style: italic; - font-weight: 700; - font-display: block; - src: url("/assets/fonts/Ubuntu_Mono-italic-700-cyrillic.woff2") - format("woff2"); - unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; -} -@font-face { - font-family: "Ubuntu Mono"; - font-style: italic; - font-weight: 700; - font-display: block; - src: url("/assets/fonts/Ubuntu_Mono-italic-700-greek-ext.woff2") - format("woff2"); - unicode-range: U+1F00-1FFF; -} -@font-face { - font-family: "Ubuntu Mono"; - font-style: italic; - font-weight: 700; - font-display: block; - src: url("/assets/fonts/Ubuntu_Mono-italic-700-greek.woff2") format("woff2"); - unicode-range: - U+0370-0377, - U+037A-037F, - U+0384-038A, - U+038C, - U+038E-03A1, - U+03A3-03FF; -} -@font-face { - font-family: "Ubuntu Mono"; - font-style: italic; - font-weight: 700; - font-display: block; - src: url("/assets/fonts/Ubuntu_Mono-italic-700-latin-ext.woff2") - format("woff2"); - unicode-range: - U+0100-02BA, - U+02BD-02C5, - U+02C7-02CC, - U+02CE-02D7, - U+02DD-02FF, - U+0304, - U+0308, - U+0329, - U+1D00-1DBF, - U+1E00-1E9F, - U+1EF2-1EFF, - U+2020, - U+20A0-20AB, - U+20AD-20C0, - U+2113, - U+2C60-2C7F, - U+A720-A7FF; -} -@font-face { - font-family: "Ubuntu Mono"; - font-style: italic; - font-weight: 700; - font-display: block; - src: url("/assets/fonts/Ubuntu_Mono-italic-700-latin.woff2") format("woff2"); - unicode-range: - U+0000-00FF, - U+0131, - U+0152-0153, - U+02BB-02BC, - U+02C6, - U+02DA, - U+02DC, - U+0304, - U+0308, - U+0329, - U+2000-206F, - U+20AC, - U+2122, - U+2191, - U+2193, - U+2212, - U+2215, - U+FEFF, - U+FFFD; -} -@font-face { - font-family: "Ubuntu Mono"; - font-style: normal; - font-weight: 400; - font-display: block; - src: url("/assets/fonts/Ubuntu_Mono-normal-400-cyrillic-ext.woff2") - format("woff2"); - unicode-range: - U+0460-052F, - U+1C80-1C8A, - U+20B4, - U+2DE0-2DFF, - U+A640-A69F, - U+FE2E-FE2F; -} -@font-face { - font-family: "Ubuntu Mono"; - font-style: normal; - font-weight: 400; - font-display: block; - src: url("/assets/fonts/Ubuntu_Mono-normal-400-cyrillic.woff2") - format("woff2"); - unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; -} -@font-face { - font-family: "Ubuntu Mono"; - font-style: normal; - font-weight: 400; - font-display: block; - src: url("/assets/fonts/Ubuntu_Mono-normal-400-greek-ext.woff2") - format("woff2"); - unicode-range: U+1F00-1FFF; -} -@font-face { - font-family: "Ubuntu Mono"; - font-style: normal; - font-weight: 400; - font-display: block; - src: url("/assets/fonts/Ubuntu_Mono-normal-400-greek.woff2") format("woff2"); - unicode-range: - U+0370-0377, - U+037A-037F, - U+0384-038A, - U+038C, - U+038E-03A1, - U+03A3-03FF; -} -@font-face { - font-family: "Ubuntu Mono"; - font-style: normal; - font-weight: 400; - font-display: block; - src: url("/assets/fonts/Ubuntu_Mono-normal-400-latin-ext.woff2") - format("woff2"); - unicode-range: - U+0100-02BA, - U+02BD-02C5, - U+02C7-02CC, - U+02CE-02D7, - U+02DD-02FF, - U+0304, - U+0308, - U+0329, - U+1D00-1DBF, - U+1E00-1E9F, - U+1EF2-1EFF, - U+2020, - U+20A0-20AB, - U+20AD-20C0, - U+2113, - U+2C60-2C7F, - U+A720-A7FF; -} -@font-face { - font-family: "Ubuntu Mono"; - font-style: normal; - font-weight: 400; - font-display: block; - src: url("/assets/fonts/Ubuntu_Mono-normal-400-latin.woff2") format("woff2"); - unicode-range: - U+0000-00FF, - U+0131, - U+0152-0153, - U+02BB-02BC, - U+02C6, - U+02DA, - U+02DC, - U+0304, - U+0308, - U+0329, - U+2000-206F, - U+20AC, - U+2122, - U+2191, - U+2193, - U+2212, - U+2215, - U+FEFF, - U+FFFD; -} -@font-face { - font-family: "Ubuntu Mono"; - font-style: normal; - font-weight: 700; - font-display: block; - src: url("/assets/fonts/Ubuntu_Mono-normal-700-cyrillic-ext.woff2") - format("woff2"); - unicode-range: - U+0460-052F, - U+1C80-1C8A, - U+20B4, - U+2DE0-2DFF, - U+A640-A69F, - U+FE2E-FE2F; -} -@font-face { - font-family: "Ubuntu Mono"; - font-style: normal; - font-weight: 700; - font-display: block; - src: url("/assets/fonts/Ubuntu_Mono-normal-700-cyrillic.woff2") - format("woff2"); - unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; -} -@font-face { - font-family: "Ubuntu Mono"; - font-style: normal; - font-weight: 700; - font-display: block; - src: url("/assets/fonts/Ubuntu_Mono-normal-700-greek-ext.woff2") - format("woff2"); - unicode-range: U+1F00-1FFF; -} -@font-face { - font-family: "Ubuntu Mono"; - font-style: normal; - font-weight: 700; - font-display: block; - src: url("/assets/fonts/Ubuntu_Mono-normal-700-greek.woff2") format("woff2"); - unicode-range: - U+0370-0377, - U+037A-037F, - U+0384-038A, - U+038C, - U+038E-03A1, - U+03A3-03FF; -} -@font-face { - font-family: "Ubuntu Mono"; - font-style: normal; - font-weight: 700; - font-display: block; - src: url("/assets/fonts/Ubuntu_Mono-normal-700-latin-ext.woff2") - format("woff2"); - unicode-range: - U+0100-02BA, - U+02BD-02C5, - U+02C7-02CC, - U+02CE-02D7, - U+02DD-02FF, - U+0304, - U+0308, - U+0329, - U+1D00-1DBF, - U+1E00-1E9F, - U+1EF2-1EFF, - U+2020, - U+20A0-20AB, - U+20AD-20C0, - U+2113, - U+2C60-2C7F, - U+A720-A7FF; -} -@font-face { - font-family: "Ubuntu Mono"; - font-style: normal; - font-weight: 700; - font-display: block; - src: url("/assets/fonts/Ubuntu_Mono-normal-700-latin.woff2") format("woff2"); - unicode-range: - U+0000-00FF, - U+0131, - U+0152-0153, - U+02BB-02BC, - U+02C6, - U+02DA, - U+02DC, - U+0304, - U+0308, - U+0329, - U+2000-206F, - U+20AC, - U+2122, - U+2191, - U+2193, - U+2212, - U+2215, - U+FEFF, - U+FFFD; -} -@font-face { - font-family: "ecrou"; - font-display: block; - src: url("/assets/fonts/ecrou.woff2") format("woff2"); -} diff --git a/site/assets/cube.ts b/site/assets/cube.ts new file mode 100644 index 0000000..f2b0598 --- /dev/null +++ b/site/assets/cube.ts @@ -0,0 +1,241 @@ +"use strict"; + +class Vec3 { + x: number; + y: number; + z: number; + + constructor(x: number, y: number, z: number) { + this.x = x; + this.y = y; + this.z = z; + } + + static zero() { + return new Vec3(0, 0, 0); + } + + length() { + return Math.sqrt(this.x ** 2 + this.y ** 2 + this.z ** 2); + } + + scale(factor: number) { + this.x *= factor; + this.y *= factor; + this.z *= factor; + + return this; + } + + normalize() { + const length = this.length(); + + if (length != 0) { + this.x /= length; + this.y /= length; + this.z /= length; + } + + return this; + } + + static sub(v: Vec3, t: Vec3) { + return new Vec3( + v.x - t.x, + v.y - t.y, + v.z - t.z, + ); + } + + static sum(v: Vec3, t: Vec3) { + return new Vec3( + v.x + t.x, + v.y + t.y, + v.z + t.z, + ); + } +} + +class Quat { + x: number; + y: number; + z: number; + w: number; + + constructor(x: number, y: number, z: number, w: number) { + this.x = x; + this.y = y; + this.z = z; + this.w = w; + } + + static fromAxis(axis: Vec3) { + const angle = axis.length(); + + axis.normalize(); + + const half = angle / 2; + + const sinHalf = Math.sin(half); + const cosHalf = Math.cos(half); + + const x = axis.x * sinHalf; + const y = axis.y * sinHalf; + const z = axis.z * sinHalf; + const w = cosHalf; + + return new Quat(x, y, z, w); + } + + static mul(q: Quat, r: Quat) { + return new Quat( + q.w * r.x + q.x * r.w + q.y * r.z - q.z * r.y, + q.w * r.y - q.x * r.z + q.y * r.w + q.z * r.x, + q.w * r.z + q.x * r.y - q.y * r.x + q.z * r.w, + q.w * r.w - q.x * r.x - q.y * r.y - q.z * r.z, + ); + } +} + +const friction = 3; +const sensitivity = 0.01; + +const mouse = { + down: false, + lastMove: -10000, + previous: Vec3.zero(), +}; + +const orient = { + __cube: document.querySelector(".cube"), + __value: new Quat(0, 0, 0, 1), + + set(value: Quat) { + this.__value = value; + + const q = this.__value; + + // @ts-ignore: Style will never be null. + this.__cube.style.transform = `rotate3d(${q.x}, ${q.y}, ${q.z}, ${ + Math.acos(q.w) * 2 + }rad)`; + }, + + get(): Quat { + return this.__value; + }, +}; + +let velocity = Vec3.zero(); +let impulseThisFrame = Vec3.zero(); + +const handleUp = () => { + mouse.down = false; +}; + +document.addEventListener("mouseup", handleUp); +document.addEventListener("touchend", handleUp); + +const handleDown = (event: MouseEvent | TouchEvent) => { + // Disables link dragging that occurs when spinning. + event.preventDefault(); + + mouse.down = true; + + velocity = Vec3.zero(); +}; + +document.addEventListener("mousedown", handleDown); +document.addEventListener("touchstart", handleDown); + +const handleMove = (event: MouseEvent) => { + // Disables scrolling. + event.preventDefault(); + + if (!mouse.down) return; + + const newMouse = new Vec3(event.clientX, event.clientY, 0); + + const timeDelta = (globalThis.performance.now() - mouse.lastMove) / 1000; + + if (timeDelta > 0.1) { + // This is a fresh scroll. + mouse.previous = newMouse; + } + + const delta = Vec3.sub(newMouse, mouse.previous); + + mouse.previous = newMouse; + mouse.lastMove = globalThis.performance.now(); + + const axis = new Vec3(-delta.y, delta.x, 0) + .normalize() + .scale(delta.length() * sensitivity); + + impulseThisFrame = Vec3.sum(impulseThisFrame, axis); + + const rotation = Quat.fromAxis(axis); + + orient.set(Quat.mul(rotation, orient.get())); +}; + +document.addEventListener("mousemove", handleMove); +document.addEventListener("touchmove", (event) => { + const delta = event.changedTouches[0]; + + // @ts-ignore: We are overriding this for it to work as a MouseEvent. + event.clientX = delta.clientX; + // @ts-ignore: + event.clientY = delta.clientY; + + handleMove(event as object as MouseEvent); +}); + +let lastUpdate = 0; + +const updateFrame = (timestamp: number) => { + if (lastUpdate == 0) lastUpdate = timestamp; + + const delta = (timestamp - lastUpdate) / 1000; + lastUpdate = timestamp; + + if (mouse.down) { + velocity = impulseThisFrame.scale(1 / delta); + impulseThisFrame = Vec3.zero(); + } else { + const decay = Math.exp(-delta * friction); + + const effectiveDelta = friction > 0 ? (1 - decay) / friction : delta; + + let theta = effectiveDelta * velocity.length(); + + velocity.x *= decay; + velocity.y *= decay; + velocity.z *= decay; + + if (friction > 0 && velocity.length() < 0.00001) { + theta += velocity.length() / friction; + + velocity.x = 0; + velocity.y = 0; + velocity.z = 0; + } + + if (globalThis.performance.now() - mouse.lastMove > 10000) { + const impulse = new Vec3(0.7, 0.7, -0.7); + velocity = Vec3.sum(impulse.scale(effectiveDelta * 3), velocity); + } + + const axis = new Vec3(velocity.x, velocity.y, velocity.z) + .normalize() + .scale(theta); + + const rotation = Quat.fromAxis(axis); + + orient.set(Quat.mul(rotation, orient.get())); + } + + requestAnimationFrame(updateFrame); +}; + +updateFrame(0); diff --git a/site/assets/fonts/Exo_2-cyrillic-ext-italic.woff2 b/site/assets/fonts/Exo_2-cyrillic-ext-italic.woff2 deleted file mode 100644 index ff0bce0..0000000 Binary files a/site/assets/fonts/Exo_2-cyrillic-ext-italic.woff2 and /dev/null differ diff --git a/site/assets/fonts/Exo_2-cyrillic-ext-normal.woff2 b/site/assets/fonts/Exo_2-cyrillic-ext-normal.woff2 deleted file mode 100644 index 21eac3e..0000000 Binary files a/site/assets/fonts/Exo_2-cyrillic-ext-normal.woff2 and /dev/null differ diff --git a/site/assets/fonts/Exo_2-cyrillic-italic.woff2 b/site/assets/fonts/Exo_2-cyrillic-italic.woff2 deleted file mode 100644 index 3833e64..0000000 Binary files a/site/assets/fonts/Exo_2-cyrillic-italic.woff2 and /dev/null differ diff --git a/site/assets/fonts/Exo_2-cyrillic-normal.woff2 b/site/assets/fonts/Exo_2-cyrillic-normal.woff2 deleted file mode 100644 index ab4aa10..0000000 Binary files a/site/assets/fonts/Exo_2-cyrillic-normal.woff2 and /dev/null differ diff --git a/site/assets/fonts/Exo_2-latin-ext-italic.woff2 b/site/assets/fonts/Exo_2-latin-ext-italic.woff2 deleted file mode 100644 index 7d3dc81..0000000 Binary files a/site/assets/fonts/Exo_2-latin-ext-italic.woff2 and /dev/null differ diff --git a/site/assets/fonts/Exo_2-latin-ext-normal.woff2 b/site/assets/fonts/Exo_2-latin-ext-normal.woff2 deleted file mode 100644 index 43fd341..0000000 Binary files a/site/assets/fonts/Exo_2-latin-ext-normal.woff2 and /dev/null differ diff --git a/site/assets/fonts/Exo_2-latin-italic.woff2 b/site/assets/fonts/Exo_2-latin-italic.woff2 deleted file mode 100644 index f5e076c..0000000 Binary files a/site/assets/fonts/Exo_2-latin-italic.woff2 and /dev/null differ diff --git a/site/assets/fonts/Exo_2-latin-normal.woff2 b/site/assets/fonts/Exo_2-latin-normal.woff2 deleted file mode 100644 index 2d31b31..0000000 Binary files a/site/assets/fonts/Exo_2-latin-normal.woff2 and /dev/null differ diff --git a/site/assets/fonts/Exo_2-vietnamese-italic.woff2 b/site/assets/fonts/Exo_2-vietnamese-italic.woff2 deleted file mode 100644 index b5daf89..0000000 Binary files a/site/assets/fonts/Exo_2-vietnamese-italic.woff2 and /dev/null differ diff --git a/site/assets/fonts/Exo_2-vietnamese-normal.woff2 b/site/assets/fonts/Exo_2-vietnamese-normal.woff2 deleted file mode 100644 index 95cb6d2..0000000 Binary files a/site/assets/fonts/Exo_2-vietnamese-normal.woff2 and /dev/null differ diff --git a/site/assets/fonts/Ubuntu_Mono-italic-400-cyrillic-ext.woff2 b/site/assets/fonts/Ubuntu_Mono-italic-400-cyrillic-ext.woff2 deleted file mode 100644 index c85171d..0000000 Binary files a/site/assets/fonts/Ubuntu_Mono-italic-400-cyrillic-ext.woff2 and /dev/null differ diff --git a/site/assets/fonts/Ubuntu_Mono-italic-400-cyrillic.woff2 b/site/assets/fonts/Ubuntu_Mono-italic-400-cyrillic.woff2 deleted file mode 100644 index febf81d..0000000 Binary files a/site/assets/fonts/Ubuntu_Mono-italic-400-cyrillic.woff2 and /dev/null differ diff --git a/site/assets/fonts/Ubuntu_Mono-italic-400-greek-ext.woff2 b/site/assets/fonts/Ubuntu_Mono-italic-400-greek-ext.woff2 deleted file mode 100644 index e4e9d06..0000000 Binary files a/site/assets/fonts/Ubuntu_Mono-italic-400-greek-ext.woff2 and /dev/null differ diff --git a/site/assets/fonts/Ubuntu_Mono-italic-400-greek.woff2 b/site/assets/fonts/Ubuntu_Mono-italic-400-greek.woff2 deleted file mode 100644 index 2a430b8..0000000 Binary files a/site/assets/fonts/Ubuntu_Mono-italic-400-greek.woff2 and /dev/null differ diff --git a/site/assets/fonts/Ubuntu_Mono-italic-400-latin-ext.woff2 b/site/assets/fonts/Ubuntu_Mono-italic-400-latin-ext.woff2 deleted file mode 100644 index 426eecf..0000000 Binary files a/site/assets/fonts/Ubuntu_Mono-italic-400-latin-ext.woff2 and /dev/null differ diff --git a/site/assets/fonts/Ubuntu_Mono-italic-400-latin.woff2 b/site/assets/fonts/Ubuntu_Mono-italic-400-latin.woff2 deleted file mode 100644 index e66fd6f..0000000 Binary files a/site/assets/fonts/Ubuntu_Mono-italic-400-latin.woff2 and /dev/null differ diff --git a/site/assets/fonts/Ubuntu_Mono-italic-700-cyrillic-ext.woff2 b/site/assets/fonts/Ubuntu_Mono-italic-700-cyrillic-ext.woff2 deleted file mode 100644 index b734bfa..0000000 Binary files a/site/assets/fonts/Ubuntu_Mono-italic-700-cyrillic-ext.woff2 and /dev/null differ diff --git a/site/assets/fonts/Ubuntu_Mono-italic-700-cyrillic.woff2 b/site/assets/fonts/Ubuntu_Mono-italic-700-cyrillic.woff2 deleted file mode 100644 index 790c51b..0000000 Binary files a/site/assets/fonts/Ubuntu_Mono-italic-700-cyrillic.woff2 and /dev/null differ diff --git a/site/assets/fonts/Ubuntu_Mono-italic-700-greek-ext.woff2 b/site/assets/fonts/Ubuntu_Mono-italic-700-greek-ext.woff2 deleted file mode 100644 index 8dd42f8..0000000 Binary files a/site/assets/fonts/Ubuntu_Mono-italic-700-greek-ext.woff2 and /dev/null differ diff --git a/site/assets/fonts/Ubuntu_Mono-italic-700-greek.woff2 b/site/assets/fonts/Ubuntu_Mono-italic-700-greek.woff2 deleted file mode 100644 index 1ee09cd..0000000 Binary files a/site/assets/fonts/Ubuntu_Mono-italic-700-greek.woff2 and /dev/null differ diff --git a/site/assets/fonts/Ubuntu_Mono-italic-700-latin-ext.woff2 b/site/assets/fonts/Ubuntu_Mono-italic-700-latin-ext.woff2 deleted file mode 100644 index 5cd85c7..0000000 Binary files a/site/assets/fonts/Ubuntu_Mono-italic-700-latin-ext.woff2 and /dev/null differ diff --git a/site/assets/fonts/Ubuntu_Mono-italic-700-latin.woff2 b/site/assets/fonts/Ubuntu_Mono-italic-700-latin.woff2 deleted file mode 100644 index 29649aa..0000000 Binary files a/site/assets/fonts/Ubuntu_Mono-italic-700-latin.woff2 and /dev/null differ diff --git a/site/assets/fonts/Ubuntu_Mono-normal-400-cyrillic-ext.woff2 b/site/assets/fonts/Ubuntu_Mono-normal-400-cyrillic-ext.woff2 deleted file mode 100644 index 0a85420..0000000 Binary files a/site/assets/fonts/Ubuntu_Mono-normal-400-cyrillic-ext.woff2 and /dev/null differ diff --git a/site/assets/fonts/Ubuntu_Mono-normal-400-cyrillic.woff2 b/site/assets/fonts/Ubuntu_Mono-normal-400-cyrillic.woff2 deleted file mode 100644 index 9bbcbbc..0000000 Binary files a/site/assets/fonts/Ubuntu_Mono-normal-400-cyrillic.woff2 and /dev/null differ diff --git a/site/assets/fonts/Ubuntu_Mono-normal-400-greek-ext.woff2 b/site/assets/fonts/Ubuntu_Mono-normal-400-greek-ext.woff2 deleted file mode 100644 index 9365f2d..0000000 Binary files a/site/assets/fonts/Ubuntu_Mono-normal-400-greek-ext.woff2 and /dev/null differ diff --git a/site/assets/fonts/Ubuntu_Mono-normal-400-greek.woff2 b/site/assets/fonts/Ubuntu_Mono-normal-400-greek.woff2 deleted file mode 100644 index 7f4a8b7..0000000 Binary files a/site/assets/fonts/Ubuntu_Mono-normal-400-greek.woff2 and /dev/null differ diff --git a/site/assets/fonts/Ubuntu_Mono-normal-400-latin-ext.woff2 b/site/assets/fonts/Ubuntu_Mono-normal-400-latin-ext.woff2 deleted file mode 100644 index 02b2b37..0000000 Binary files a/site/assets/fonts/Ubuntu_Mono-normal-400-latin-ext.woff2 and /dev/null differ diff --git a/site/assets/fonts/Ubuntu_Mono-normal-400-latin.woff2 b/site/assets/fonts/Ubuntu_Mono-normal-400-latin.woff2 deleted file mode 100644 index 1ccb8be..0000000 Binary files a/site/assets/fonts/Ubuntu_Mono-normal-400-latin.woff2 and /dev/null differ diff --git a/site/assets/fonts/Ubuntu_Mono-normal-700-cyrillic-ext.woff2 b/site/assets/fonts/Ubuntu_Mono-normal-700-cyrillic-ext.woff2 deleted file mode 100644 index ab0cfe0..0000000 Binary files a/site/assets/fonts/Ubuntu_Mono-normal-700-cyrillic-ext.woff2 and /dev/null differ diff --git a/site/assets/fonts/Ubuntu_Mono-normal-700-cyrillic.woff2 b/site/assets/fonts/Ubuntu_Mono-normal-700-cyrillic.woff2 deleted file mode 100644 index 7aedbc0..0000000 Binary files a/site/assets/fonts/Ubuntu_Mono-normal-700-cyrillic.woff2 and /dev/null differ diff --git a/site/assets/fonts/Ubuntu_Mono-normal-700-greek-ext.woff2 b/site/assets/fonts/Ubuntu_Mono-normal-700-greek-ext.woff2 deleted file mode 100644 index 0d23ef6..0000000 Binary files a/site/assets/fonts/Ubuntu_Mono-normal-700-greek-ext.woff2 and /dev/null differ diff --git a/site/assets/fonts/Ubuntu_Mono-normal-700-greek.woff2 b/site/assets/fonts/Ubuntu_Mono-normal-700-greek.woff2 deleted file mode 100644 index e36271a..0000000 Binary files a/site/assets/fonts/Ubuntu_Mono-normal-700-greek.woff2 and /dev/null differ diff --git a/site/assets/fonts/Ubuntu_Mono-normal-700-latin-ext.woff2 b/site/assets/fonts/Ubuntu_Mono-normal-700-latin-ext.woff2 deleted file mode 100644 index 72b16d7..0000000 Binary files a/site/assets/fonts/Ubuntu_Mono-normal-700-latin-ext.woff2 and /dev/null differ diff --git a/site/assets/fonts/Ubuntu_Mono-normal-700-latin.woff2 b/site/assets/fonts/Ubuntu_Mono-normal-700-latin.woff2 deleted file mode 100644 index 71013c6..0000000 Binary files a/site/assets/fonts/Ubuntu_Mono-normal-700-latin.woff2 and /dev/null differ diff --git a/site/assets/fonts/ecrou.woff2 b/site/assets/fonts/ecrou.woff2 deleted file mode 100644 index 9f9cba8..0000000 Binary files a/site/assets/fonts/ecrou.woff2 and /dev/null differ diff --git a/site/assets/images/github-ds-store-mr-list.webp b/site/assets/github-ds-store-mr-list.webp similarity index 100% rename from site/assets/images/github-ds-store-mr-list.webp rename to site/assets/github-ds-store-mr-list.webp diff --git a/site/assets/icons/icon.gif b/site/assets/icon.gif similarity index 100% rename from site/assets/icons/icon.gif rename to site/assets/icon.gif diff --git a/site/assets/icons/icon.webp b/site/assets/icon.webp similarity index 100% rename from site/assets/icons/icon.webp rename to site/assets/icon.webp diff --git a/site/assets/images/nix-iceberg.webp b/site/assets/nix-iceberg.webp similarity index 100% rename from site/assets/images/nix-iceberg.webp rename to site/assets/nix-iceberg.webp diff --git a/site/assets/images/sisyphus-ds-store.webp b/site/assets/sisyphus-ds-store.webp similarity index 100% rename from site/assets/images/sisyphus-ds-store.webp rename to site/assets/sisyphus-ds-store.webp diff --git a/site/assets/images/turkish-q-i.webp b/site/assets/turkish-q-i.webp similarity index 100% rename from site/assets/images/turkish-q-i.webp rename to site/assets/turkish-q-i.webp diff --git a/site/blog.vto b/site/blog.vto index 03c03af..59469ec 100644 --- a/site/blog.vto +++ b/site/blog.vto @@ -1,33 +1,21 @@ --- layout: text.vto -title: about:blog + +title: Blog --- - +

Blog Articles

-

-Blog Articles +Are you old? Then you might want to check out my super cool +RSS Feed too! - - rss - json - -

- -

Here is where I dump all my schizophenic and sometimes coherent ramblings. Take a look!

- - diff --git a/site/blog/_data.json b/site/blog/_data.json new file mode 100644 index 0000000..c7b882e --- /dev/null +++ b/site/blog/_data.json @@ -0,0 +1,6 @@ +{ + "layout": "article.vto", + "type": "article", + + "description": null +} diff --git a/site/blog/_data.ts b/site/blog/_data.ts deleted file mode 100644 index d50cb78..0000000 --- a/site/blog/_data.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default { - layout: "text.vto", - type: "article", -}; diff --git a/site/blog/cosmic-drift.md b/site/blog/cosmic-drift.md index 9f6dab4..5ed7030 100644 --- a/site/blog/cosmic-drift.md +++ b/site/blog/cosmic-drift.md @@ -4,7 +4,7 @@ description: Or how I missed the school bus because of a cosmic ray. date: 2024-04-02 -keywords: +tags: - time - unix-timestamps --- @@ -54,11 +54,11 @@ Maybe the 11th bit got flipped, making it increment 1024? Aha! So the 11th bit got flipped by something. And that something was probably a cosmic ray. -> **EDIT:** It was not a cosmic ray. As pointed out by -> [@BenjaminRi's comment on lobste.rs](https://lobste.rs/s/jb1o6q/cosmic_drift#c_1ztluj) -> it most likely was either a bug or storage corruption as the alarm ran late -> the next day. You should still create more than one alarm just in case if you -> are using a phone prone to this, however. +EDIT: It was not a cosmic ray. As pointed out by +[@BenjaminRi's comment on lobste.rs](https://lobste.rs/s/jb1o6q/cosmic_drift#c_1ztluj) +it was either a bug or storage corruption as the alarm ran late the next day. +You should still create more than one alarm just in case if you are using a +phone prone to this, however. My main takeaway from this event is to create more than one alarm, for extra redundancy. Who knew being prone to sleeping in could save you from your alarm diff --git a/site/blog/gitignore.md b/site/blog/gitignore.md index 27a507d..eb48a57 100644 --- a/site/blog/gitignore.md +++ b/site/blog/gitignore.md @@ -1,13 +1,13 @@ --- -title: "`.gitignore` is inherently Sisyphean" +title: .gitignore is inherently Sisyphean description: And how to roll the rock over the edge. color: "#A5804C" -thumbnail: /assets/images/sisyphus-ds-store.webp +thumbnail: /assets/sisyphus-ds-store.webp date: 2024-09-30 -keywords: +tags: - vcs --- @@ -17,7 +17,7 @@ You just started a new project. You ran `cargo init`, `poetry init` and Those commands created the necessary files to work, it also added the following lines to your .gitignore: -```ignore +```text target __pycache__ bin @@ -36,12 +36,12 @@ You start reviewing the code and notice a file quite out of place: `.DS_Store`. You ask the person what it is, he says he has no clue. ![Hundreds of thousands of merge requests on GitHub trying -to gitignore .DS_Store](/assets/images/github-ds-store-mr-list.webp) +to gitignore .DS_Store](/assets/github-ds-store-mr-list.webp) Whatever. You just delete the file from the branch and add the file's name to the repositories gitignore: -```ignore +```text target __pycache__ bin @@ -56,7 +56,7 @@ request. You look at it, and see that there is a whole directory that is irrelevant. You tell that person to delete the directory from the branch and add it to the gitignore. The gitignore lives on: -```ignore +```text target __pycache__ bin @@ -67,7 +67,7 @@ bin Then, someone that uses IntelliJ IDEA commits five hundred XML files and the `.idea` directory. You repeat this process: -```ignore +```text target __pycache__ bin @@ -84,7 +84,7 @@ Hell. You feel like a mythic god undergoing punishment for cheating death and deceiving the underworld. ![Sisyphus pushing up a boulder that has .DS_Store written -on it](/assets/images/sisyphus-ds-store.webp) +on it](/assets/sisyphus-ds-store.webp) How do you escape this endless loop of ignoring files that sneak in? Maybe by educating every single merge request author? Nope, that definitely won't work, @@ -95,7 +95,7 @@ Luckily, you realize that you can turn the blacklist of files (the gitignore) to a whitelist, by just ignoring everything and manually un-ignoring desired files. You change your gitignore to this: -```ignore +```text * !.gitignore diff --git a/site/blog/htmnix.md b/site/blog/htmnix.md index 83fa1e3..ad3b3bb 100644 --- a/site/blog/htmnix.md +++ b/site/blog/htmnix.md @@ -4,7 +4,7 @@ description: How the absolutely cursed HTMNIX project works. date: 2024-03-04 -keywords: +tags: - html - nix --- @@ -26,6 +26,9 @@ snippet that uses it: <.html> ``` +> (hightlight.js shits the bed while highlighting this abomination - just ignore +> it) + You are probably thinking furiously right now, maybe you've noticed something: > Aha! In Nix, `` is used to find stuff from the Nix path like so: @@ -42,8 +45,8 @@ You are somewhat correct. But not quite. Nix `` expressions actually boil down to a call of the builtin `__findFile`, like so: -```nix -# nix-instantiate --parse --expr "" +```shell +❯ nix-instantiate --parse --expr "" (__findFile __nixPath "foo") ``` diff --git a/site/blog/nix-iceberg.md b/site/blog/nix-iceberg.md index 4c5935e..6be9b5b 100644 --- a/site/blog/nix-iceberg.md +++ b/site/blog/nix-iceberg.md @@ -5,13 +5,13 @@ description: And revealing how cursed Nix is. date: 2024-04-15 draft: true -keywords: +tags: - nix --- I was surfing the web a few weeks ago, and I came across this iceberg chart: -![The Nix Iceberg](/assets/images/nix-iceberg.webp) +![The Nix Iceberg](/assets/nix-iceberg.webp) [Here's the original source for this image, created by @leftpaddotpy, @puckipedia, @@ -262,7 +262,7 @@ allows flakes to be configured in "flake compile time". Let's say you have a flake that provides a binary. Let's also assume you can run it with the following Nix CLI invokation: -```sh +```shell nix run github:me/hello-world ``` @@ -292,7 +292,7 @@ is an ugly hack. You can do this in your flake: And override the `debug-mode` input like so, to run a debug binary instead: -```sh +```shell nix run github:me/hello-world --override debug-mode github:boolean-option/true ``` @@ -502,7 +502,7 @@ This syntax is a way to check for the existence of a key in an attribute set.

-```sh +```shell #!/usr/bin/env nix-shell #!nix-shell -i python3 -p python3 ``` @@ -515,7 +515,7 @@ You can use nix-shell as a script interpreter to allow scripts written in arbitrary languages to obtain their own dependencies via Nix. This is done by starting the script with the following lines: -```sh +```shell #!/usr/bin/env nix-shell #!nix-shell -i real-interpreter --packages packages ``` diff --git a/site/blog/swap-i.md b/site/blog/swap-i.md index b9ffdc4..c9d6604 100644 --- a/site/blog/swap-i.md +++ b/site/blog/swap-i.md @@ -1,10 +1,10 @@ --- -title: Swap the `ı` and `i` key on your keyboard for faster modal editing +title: Swap the ı and i key on your keyboard for faster modal editing description: How to swap the ı and i key on your Turkish keyboard on Linux. date: 2024-05-20 -keywords: +tags: - localisation - modal-editors --- @@ -12,7 +12,7 @@ keywords: If you have ever used a Turkish-Q keyboard in combination with a modal editor before, you might have noticed that the `i` key is pretty far off to the side: -![The placement of the `i` key on the Turkish-Q layout](/assets/images/turkish-q-i.webp) +![The placement of the `i` key on the Turkish-Q layout](/assets/turkish-q-i.webp) This blog post will guide you on how to swap the `ı` key with the `i` key (but not the `I` and `İ` keys). This will be a great change if you write primarily in @@ -119,7 +119,7 @@ This is how it is done on NixOS: And this is how it is done on Arch: -```sh +```shell cat << :end include "/usr/share/kbd/keymaps/i386/qwerty/trq.map" diff --git a/site/contact.md b/site/contact.md index 9b19d73..9942d62 100644 --- a/site/contact.md +++ b/site/contact.md @@ -1,38 +1,16 @@ --- layout: text.vto -title: about:telecommunication +title: Contact --- You can contact me via: -- Matrix (preferred): - [`@rgbcube:rgbcu.be`](https://matrix.to/#/@rgbcube:rgbcu.be) -- Discord: [`rgbcube`](https://discord.com/users/512640455834337290) -- E-Mail: `contact[at][this-web-site]` +- Discord: `rgbcube` or `RGBCube#4777` +- E-Mail: [`contact@rgbcu.be`](mailto:contact@rgbcu.be) +- Matrix: [`@rgbcube:rgbcu.be`](https://matrix.to/#/@rgbcube:rgbcu.be) Here are some other useful links as well: - [GitHub](https://github.com/RGBCube) - [Twitch](https://www.twitch.tv/rgbcube) - [X](https://x.com/HSVSphere) - - diff --git a/site/index.page.tsx b/site/index.page.tsx new file mode 100644 index 0000000..9a6efca --- /dev/null +++ b/site/index.page.tsx @@ -0,0 +1,105 @@ +import Cube from "./_includes/cube.tsx"; + +export const title = "RGBCube"; +export const viewportFixed = true; + +export default ( + <> + +
about
+ + } + top={ + +
github
+
+ } + right={ + +
contact
+
+ } + left={ + +
blog
+
+ } + /> + + + +); diff --git a/site/index.vto b/site/index.vto deleted file mode 100644 index d8b4cb0..0000000 --- a/site/index.vto +++ /dev/null @@ -1,94 +0,0 @@ ---- -prevent_zoom: true ---- - - - -{{> const style = ` - bg-white font-[ecrou] text-black text-sm - select-none - px-1 pt-0.5 transform-[translateY(calc(-var(--spacing)*0.5/2))] - nuclear -` }} - -{{ set cube_face_front }} - about -{{ /set }} - -{{ set cube_face_top }} - github -{{ /set }} - -{{ set cube_face_right }} - contact -{{ /set }} - -{{ set cube_face_left }} - blog -{{ /set }} - -{{ include "cube.vto" }}