From 5bf543e0f713fe9dd13e8e8a70373a23e2aba850 Mon Sep 17 00:00:00 2001 From: simon-ec Date: Thu, 23 Apr 2026 19:52:31 -0400 Subject: added easter egg :-) --- css/layout.css | 10 ++++++++++ index.html | 8 ++++---- js/fun.js | 31 +++++++++++++++++++++++++++++++ more.html | 3 ++- projects.html | 3 ++- template.html | 3 ++- testimonials.html | 4 ++-- 7 files changed, 53 insertions(+), 9 deletions(-) create mode 100644 js/fun.js diff --git a/css/layout.css b/css/layout.css index f5c7bee..5b39c89 100644 --- a/css/layout.css +++ b/css/layout.css @@ -124,6 +124,16 @@ footer { align-items: flex-end; } +#fun:hover { + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + /** "SKIP LINK" FOR ACCESSIBILITY / SCREEN READERS */ .skipLink { position: absolute; diff --git a/index.html b/index.html index e58b0e2..34b3902 100644 --- a/index.html +++ b/index.html @@ -15,7 +15,7 @@ #brief-introduction { margin: 7.5rem 0; } - + /************************************************ * DESKTOP RULES */ @@ -26,8 +26,8 @@ * MOBILE RULES */ @media screen and (max-width: 850px) { - } + @@ -72,14 +72,14 @@ + - diff --git a/js/fun.js b/js/fun.js new file mode 100644 index 0000000..151de3a --- /dev/null +++ b/js/fun.js @@ -0,0 +1,31 @@ +window.addEventListener("load", (e) => { + const el = document.getElementById("fun"); + + el.addEventListener("mouseover", (e) => { + hovering = true; + this.cycle(e); + }); + + el.addEventListener("mouseleave", (e) => { + hovering = false; + }); + + el.addEventListener("click", (e) => { + const current = e.target.innerText; + e.target.innerText = current + " " + current[current.length-1]; + }); +}); + +let hovering = false; +async function cycle(e) { + while(hovering) { + const current = e.target.innerText; + if (current[current.length-1] == "/") { + e.target.innerText = current.replace("/", "\\");; + } + else { + e.target.innerText = current.replace("\\", "/");; + } + await new Promise(r => setTimeout(r, 50)); + } +} diff --git a/more.html b/more.html index d5a9ba0..06d879a 100644 --- a/more.html +++ b/more.html @@ -130,11 +130,12 @@ + diff --git a/projects.html b/projects.html index 44f40ab..6fbdb60 100644 --- a/projects.html +++ b/projects.html @@ -70,7 +70,7 @@ @@ -123,6 +123,7 @@ + diff --git a/template.html b/template.html index 892eb9c..a1c111b 100644 --- a/template.html +++ b/template.html @@ -64,11 +64,12 @@ + diff --git a/testimonials.html b/testimonials.html index 84a110c..de6392e 100644 --- a/testimonials.html +++ b/testimonials.html @@ -83,7 +83,7 @@ @@ -129,9 +129,9 @@ `); } } - + -- cgit v1.3.1-4-g156e