diff --git a/src/routes/cv/+page.svelte b/src/routes/cv/+page.svelte index 23554f0..44a0253 100644 --- a/src/routes/cv/+page.svelte +++ b/src/routes/cv/+page.svelte @@ -3,6 +3,8 @@ import * as m from "$paraglide/messages"; import { getLocale, setLocale, locales } from "$paraglide/runtime"; + import SendHorizontal from "@lucide/svelte/icons/send-horizontal"; + // Left side import NameAndImage from "./comps/NameAndImage.svelte"; import ShortProfile from "./comps/ShortProfile.svelte"; @@ -50,6 +52,23 @@ 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 { const date = new Date(); const day = String(date.getDate()).padStart(2, "0"); @@ -73,28 +92,57 @@
-
-
P
- + -
CTRL
- + Chrome = PDF -
-
- CV Languages: - {#each locales as tag} - + {/each} +
+
+
+
Insert motivation
+
{ + e.preventDefault(); + submitMotivation(); }} + class="join" > - {tag.toUpperCase()} - - {/each} + + +
+
+ + + + +
import * as m from "$paraglide/messages"; + import { onMount } from "svelte"; + let motivation: string | null = ""; + onMount(() => { + motivation = localStorage.getItem("motivation"); + });
- {m["zhen.cv.flex.title"]()} -

- {m["zhen.cv.flex.tooltip"]()} -

+ {#if motivation} + Motivation + {:else} + {m["zhen.cv.flex.title"]()} +

+ {m["zhen.cv.flex.tooltip"]()} +

+ {/if}
- {@html m["zhen.cv.flex.body"]()} + {#if motivation} +
{motivation}
+ {:else} + {@html m["zhen.cv.flex.body"]()} + {/if}