From c237f0e86c52ed006cf334bbaa63758d9b1e8f6b Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Sat, 4 Nov 2023 19:55:56 -0700 Subject: [PATCH] Add hidden dot button within ASCII art --- index.html | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/index.html b/index.html index ad6cc51..a47f108 100644 --- a/index.html +++ b/index.html @@ -53,6 +53,30 @@ #ascii-container { font-family: monospace; font-size: clamp(1rem, 2.5dvi, 2rem); + position: relative; + } + + #ascii-container button { + font-family: inherit; + font-size: inherit; + position: absolute; + left: 17.5ch; + bottom: 0; + inline-size: 2ch; + block-size: 2ch; + border: none; + border-radius: 2ch; + padding: 0; + line-height: 0; + background: none; + transition: background-color 400ms; + } + + #ascii-container button:hover, + #ascii-container button:focus { + cursor: pointer; + background: hsl(216deg 90% 80% / 0.5); + transition: background-color 200ms; } @@ -129,6 +153,16 @@ requestAnimationFrame(step); } + // Add hidden effect + const button = document.createElement('button'); + button.addEventListener('click', e => { + // Placeholder until I can implement something cooler + e.target.textContent = '!'; + }); + setTimeout(() => { + asciiContainer.insertAdjacentElement('beforeend', button); + }, msPerFrame * totalFrames + 500); + // Inject obfuscated email. To block low-effort scraping. const addr = document.querySelector('address > a'); addr.href = atob('bWFpbHRvOmFyZGlzQGFyZGlzbHUuZGV2'); -- 2.47.3