From 3da666aa029e0da215431c72346d6be7b773a032 Mon Sep 17 00:00:00 2001 From: Sangelo Date: Mon, 8 Jul 2024 10:45:36 +0200 Subject: [PATCH 1/2] [a] countdown page additions --- static/internal/countdown/index.html | 29 +++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/static/internal/countdown/index.html b/static/internal/countdown/index.html index 6f004fb..177334b 100644 --- a/static/internal/countdown/index.html +++ b/static/internal/countdown/index.html @@ -1,10 +1,14 @@ @@ -46,6 +50,7 @@ const countdownElement = document.getElementById("countdown"); const countdownDate = getDateFromUrl(); + const showCurrentTime = getTimeFromUrl(); function updateCountdown() { const now = new Date().getTime(); @@ -71,6 +76,16 @@ requestAnimationFrame(updateCountdown); } + function updateTime() { + const now = new Date(); + const hours = formatWithLeadingZeros(now.getHours(), 2); + const minutes = formatWithLeadingZeros(now.getMinutes(), 2); + const seconds = formatWithLeadingZeros(now.getSeconds(), 2); + + countdownElement.innerHTML = `${hours}:${minutes}:${seconds}`; + requestAnimationFrame(updateTime); + } + function getDateFromUrl() { const urlParams = new URLSearchParams(window.location.search); const dateParam = urlParams.get('date'); @@ -83,8 +98,16 @@ return new Date("1970-01-01T00:00:00").getTime(); } - requestAnimationFrame(updateCountdown); + function getTimeFromUrl() { + const urlParams = new URLSearchParams(window.location.search); + return urlParams.has('time'); + } + + if (showCurrentTime) { + requestAnimationFrame(updateTime); + } else { + requestAnimationFrame(updateCountdown); + } - From 18dbba03a6b12b96e49fa2035d696de633ac3e6f Mon Sep 17 00:00:00 2001 From: Sangelo Date: Mon, 8 Jul 2024 10:52:02 +0200 Subject: [PATCH 2/2] Revert parts of "[c+a] better accessibility + HomeButton component" This reverts commit 7308de8728509d3849f3a596025fe9c82d3ec560. Will revisit later. --- src/app.html | 3 +- src/lib/components/About.svelte | 36 +++++++++- src/lib/components/Home.svelte | 3 +- src/lib/components/Modal.svelte | 3 +- src/lib/components/Projects.svelte | 60 +++++++++++++---- src/lib/components/Socials.svelte | 37 ++++++++++- src/lib/components/elements/HomeButton.svelte | 66 ------------------- src/styles/socials.scss | 6 ++ 8 files changed, 123 insertions(+), 91 deletions(-) delete mode 100644 src/lib/components/elements/HomeButton.svelte diff --git a/src/app.html b/src/app.html index cbabff7..6784559 100644 --- a/src/app.html +++ b/src/app.html @@ -6,13 +6,12 @@ - - + diff --git a/src/lib/components/About.svelte b/src/lib/components/About.svelte index ff5201b..8a819e9 100644 --- a/src/lib/components/About.svelte +++ b/src/lib/components/About.svelte @@ -1,10 +1,42 @@
- +

About me

diff --git a/src/lib/components/Home.svelte b/src/lib/components/Home.svelte index f39af8e..63aebb6 100644 --- a/src/lib/components/Home.svelte +++ b/src/lib/components/Home.svelte @@ -24,7 +24,7 @@ style="mask-type: alpha" maskUnits="userSpaceOnUse" x="27" - y="0" + y="0"t width="90" height="145" > @@ -51,7 +51,6 @@ on:click={()=> smoothScrollTo('about')} on:keydown={handleKeydown} role="button" - aria-label="Scroll down for more" tabindex=0 > diff --git a/src/lib/components/Modal.svelte b/src/lib/components/Modal.svelte index 50e08fb..91c1e33 100644 --- a/src/lib/components/Modal.svelte +++ b/src/lib/components/Modal.svelte @@ -50,10 +50,9 @@ out:fly={{ y: 200, duration: 300 }} > {#if contentComponent} - + {:else} -


No content provided

{/if}
diff --git a/src/lib/components/Projects.svelte b/src/lib/components/Projects.svelte index fc2296e..66e5b5b 100644 --- a/src/lib/components/Projects.svelte +++ b/src/lib/components/Projects.svelte @@ -1,6 +1,6 @@ - - - -{#if page === 'about'} - -{/if} - -{#if page === 'projects'} - -{/if} - -{#if page === 'socials'} - -{/if} diff --git a/src/styles/socials.scss b/src/styles/socials.scss index e536488..07c6c0a 100644 --- a/src/styles/socials.scss +++ b/src/styles/socials.scss @@ -164,6 +164,12 @@ footer { margin: 2em; + svg.logo { + height: 3em; + width: 3em; + cursor: pointer; + } + .footer { font-size: 18px; }