diff --git a/.forgejo/workflows/signal-rebuild.yml b/.forgejo/workflows/signal-rebuild.yml index 5df2118..2ca161a 100644 --- a/.forgejo/workflows/signal-rebuild.yml +++ b/.forgejo/workflows/signal-rebuild.yml @@ -12,6 +12,9 @@ jobs: - name: Signal deprived.dev for rebuild env: SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY }} + GITKEY: ${{ secrets.GITKEY }} + PUBLIC_URL_BASE: ${{ variables.PUBLIC_URL_BASE }} + PUBLIC_POCKET_URL: ${{ variables.PUBLIC_POCKET_URL }} run: | sshkey=$(mktemp) trap "rm -rf $sshkey" exit diff --git a/.gitignore b/.gitignore index 699266e..03fd6eb 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,9 @@ node_modules !.env.example vite.config.js.timestamp-* vite.config.ts.timestamp-* +redacted_cv_info.json +.npm-cache/ +.npm-cache +.ssh/ +*/build/ +*/*.log diff --git a/deprecated/tools/+page.svelte b/deprecated/tools/+page.svelte new file mode 100644 index 0000000..8c8e891 --- /dev/null +++ b/deprecated/tools/+page.svelte @@ -0,0 +1,56 @@ + + +
+ +
+

+ Tools (NOT FINISHED. come back in the future.) +

+ These are the tools collected from different places of the internet + + +
+ +
+

MPUs/SoCs

+ Whatever acronym you want lol +
+ + +
+
+ +
+ I if you have tool suggestions, then either create an issue, create a + pull request, or send an email. I probably wont add it though, since + this is free work lol. +
+
+
+
diff --git a/src/routes/tools/battery-life-calculator/+page.svelte b/deprecated/tools/battery-life-calculator/+page.svelte similarity index 100% rename from src/routes/tools/battery-life-calculator/+page.svelte rename to deprecated/tools/battery-life-calculator/+page.svelte diff --git a/src/routes/tools/battery-life-calculator/pageSrc/BatteryCalc.ts b/deprecated/tools/battery-life-calculator/pageSrc/BatteryCalc.ts similarity index 100% rename from src/routes/tools/battery-life-calculator/pageSrc/BatteryCalc.ts rename to deprecated/tools/battery-life-calculator/pageSrc/BatteryCalc.ts diff --git a/src/routes/tools/battery-life-calculator/pageSrc/MCU_defs.ts b/deprecated/tools/battery-life-calculator/pageSrc/MCU_defs.ts similarity index 100% rename from src/routes/tools/battery-life-calculator/pageSrc/MCU_defs.ts rename to deprecated/tools/battery-life-calculator/pageSrc/MCU_defs.ts diff --git a/src/routes/tools/comps/ToolButton.svelte b/deprecated/tools/comps/ToolButton.svelte similarity index 100% rename from src/routes/tools/comps/ToolButton.svelte rename to deprecated/tools/comps/ToolButton.svelte diff --git a/src/routes/zhen/Comps/AboutMe.svelte b/deprecated/zhen/Comps/AboutMe.svelte similarity index 100% rename from src/routes/zhen/Comps/AboutMe.svelte rename to deprecated/zhen/Comps/AboutMe.svelte diff --git a/src/routes/zhen/Comps/TopNameTextPlate.svelte b/deprecated/zhen/Comps/TopNameTextPlate.svelte similarity index 100% rename from src/routes/zhen/Comps/TopNameTextPlate.svelte rename to deprecated/zhen/Comps/TopNameTextPlate.svelte diff --git a/src/routes/zhen/Comps/ZhenInformatikTimeline.svelte b/deprecated/zhen/Comps/ZhenInformatikTimeline.svelte similarity index 100% rename from src/routes/zhen/Comps/ZhenInformatikTimeline.svelte rename to deprecated/zhen/Comps/ZhenInformatikTimeline.svelte diff --git a/src/routes/zhen/Utils/Vector2.ts b/deprecated/zhen/Utils/Vector2.ts similarity index 100% rename from src/routes/zhen/Utils/Vector2.ts rename to deprecated/zhen/Utils/Vector2.ts diff --git a/src/routes/zhen/cv/CompsRev3/AlexWatermark.svelte b/deprecated/zhen/cv/CompsRev3/AlexWatermark.svelte similarity index 100% rename from src/routes/zhen/cv/CompsRev3/AlexWatermark.svelte rename to deprecated/zhen/cv/CompsRev3/AlexWatermark.svelte diff --git a/src/routes/zhen/cv/CompsRev3/BiggestFlex.svelte b/deprecated/zhen/cv/CompsRev3/BiggestFlex.svelte similarity index 100% rename from src/routes/zhen/cv/CompsRev3/BiggestFlex.svelte rename to deprecated/zhen/cv/CompsRev3/BiggestFlex.svelte diff --git a/src/routes/zhen/cv/CompsRev3/BottomRightDecor.svelte b/deprecated/zhen/cv/CompsRev3/BottomRightDecor.svelte similarity index 100% rename from src/routes/zhen/cv/CompsRev3/BottomRightDecor.svelte rename to deprecated/zhen/cv/CompsRev3/BottomRightDecor.svelte diff --git a/src/routes/zhen/cv/CompsRev3/CombinedContacts.svelte b/deprecated/zhen/cv/CompsRev3/CombinedContacts.svelte similarity index 100% rename from src/routes/zhen/cv/CompsRev3/CombinedContacts.svelte rename to deprecated/zhen/cv/CompsRev3/CombinedContacts.svelte diff --git a/src/routes/zhen/cv/CompsRev3/Contact.svelte b/deprecated/zhen/cv/CompsRev3/Contact.svelte similarity index 100% rename from src/routes/zhen/cv/CompsRev3/Contact.svelte rename to deprecated/zhen/cv/CompsRev3/Contact.svelte diff --git a/src/routes/zhen/cv/CompsRev3/Education.svelte b/deprecated/zhen/cv/CompsRev3/Education.svelte similarity index 100% rename from src/routes/zhen/cv/CompsRev3/Education.svelte rename to deprecated/zhen/cv/CompsRev3/Education.svelte diff --git a/src/routes/zhen/cv/CompsRev3/Experience.svelte b/deprecated/zhen/cv/CompsRev3/Experience.svelte similarity index 100% rename from src/routes/zhen/cv/CompsRev3/Experience.svelte rename to deprecated/zhen/cv/CompsRev3/Experience.svelte diff --git a/src/routes/zhen/cv/CompsRev3/IconAndText.svelte b/deprecated/zhen/cv/CompsRev3/IconAndText.svelte similarity index 95% rename from src/routes/zhen/cv/CompsRev3/IconAndText.svelte rename to deprecated/zhen/cv/CompsRev3/IconAndText.svelte index a8eee3c..e2b2463 100644 --- a/src/routes/zhen/cv/CompsRev3/IconAndText.svelte +++ b/deprecated/zhen/cv/CompsRev3/IconAndText.svelte @@ -5,7 +5,7 @@ export let fontSize: string = "3mm"; export let lineHeight: string = "3.1mm"; - import { onMount } from "svelte"; + import onMount from "@e/onMount"; onMount(() => { imageCaption = logo.split(/(\\|\/)/g).pop(); }); diff --git a/src/routes/zhen/cv/CompsRev3/IconAndText2.svelte b/deprecated/zhen/cv/CompsRev3/IconAndText2.svelte similarity index 94% rename from src/routes/zhen/cv/CompsRev3/IconAndText2.svelte rename to deprecated/zhen/cv/CompsRev3/IconAndText2.svelte index 1ec697c..b2e0c94 100644 --- a/src/routes/zhen/cv/CompsRev3/IconAndText2.svelte +++ b/deprecated/zhen/cv/CompsRev3/IconAndText2.svelte @@ -3,7 +3,7 @@ export let logoWidths: string = "35%"; - import { onMount } from "svelte"; + import onMount from "@e/onMount"; onMount(() => { imageCaption = logo.split(/(\\|\/)/g).pop(); }); diff --git a/src/routes/zhen/cv/CompsRev3/LeftTopDecor.svelte b/deprecated/zhen/cv/CompsRev3/LeftTopDecor.svelte similarity index 100% rename from src/routes/zhen/cv/CompsRev3/LeftTopDecor.svelte rename to deprecated/zhen/cv/CompsRev3/LeftTopDecor.svelte diff --git a/deprecated/zhen/cv/CompsRev3/LinkToSource.svelte b/deprecated/zhen/cv/CompsRev3/LinkToSource.svelte new file mode 100644 index 0000000..a58cf61 --- /dev/null +++ b/deprecated/zhen/cv/CompsRev3/LinkToSource.svelte @@ -0,0 +1,106 @@ + + +
+
+
+
+ This CV was made using html, css and SvelteKit logo +
+ Sources: + CV source code + and + My Website +
+
+
+ + diff --git a/src/routes/zhen/cv/CompsRev3/LinkedInQR.svelte b/deprecated/zhen/cv/CompsRev3/LinkedInQR.svelte similarity index 100% rename from src/routes/zhen/cv/CompsRev3/LinkedInQR.svelte rename to deprecated/zhen/cv/CompsRev3/LinkedInQR.svelte diff --git a/src/routes/zhen/cv/CompsRev3/NameAndImage.svelte b/deprecated/zhen/cv/CompsRev3/NameAndImage.svelte similarity index 100% rename from src/routes/zhen/cv/CompsRev3/NameAndImage.svelte rename to deprecated/zhen/cv/CompsRev3/NameAndImage.svelte diff --git a/src/routes/zhen/cv/CompsRev3/NamePlate.svelte b/deprecated/zhen/cv/CompsRev3/NamePlate.svelte similarity index 100% rename from src/routes/zhen/cv/CompsRev3/NamePlate.svelte rename to deprecated/zhen/cv/CompsRev3/NamePlate.svelte diff --git a/src/routes/zhen/cv/CompsRev3/OtherContact.svelte b/deprecated/zhen/cv/CompsRev3/OtherContact.svelte similarity index 100% rename from src/routes/zhen/cv/CompsRev3/OtherContact.svelte rename to deprecated/zhen/cv/CompsRev3/OtherContact.svelte diff --git a/src/routes/zhen/cv/CompsRev3/Profile.svelte b/deprecated/zhen/cv/CompsRev3/Profile.svelte similarity index 100% rename from src/routes/zhen/cv/CompsRev3/Profile.svelte rename to deprecated/zhen/cv/CompsRev3/Profile.svelte diff --git a/src/routes/zhen/cv/CompsRev3/RepeatedSkills.svelte b/deprecated/zhen/cv/CompsRev3/RepeatedSkills.svelte similarity index 100% rename from src/routes/zhen/cv/CompsRev3/RepeatedSkills.svelte rename to deprecated/zhen/cv/CompsRev3/RepeatedSkills.svelte diff --git a/src/routes/zhen/cv/CompsRev3/ShortProfile.svelte b/deprecated/zhen/cv/CompsRev3/ShortProfile.svelte similarity index 100% rename from src/routes/zhen/cv/CompsRev3/ShortProfile.svelte rename to deprecated/zhen/cv/CompsRev3/ShortProfile.svelte diff --git a/src/routes/zhen/cv/CompsRev3/TableOfProjects.svelte b/deprecated/zhen/cv/CompsRev3/TableOfProjects.svelte similarity index 100% rename from src/routes/zhen/cv/CompsRev3/TableOfProjects.svelte rename to deprecated/zhen/cv/CompsRev3/TableOfProjects.svelte diff --git a/src/routes/zhen/cv/cv.zip b/deprecated/zhen/cv/cv.zip similarity index 100% rename from src/routes/zhen/cv/cv.zip rename to deprecated/zhen/cv/cv.zip diff --git a/src/routes/zhen/cv/rev3/+page.svelte b/deprecated/zhen/cv/rev3/+page.svelte similarity index 99% rename from src/routes/zhen/cv/rev3/+page.svelte rename to deprecated/zhen/cv/rev3/+page.svelte index 725c634..ad1757b 100644 --- a/src/routes/zhen/cv/rev3/+page.svelte +++ b/deprecated/zhen/cv/rev3/+page.svelte @@ -24,7 +24,7 @@ import preveiwImage from "$lib/zhen/cv-comps/EposCvPreveiw.png"; // Print detection setup - import { onMount } from "svelte"; + import onMount from "@e/onMount"; onMount(() => { // Check if the query parameter exists in the URL const urlParams = new URLSearchParams(window.location.search); diff --git a/src/routes/zhen/notes/physics/sharedComps/A4.svelte b/deprecated/zhen/notes/physics/sharedComps/A4.svelte similarity index 100% rename from src/routes/zhen/notes/physics/sharedComps/A4.svelte rename to deprecated/zhen/notes/physics/sharedComps/A4.svelte diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..2468070 --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1735563628, + "narHash": "sha256-OnSAY7XDSx7CtDoqNh8jwVwh4xNL/2HaJxGjryLWzX8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b134951a4c9f3c995fd7be05f3243f8ecd65d798", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..59cf751 --- /dev/null +++ b/flake.nix @@ -0,0 +1,35 @@ +{ + description = "NPM project (dev shell + run, auto-install deps)"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { inherit system; }; + node = pkgs.nodejs_22; # or pkgs.nodejs_20 + + + start = pkgs.writeShellApplication { + name = "start"; + runtimeInputs = [ node ]; + text = '' + set -euo pipefail + export npm_config_cache="$PWD/.npm-cache" + if [ -f package-lock.json ]; then cmd=ci; else cmd=install; fi + echo "→ npm $cmd (nix run)" + ${node}/bin/npm "$cmd" + exec ${node}/bin/npm run dev -- "$@" + ''; + }; + + in + { + devShells.default = pkgs.mkShell { buildInputs = [ node ]; shellHook = ''export npm_config_cache="$PWD/.npm-cache"''; }; + apps.default = { type = "app"; program = "${start}/bin/start"; }; + }); +} + diff --git a/jsconfig.json b/jsconfig.json index 09de4c3..b3052b0 100644 --- a/jsconfig.json +++ b/jsconfig.json @@ -32,6 +32,9 @@ ], "@stores": [ "./src/ts/store.ts" + ], + "@e/*": [ + "./src/optimizers/*" ] } } diff --git a/package-lock.json b/package-lock.json index 9c10e63..62f0466 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,8 @@ "pocketbase": "^0.26.2", "svelte-katex": "^0.1.2", "svelte-media-queries": "^1.6.2", - "theme-change": "^2.5.0" + "theme-change": "^2.5.0", + "zod": "^4.1.11" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.0.0", @@ -3808,6 +3809,15 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/zimmerframe/-/zimmerframe-1.1.2.tgz", "integrity": "sha512-rAbqEGa8ovJy4pyBxZM70hg4pE6gDgaQ0Sl9M3enG3I0d6H4XSAM3GeNGLKnsBpuijUow064sf7ww1nutC5/3w==" + }, + "node_modules/zod": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.1.11.tgz", + "integrity": "sha512-WPsqwxITS2tzx1bzhIKsEs19ABD5vmCVa4xBo2tq/SrV4RNZtfws1EnCWQXM6yh8bD08a1idvkB5MZSBiZsjwg==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } } } } diff --git a/package.json b/package.json index 72941e5..76f1686 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "pocketbase": "^0.26.2", "svelte-katex": "^0.1.2", "svelte-media-queries": "^1.6.2", - "theme-change": "^2.5.0" + "theme-change": "^2.5.0", + "zod": "^4.1.11" } } diff --git a/src/lib/zhen/cv-comps/400x400.png b/src/lib/alex/cv-comps/400x400.png similarity index 100% rename from src/lib/zhen/cv-comps/400x400.png rename to src/lib/alex/cv-comps/400x400.png diff --git a/src/lib/zhen/cv-comps/DTU_Logo.png b/src/lib/alex/cv-comps/DTU_Logo.png similarity index 100% rename from src/lib/zhen/cv-comps/DTU_Logo.png rename to src/lib/alex/cv-comps/DTU_Logo.png diff --git a/src/lib/zhen/cv-comps/EmphasysLogo.png b/src/lib/alex/cv-comps/EmphasysLogo.png similarity index 100% rename from src/lib/zhen/cv-comps/EmphasysLogo.png rename to src/lib/alex/cv-comps/EmphasysLogo.png diff --git a/src/lib/zhen/cv-comps/EposLogo.png b/src/lib/alex/cv-comps/EposLogo.png similarity index 100% rename from src/lib/zhen/cv-comps/EposLogo.png rename to src/lib/alex/cv-comps/EposLogo.png diff --git a/src/lib/zhen/cv-comps/GrazperLogo.jpg b/src/lib/alex/cv-comps/GrazperLogo.jpg similarity index 100% rename from src/lib/zhen/cv-comps/GrazperLogo.jpg rename to src/lib/alex/cv-comps/GrazperLogo.jpg diff --git a/src/lib/zhen/cv-comps/KhoraLogo.jpg b/src/lib/alex/cv-comps/KhoraLogo.jpg similarity index 100% rename from src/lib/zhen/cv-comps/KhoraLogo.jpg rename to src/lib/alex/cv-comps/KhoraLogo.jpg diff --git a/src/lib/zhen/cv-comps/MakerspaceLogo.png b/src/lib/alex/cv-comps/MakerspaceLogo.png similarity index 100% rename from src/lib/zhen/cv-comps/MakerspaceLogo.png rename to src/lib/alex/cv-comps/MakerspaceLogo.png diff --git a/src/lib/zhen/cv-comps/PrimarySchoolLogo.png b/src/lib/alex/cv-comps/PrimarySchoolLogo.png similarity index 100% rename from src/lib/zhen/cv-comps/PrimarySchoolLogo.png rename to src/lib/alex/cv-comps/PrimarySchoolLogo.png diff --git a/src/lib/zhen/cv-comps/SASLogo.png b/src/lib/alex/cv-comps/SASLogo.png similarity index 100% rename from src/lib/zhen/cv-comps/SASLogo.png rename to src/lib/alex/cv-comps/SASLogo.png diff --git a/src/lib/zhen/cv-comps/VRNerd.jpg b/src/lib/alex/cv-comps/VRNerd.jpg similarity index 100% rename from src/lib/zhen/cv-comps/VRNerd.jpg rename to src/lib/alex/cv-comps/VRNerd.jpg diff --git a/src/lib/zhen/cv-comps/YaaummaLogo.png b/src/lib/alex/cv-comps/YaaummaLogo.png similarity index 100% rename from src/lib/zhen/cv-comps/YaaummaLogo.png rename to src/lib/alex/cv-comps/YaaummaLogo.png diff --git a/src/lib/zhen/cv-comps/nextKbhLogo.png b/src/lib/alex/cv-comps/nextKbhLogo.png similarity index 100% rename from src/lib/zhen/cv-comps/nextKbhLogo.png rename to src/lib/alex/cv-comps/nextKbhLogo.png diff --git a/src/lib/alex/cv-comps/preview.png b/src/lib/alex/cv-comps/preview.png new file mode 100644 index 0000000..aa7d65a Binary files /dev/null and b/src/lib/alex/cv-comps/preview.png differ diff --git a/src/lib/zhen/cv-comps/zylveterSus.png b/src/lib/alex/cv-comps/zylveterSus.png similarity index 100% rename from src/lib/zhen/cv-comps/zylveterSus.png rename to src/lib/alex/cv-comps/zylveterSus.png diff --git a/src/lib/zhen/cv-comps/EposCvPreveiw.png b/src/lib/zhen/cv-comps/EposCvPreveiw.png deleted file mode 100644 index addce1b..0000000 Binary files a/src/lib/zhen/cv-comps/EposCvPreveiw.png and /dev/null differ diff --git a/src/lib/zhen/cv-comps/LinkedInQrCode.svg b/src/lib/zhen/cv-comps/LinkedInQrCode.svg deleted file mode 100644 index 56cfdae..0000000 --- a/src/lib/zhen/cv-comps/LinkedInQrCode.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - diff --git a/src/lib/zhen/cv-comps/MoreProfesionalMe.jpg b/src/lib/zhen/cv-comps/MoreProfesionalMe.jpg deleted file mode 100644 index bc45477..0000000 Binary files a/src/lib/zhen/cv-comps/MoreProfesionalMe.jpg and /dev/null differ diff --git a/src/lib/zhen/cv-comps/zhenSelfie.jpg b/src/lib/zhen/cv-comps/zhenSelfie.jpg deleted file mode 100644 index 64e54c8..0000000 Binary files a/src/lib/zhen/cv-comps/zhenSelfie.jpg and /dev/null differ diff --git a/src/optimizers/fly.ts b/src/optimizers/fly.ts new file mode 100644 index 0000000..1fb04e1 --- /dev/null +++ b/src/optimizers/fly.ts @@ -0,0 +1 @@ +export { fly as default } from "svelte/transition"; diff --git a/src/optimizers/onDestroy.ts b/src/optimizers/onDestroy.ts new file mode 100644 index 0000000..e65ea50 --- /dev/null +++ b/src/optimizers/onDestroy.ts @@ -0,0 +1 @@ +export { onDestroy as default } from "svelte"; diff --git a/src/optimizers/onMount.ts b/src/optimizers/onMount.ts new file mode 100644 index 0000000..2469ddb --- /dev/null +++ b/src/optimizers/onMount.ts @@ -0,0 +1 @@ +export { onMount as default } from "svelte"; diff --git a/src/optimizers/sveltekit.ts b/src/optimizers/sveltekit.ts new file mode 100644 index 0000000..293c893 --- /dev/null +++ b/src/optimizers/sveltekit.ts @@ -0,0 +1 @@ +export { sveltekit as default } from "@sveltejs/kit/vite"; diff --git a/src/optimizers/tick.ts b/src/optimizers/tick.ts new file mode 100644 index 0000000..e5c739f --- /dev/null +++ b/src/optimizers/tick.ts @@ -0,0 +1 @@ +export { tick as default } from "svelte"; diff --git a/src/optimizers/viteThing.js b/src/optimizers/viteThing.js new file mode 100644 index 0000000..8cacd31 --- /dev/null +++ b/src/optimizers/viteThing.js @@ -0,0 +1 @@ +export { vitePreprocess as default } from "@sveltejs/vite-plugin-svelte"; diff --git a/src/pages/shop/_shop_main.svelte b/src/pages/shop/_shop_main.svelte index 0ba1f3a..2371953 100644 --- a/src/pages/shop/_shop_main.svelte +++ b/src/pages/shop/_shop_main.svelte @@ -1,8 +1,8 @@ + +{$re?.name ?? "Alex"}'s CV {getFormattedDate()} + + + + + +
+
+ Under here is my CV rev1 for an application made entirely in HTML and CSS. + The page is designed to be saved as PDF. This can be done by pressing
+ P +
+ + +
CTRL
+ , then set scaling to 100% and no margins. Lastly, select save to PDF or print. +
+
+ I have to sadly recommend chrome for this process. Firefox somehow messes with + the quality of the PDF :( +
+
+ +
+
+
+ + +
+
+
+ +
+ +
+ +
+ +
+
+
+
+
+ +
+ +
+
+ + + + + +
+
+
+
+ + diff --git a/src/routes/cv/comps/AlexWatermark.svelte b/src/routes/cv/comps/AlexWatermark.svelte new file mode 100644 index 0000000..1f040f3 --- /dev/null +++ b/src/routes/cv/comps/AlexWatermark.svelte @@ -0,0 +1,23 @@ + + +
+ ALEX +
+ + diff --git a/src/routes/cv/comps/BiggestFlex.svelte b/src/routes/cv/comps/BiggestFlex.svelte new file mode 100644 index 0000000..0fa5cc4 --- /dev/null +++ b/src/routes/cv/comps/BiggestFlex.svelte @@ -0,0 +1,25 @@ +
+
+ + Biggest flex + +

*Gamejams that had competitions.

+
+
+ The deprived devs has won every gamejam, we've participated.
+
+ +
+ + diff --git a/src/routes/cv/comps/BottomRightDecor.svelte b/src/routes/cv/comps/BottomRightDecor.svelte new file mode 100644 index 0000000..d777cf8 --- /dev/null +++ b/src/routes/cv/comps/BottomRightDecor.svelte @@ -0,0 +1,53 @@ + + +
+
+
+
+
+ + + diff --git a/src/routes/cv/comps/CombinedContacts.svelte b/src/routes/cv/comps/CombinedContacts.svelte new file mode 100644 index 0000000..5c1dba2 --- /dev/null +++ b/src/routes/cv/comps/CombinedContacts.svelte @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/src/routes/cv/comps/Contact.svelte b/src/routes/cv/comps/Contact.svelte new file mode 100644 index 0000000..38b2684 --- /dev/null +++ b/src/routes/cv/comps/Contact.svelte @@ -0,0 +1,81 @@ + + +
+
+ Contact +
+
+
+
Email
+
{$re?.email ?? "alex@deprived.dev"}
+
+
+
Phone
+
{$re?.phone ?? "1-800-273-8255"}
+
+ +
+
+ + diff --git a/src/routes/cv/comps/Education.svelte b/src/routes/cv/comps/Education.svelte new file mode 100644 index 0000000..0885b53 --- /dev/null +++ b/src/routes/cv/comps/Education.svelte @@ -0,0 +1,51 @@ + + +
+
+ Education +
+
+ + {$re?.education[0].name ?? ""}
+

AI and data

+
+ + {$re?.education[0].name ?? ""}
+

Computer science

+
+ + Master class
+

SAS Programming

+
+ + {$re?.education[2].name ?? ""}
+

VR development

+
+
+
+ + diff --git a/src/routes/cv/comps/Experience.svelte b/src/routes/cv/comps/Experience.svelte new file mode 100644 index 0000000..958cf2c --- /dev/null +++ b/src/routes/cv/comps/Experience.svelte @@ -0,0 +1,72 @@ + + +
+
+ Experience +
+
+
+ + Full-stack
+ {$re?.experience[0].name}
+ Feb 2025 - Now +
+
+
+ + Data annotator
+ {$re?.experience[1].name}
+ Jul 2024 - Now +
+
+
+ + 3D printer manager - Volunteer
+ {$re?.experience[2].name}
+ Nov 2023 - Now +
+
+
+ + Machine Learning Engineer - Short term intern
+ {$re?.experience[3].name}
+ Apr 2024 - Apr 2024 +
+
+
+ + Assistant - Short term intern
+ {$re?.experience[4].name}
+ Oct 2020 - Oct 2020 +
+
+
+
+ + diff --git a/src/routes/cv/comps/IconAndText.svelte b/src/routes/cv/comps/IconAndText.svelte new file mode 100644 index 0000000..315a2a5 --- /dev/null +++ b/src/routes/cv/comps/IconAndText.svelte @@ -0,0 +1,44 @@ + + +
+ {imageCaption} +
+ + + +
+
+ + diff --git a/src/routes/cv/comps/IconAndText2.svelte b/src/routes/cv/comps/IconAndText2.svelte new file mode 100644 index 0000000..77ca4f1 --- /dev/null +++ b/src/routes/cv/comps/IconAndText2.svelte @@ -0,0 +1,29 @@ + + +
+
+ {imageCaption} +
+
+ + + +
+
diff --git a/src/routes/cv/comps/LeftTopDecor.svelte b/src/routes/cv/comps/LeftTopDecor.svelte new file mode 100644 index 0000000..72f5d36 --- /dev/null +++ b/src/routes/cv/comps/LeftTopDecor.svelte @@ -0,0 +1,75 @@ + + +
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/src/routes/cv/comps/LinkToSource.svelte b/src/routes/cv/comps/LinkToSource.svelte new file mode 100644 index 0000000..f3022b1 --- /dev/null +++ b/src/routes/cv/comps/LinkToSource.svelte @@ -0,0 +1,50 @@ + + +
+
+
+
+ This CV was made using html, css and SvelteKit logo +
+ Sources: + CV source code + and + My Website +
+
+
+ + diff --git a/src/routes/cv/comps/LinkedInQR.svelte b/src/routes/cv/comps/LinkedInQR.svelte new file mode 100644 index 0000000..2b72a66 --- /dev/null +++ b/src/routes/cv/comps/LinkedInQR.svelte @@ -0,0 +1,105 @@ + + +
+
LinkedIn
+
+ {#await htmlPromise} + Loading… + {:then html} + {@html html} + {:catch err} + {err.message} + {/await} +
+
+ + diff --git a/src/routes/cv/comps/NameAndImage.svelte b/src/routes/cv/comps/NameAndImage.svelte new file mode 100644 index 0000000..e8fcaed --- /dev/null +++ b/src/routes/cv/comps/NameAndImage.svelte @@ -0,0 +1,24 @@ + + +
+ +
+ Selfie +
+
+ + diff --git a/src/routes/cv/comps/NamePlate.svelte b/src/routes/cv/comps/NamePlate.svelte new file mode 100644 index 0000000..8fdd64d --- /dev/null +++ b/src/routes/cv/comps/NamePlate.svelte @@ -0,0 +1,21 @@ + + +
+ + {$re?.name ?? "BOTAlex"}
+ (He/Him) +
+
+ + diff --git a/src/routes/cv/comps/OtherContact.svelte b/src/routes/cv/comps/OtherContact.svelte new file mode 100644 index 0000000..db519e9 --- /dev/null +++ b/src/routes/cv/comps/OtherContact.svelte @@ -0,0 +1,75 @@ + + +
+
+ Other +
+
+ +
+
Github
+ @MagicBOTAlex +
+
+
+ + diff --git a/src/routes/cv/comps/Profile.svelte b/src/routes/cv/comps/Profile.svelte new file mode 100644 index 0000000..735f928 --- /dev/null +++ b/src/routes/cv/comps/Profile.svelte @@ -0,0 +1,37 @@ +
+
+ About me +
+ I know the languages listed above in the decor! +
+
+ + I love learning on my own. I've placed my education at the bottom of my CV. + This is because everything I've learnt is on my own, and I refuse to give + too much credit to my education. I encurage you to checkout which Open-source + projects I've worked on, on my + github. +
+
+ Other than my github, I've listed some projects highlighted below. :) +
+
+ + diff --git a/src/routes/cv/comps/RepeatedSkills.svelte b/src/routes/cv/comps/RepeatedSkills.svelte new file mode 100644 index 0000000..acc7e7e --- /dev/null +++ b/src/routes/cv/comps/RepeatedSkills.svelte @@ -0,0 +1,62 @@ + + +
+ {#each { length: targetTextHeight } as _, i} + + {GrabRandomString()} + + {/each} +
+ + \ No newline at end of file diff --git a/src/routes/cv/comps/ShortProfile.svelte b/src/routes/cv/comps/ShortProfile.svelte new file mode 100644 index 0000000..e979cb3 --- /dev/null +++ b/src/routes/cv/comps/ShortProfile.svelte @@ -0,0 +1,32 @@ + + +
+
+ Short profile +
+
+ ◾ Full-stack at {$re?.shortProfileHiddenContent[0] ?? "Deprived devs"} +
+ ◾ "AI and data" at {$re?.shortProfileHiddenContent[1] ?? "some uni"}. +
+ ◾ Working at {$re?.shortProfileHiddenContent[2] ?? "somewhere"}
+ ◾ Volunteer at {$re?.shortProfileHiddenContent[3] ?? "Deprived devs"}. +
+
+ + diff --git a/src/routes/cv/comps/TableOfProjects.svelte b/src/routes/cv/comps/TableOfProjects.svelte new file mode 100644 index 0000000..b2f470d --- /dev/null +++ b/src/routes/cv/comps/TableOfProjects.svelte @@ -0,0 +1,88 @@ +
+
+ + List of big projects + +
+ It is likely I'm working on something new, as you're reading this. +
+ Contact me if you're curious! :D +
+
+
+
+
Computer vision
+
Implimented YoloV1 from scratch. (object detection)
+
+
+
Arduino
+
Built my own claw machine from scratch.
+
+
+
App dev
+
Made an Doulingo'ish app for learning chinese.
+
+
+
Open-source
+
I contribute often to Open-source
+
+
+
PCB designing
+
I am currently designing my own circuit board
+
+
+
+ + diff --git a/src/routes/tools/+page.svelte b/src/routes/tools/+page.svelte deleted file mode 100644 index 10a50c6..0000000 --- a/src/routes/tools/+page.svelte +++ /dev/null @@ -1,53 +0,0 @@ - - -
- -
-

Tools (NOT FINISHED. come back in the future.)

- These are the tools collected from different places of the - internet - - -
- -
-

MPUs/SoCs

- Whatever acronym you want lol -
- - -
-
- -
- I if you have tool suggestions, then either create an issue, create a pull request, or send an email. I probably wont add it though, since this is free work lol. -
-
-
-
diff --git a/src/routes/zhen/cv/CompsRev3/LinkToSource.svelte b/src/routes/zhen/cv/CompsRev3/LinkToSource.svelte deleted file mode 100644 index 0a29a79..0000000 --- a/src/routes/zhen/cv/CompsRev3/LinkToSource.svelte +++ /dev/null @@ -1,76 +0,0 @@ - - -
-
-
-
- This CV was made using html, css and SvelteKit logo -
- Sources: - CV source code - and - My Website -
-
-
- - diff --git a/src/ts/EnvHandler.ts b/src/ts/EnvHandler.ts new file mode 100644 index 0000000..80844cf --- /dev/null +++ b/src/ts/EnvHandler.ts @@ -0,0 +1,54 @@ +// used to deal with .env things, but with this instead because nix +// Drafted manually, then fed through chatgpt +// Idk what is going on anymore, but it isn't really an important aspect of the code, since this is just for changing from productiong to dev environment + +type Env = { [K in keyof typeof env]: (typeof env)[K] } & Record< + string, + unknown +>; + +export let env = { + POCKETBASE_URL: "https://pocket.deprived.dev", +} as const; +export default env; + +let initialized = false; + +// Load overrides from localstorage or url params +const isOverride = (k: string) => k.startsWith("-E"); +const norm = (k: string) => k.slice(2); // strip "-E" + +function apply(from: Record, tag: string) { + for (const [rawK, rawV] of Object.entries(from)) { + env[rawK] = rawV; + } +} + +export function initEnv(): void { + if (initialized) return; + initialized = true; + window.env = env!; + + // localStorage overrides: only keys starting with "-E" + const ls: Record = {}; + for (const [k, v] of Object.entries(env)) { + const val = localStorage.getItem(k); + if (val != null) ls[k] = val; + } + apply(ls, "localStorage"); + + // URL param overrides: ?-EKEY=value + const params = new URLSearchParams(location.search); + const url: Record = {}; + for (const [k, v] of params.entries()) url[k] = v; + apply(url, "url"); + + // (optional) persist URL overrides in localStorage with the "-E" prefix + for (const [k, v] of Object.entries(url)) { + if (isOverride(k)) localStorage.setItem(norm(k), String(v)); + } + + // Object.assign(env as any, current); + // for (const [k, v] of Object.entries(env)) + // console.log(`[env final] ${k}=${String(v)}`); +} diff --git a/src/ts/Helper.ts b/src/ts/Helper.ts index c248011..d582b1a 100644 --- a/src/ts/Helper.ts +++ b/src/ts/Helper.ts @@ -1,4 +1,4 @@ -import { PUBLIC_URL_BASE } from "$env/static/public"; +const PUBLIC_URL_BASE = "https://deprived.dev/"; // Absolute vibe coded. Idk if it works or not. Not important anyways // Assumes PUBLIC_URL_BASE is something like "https://deprived.dev" diff --git a/src/ts/Redaction/Profile.ts b/src/ts/Redaction/Profile.ts new file mode 100644 index 0000000..3a845ad --- /dev/null +++ b/src/ts/Redaction/Profile.ts @@ -0,0 +1,57 @@ +// npm i zod +import { z } from "zod"; + +const Link = z.object({ + imageId: z.string().min(1).optional(), + text: z.string().min(1), + link: z.string().url(), +}); + +const Experience = z.object({ + imageId: z.string().min(1), + name: z.string().min(1), + date: z.string().min(1), +}); + +const EducationLoose = z.object({ + imageId: z.string().min(1).optional(), + name: z.string().min(1).optional(), +}); + +const CV = z.object({ + sourceLink: z.string().url().min(1), +}); + +const ProfileSchema = z.object({ + name: z.string().min(1), + nick: z.string().min(1), + shortProfileHiddenContent: z.array(z.string()), + email: z.string().email(), + phone: z.string().min(1), + linkedIn: Link, + itch: Link, + cv: CV, + experience: z.array(Experience), + education: z + .array(EducationLoose) + .transform((arr) => + arr.filter( + (e): e is { imageId: string; name: string } => !!e.imageId && !!e.name, + ), + ), +}); + +export type LinkT = z.infer; +export type ExperienceT = z.infer; +export type EducationT = { imageId: string; name: string }; +export type Profile = Omit, "education"> & { + education: EducationT[]; +}; + +export function parseProfile(json: unknown): Profile { + return ProfileSchema.parse(json); +} + +// --- usage --- +// const raw = JSON.parse(yourJsonString); +// const profile = parseProfile(raw); diff --git a/src/ts/Redaction/Redactor.ts b/src/ts/Redaction/Redactor.ts new file mode 100644 index 0000000..2a2aa8b --- /dev/null +++ b/src/ts/Redaction/Redactor.ts @@ -0,0 +1,71 @@ +// redactor.ts +import { parseProfile, type Profile } from "./Profile"; +import env, { initEnv } from "@ts/EnvHandler"; +import type { Readable, Subscriber, Unsubscriber } from "svelte/store"; + +class Redactor implements Readable { + public unredactedProfile: Profile | undefined = undefined; + public wrongKey: boolean | undefined = undefined; + + private subs = new Set>(); + subscribe(run: Subscriber): Unsubscriber { + this.subs.add(run); + run(this.unredactedProfile); + return () => this.subs.delete(run); + } + private notify() { + this.subs.forEach((s) => s(this.unredactedProfile)); + } + + async TryGetUnredacter(): Promise { + if (this.unredactedProfile) return this.unredactedProfile; + + const storedKey = localStorage.getItem("key"); + if (!storedKey) throw new Error("Missing key"); + + const hashResJson = await ( + await fetch("https://api.deprived.dev/unredact", { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ key: storedKey }), + }) + ).json(); + + const unredactHash = hashResJson.response; + initEnv(); + if (unredactHash == "nawh") { + console.log("Wrong key, keeping info about alex secret"); + return "Wrong key"; + } + + const url = `${env.POCKETBASE_URL}/api/collections/redacted_content/records/${unredactHash}`; + + const res = await fetch(url, { + method: "GET", + headers: { Accept: "application/json" }, + }); + if (!res.ok) throw new Error(`HTTP ${res.status}`); + + let data = await res.json(); + const replaced = JSON.parse( + JSON.stringify(data).replaceAll("[PB]", env.POCKETBASE_URL), + ); + this.unredactedProfile = parseProfile(replaced.json); + this.notify(); // <-- tell Svelte to update + return "success"; + } + + t(path: string, fallback: string): string { + try { + const src = this.unredactedProfile as Record | undefined; + if (!src) return fallback; + const v = path.split(".").reduce((o, k) => (o as any)?.[k], src); + return (v ?? "") !== "" ? String(v) : fallback; + } catch { + return fallback; + } + } +} + +export const re = new Redactor(); +export default re; diff --git a/src/ts/api/api.ts b/src/ts/api/api.ts index 446ee42..34b95d4 100644 --- a/src/ts/api/api.ts +++ b/src/ts/api/api.ts @@ -2,8 +2,8 @@ // It is meant to be called from stores.ts import PocketBase from "pocketbase"; -import { ShopItem } from "./classes/ShopItem"; -import { PUBLIC_POCKET_URL, PUBLIC_URL_BASE } from "$env/static/public"; +import ShopItem from "./classes/ShopItem"; +const PUBLIC_POCKET_URL = "https://pocket.deprived.dev/"; export let pb = new PocketBase(PUBLIC_POCKET_URL); diff --git a/src/ts/api/classes/ShopItem.ts b/src/ts/api/classes/ShopItem.ts index 0ca3b6b..3480ab5 100644 --- a/src/ts/api/classes/ShopItem.ts +++ b/src/ts/api/classes/ShopItem.ts @@ -1,4 +1,3 @@ -import { PUBLIC_POCKET_URL, PUBLIC_URL_BASE } from "$env/static/public"; import { ParseAssetUrl } from "@src/ts/Helper"; export class ShopItem { @@ -48,3 +47,5 @@ export class ShopItem { ); } } + +export default ShopItem; diff --git a/svelte.config.js b/svelte.config.js index 5289fde..afaa0ea 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -1,27 +1,27 @@ -import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; -import adapter from '@sveltejs/adapter-static'; +import vitePreprocess from "./src/optimizers/viteThing.js"; +import adapter from "@sveltejs/adapter-static"; /** @type {import('@sveltejs/kit').Config} */ export default { - preprocess: vitePreprocess(), - onwarn: (warning, handler) => { - if (warning.code.startsWith('a11y-')) return - if (warning.code === 'missing-exports-condition') return - if (warning.code === 'a11y-no-static-element-interactions') return - if (warning.code === 'svelte-ignore a11y-autofocus') return - if (warning.code.startsWith('css-unused-selector')) return - handler(warning) - }, - kit: { - prerender: { - handleHttpError: 'fail' - }, - adapter: adapter({ - pages: 'build', - assets: 'build', - fallback: undefined, - precompress: false, - strict: true - }) - } + preprocess: vitePreprocess(), + onwarn: (warning, handler) => { + if (warning.code.startsWith("a11y-")) return; + if (warning.code === "missing-exports-condition") return; + if (warning.code === "a11y-no-static-element-interactions") return; + if (warning.code === "svelte-ignore a11y-autofocus") return; + if (warning.code.startsWith("css-unused-selector")) return; + handler(warning); + }, + kit: { + prerender: { + handleHttpError: "fail", + }, + adapter: adapter({ + pages: "build", + assets: "build", + fallback: undefined, + precompress: false, + strict: true, + }), + }, }; diff --git a/vite.config.js b/vite.config.js index a90f8dd..8cd8521 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,6 +1,5 @@ import tailwindcss from "@tailwindcss/vite"; -import { sveltekit } from "@sveltejs/kit/vite"; -import { defineConfig } from "vite"; +import sveltekit from "./src/optimizers/sveltekit.ts"; import path from "path"; const buildTime = new Intl.DateTimeFormat("da-DK", { @@ -13,7 +12,7 @@ const buildTime = new Intl.DateTimeFormat("da-DK", { timeZone: "Europe/Copenhagen", }).format(new Date()); -export default defineConfig({ +export default { plugins: [tailwindcss(), sveltekit()], define: { __BUILD_TIME__: JSON.stringify(buildTime), @@ -27,9 +26,10 @@ export default defineConfig({ "@ts": path.resolve("./src/ts"), "@shop": path.resolve("./src/pages/shop"), "@stores": path.resolve("./src/ts/store.ts"), + "@e": path.resolve("./src/optimizers"), }, }, server: { allowedHosts: ["development2.deprived.dev"], }, -}); +};