cv personlisable now
All checks were successful
Rebuild signaller for deprived.dev to rebuild site / Rebuild Signaller (push) Successful in 34s

This commit is contained in:
BOTAlex 2026-03-31 04:20:38 +02:00
parent 790e400c06
commit 70073ae0b4
2 changed files with 87 additions and 26 deletions

View file

@ -3,6 +3,8 @@
import * as m from "$paraglide/messages"; import * as m from "$paraglide/messages";
import { getLocale, setLocale, locales } from "$paraglide/runtime"; import { getLocale, setLocale, locales } from "$paraglide/runtime";
import SendHorizontal from "@lucide/svelte/icons/send-horizontal";
// Left side // Left side
import NameAndImage from "./comps/NameAndImage.svelte"; import NameAndImage from "./comps/NameAndImage.svelte";
import ShortProfile from "./comps/ShortProfile.svelte"; import ShortProfile from "./comps/ShortProfile.svelte";
@ -50,6 +52,23 @@
debug = params.has("debug"); debug = params.has("debug");
}); });
let moticationInput: HTMLInputElement;
function loadMotivation() {
const motivation = localStorage.getItem("motivation");
if (!motivation) return;
moticationInput.value = motivation;
}
function submitMotivation() {
console.log(moticationInput.value);
if (!moticationInput.value) {
localStorage.removeItem("motivation");
} else {
localStorage.setItem("motivation", moticationInput.value);
}
window.location.reload();
}
function getFormattedDate(): string { function getFormattedDate(): string {
const date = new Date(); const date = new Date();
const day = String(date.getDate()).padStart(2, "0"); const day = String(date.getDate()).padStart(2, "0");
@ -73,6 +92,8 @@
<meta content="#bdd6ee" data-react-helmet="true" name="theme-color" /> <meta content="#bdd6ee" data-react-helmet="true" name="theme-color" />
<div class="cv-info-container flex flex-col w-full h-full hide-on-print"> <div class="cv-info-container flex flex-col w-full h-full hide-on-print">
<div class="flex w-full h-full items-center justify-center gap-8">
<div class=" flex flex-col">
<div> <div>
<div class="keyboard-key">P</div> <div class="keyboard-key">P</div>
+ +
@ -95,6 +116,33 @@
{/each} {/each}
</div> </div>
</div> </div>
<div class="flex flex-col">
<div>Insert motivation</div>
<form
onsubmit={(e) => {
e.preventDefault();
submitMotivation();
}}
class="join"
>
<input
bind:this={moticationInput}
class="join-item input input-outline input-xs"
type="text"
placeholder="Type something..."
/>
<button type="submit" class="btn btn-xs join-item">
<SendHorizontal />
</button>
</form>
</div>
</div>
</div>
<!-- space -->
<!-- space -->
<!-- space -->
<!-- space -->
<div class="w-full h-full flex flex-col justify-center overflow-hidden"> <div class="w-full h-full flex flex-col justify-center overflow-hidden">
<div <div
class="relative w-full flex justify-center {$re?.name ? 'hidden' : ''}" class="relative w-full flex justify-center {$re?.name ? 'hidden' : ''}"

View file

@ -1,9 +1,17 @@
<script lang="ts"> <script lang="ts">
import * as m from "$paraglide/messages"; import * as m from "$paraglide/messages";
import { onMount } from "svelte";
let motivation: string | null = "";
onMount(() => {
motivation = localStorage.getItem("motivation");
});
</script> </script>
<div class="short-profile-container"> <div class="short-profile-container">
<div class="flex gap-1"> <div class="flex gap-1">
{#if motivation}
<b style="text-align:left;">Motivation</b>
{:else}
<b style="text-align:left;">{m["zhen.cv.flex.title"]()}</b> <b style="text-align:left;">{m["zhen.cv.flex.title"]()}</b>
<h1 <h1
style="font-size: 0.5rem; color: grey;" style="font-size: 0.5rem; color: grey;"
@ -11,9 +19,14 @@
> >
{m["zhen.cv.flex.tooltip"]()} {m["zhen.cv.flex.tooltip"]()}
</h1> </h1>
{/if}
</div> </div>
<div class="text-[0.85rem] text-left"> <div class="text-[0.85rem] text-left">
{#if motivation}
<div>{motivation}</div>
{:else}
{@html m["zhen.cv.flex.body"]()} {@html m["zhen.cv.flex.body"]()}
{/if}
</div> </div>
</div> </div>