cv personlisable now
All checks were successful
Rebuild signaller for deprived.dev to rebuild site / Rebuild Signaller (push) Successful in 35s
All checks were successful
Rebuild signaller for deprived.dev to rebuild site / Rebuild Signaller (push) Successful in 35s
This commit is contained in:
parent
70073ae0b4
commit
69349fa7e8
1 changed files with 21 additions and 16 deletions
|
|
@ -50,21 +50,27 @@
|
||||||
|
|
||||||
const params = new URLSearchParams(window.location.search);
|
const params = new URLSearchParams(window.location.search);
|
||||||
debug = params.has("debug");
|
debug = params.has("debug");
|
||||||
|
|
||||||
|
loadMotivation();
|
||||||
});
|
});
|
||||||
|
|
||||||
let moticationInput: HTMLInputElement;
|
let motivationInput: HTMLTextAreaElement;
|
||||||
|
let motivation: string | null = "";
|
||||||
function loadMotivation() {
|
function loadMotivation() {
|
||||||
const motivation = localStorage.getItem("motivation");
|
const content = localStorage.getItem("motivation");
|
||||||
if (!motivation) return;
|
if (content && motivationInput) {
|
||||||
|
motivationInput.value = content;
|
||||||
moticationInput.value = motivation;
|
motivation = content;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function submitMotivation() {
|
function submitMotivation() {
|
||||||
console.log(moticationInput.value);
|
if (!motivationInput) return;
|
||||||
if (!moticationInput.value) {
|
const content = motivationInput.value;
|
||||||
|
if (!content.trim()) {
|
||||||
localStorage.removeItem("motivation");
|
localStorage.removeItem("motivation");
|
||||||
} else {
|
} else {
|
||||||
localStorage.setItem("motivation", moticationInput.value);
|
localStorage.setItem("motivation", content);
|
||||||
}
|
}
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
}
|
}
|
||||||
|
|
@ -81,7 +87,8 @@
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<title
|
<title
|
||||||
>{$re?.name ?? "Alex"}'s {getLocale().toUpperCase()} CV {getFormattedDate()}</title
|
>{motivation ? "CUSTOM" : ""}
|
||||||
|
{$re?.name ?? "Alex"}'s {getLocale().toUpperCase()} CV {getFormattedDate()}</title
|
||||||
>
|
>
|
||||||
<meta content="{$re?.name ?? 'Alex'}'s CV" property="og:title" />
|
<meta content="{$re?.name ?? 'Alex'}'s CV" property="og:title" />
|
||||||
<meta
|
<meta
|
||||||
|
|
@ -91,7 +98,7 @@
|
||||||
<meta content={preveiwImage} property="og:image" />
|
<meta content={preveiwImage} property="og:image" />
|
||||||
<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 h-[4cm] flex flex-col w-full hide-on-print">
|
||||||
<div class="flex w-full h-full items-center justify-center gap-8">
|
<div class="flex w-full h-full items-center justify-center gap-8">
|
||||||
<div class=" flex flex-col">
|
<div class=" flex flex-col">
|
||||||
<div>
|
<div>
|
||||||
|
|
@ -125,12 +132,11 @@
|
||||||
}}
|
}}
|
||||||
class="join"
|
class="join"
|
||||||
>
|
>
|
||||||
<input
|
<textarea
|
||||||
bind:this={moticationInput}
|
bind:this={motivationInput}
|
||||||
class="join-item input input-outline input-xs"
|
class="join-item input-xs h-[3cm] w-[12cm] textarea textarea-outline resize-x"
|
||||||
type="text"
|
|
||||||
placeholder="Type something..."
|
placeholder="Type something..."
|
||||||
/>
|
></textarea>
|
||||||
<button type="submit" class="btn btn-xs join-item">
|
<button type="submit" class="btn btn-xs join-item">
|
||||||
<SendHorizontal />
|
<SendHorizontal />
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -297,7 +303,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.cv-info-container {
|
.cv-info-container {
|
||||||
height: 15mm;
|
|
||||||
background-color: #2b2a2a;
|
background-color: #2b2a2a;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue