From 0c70df91885907cdb4a884ac33f70c9d3ffecf22 Mon Sep 17 00:00:00 2001 From: Borja Date: Sat, 20 Sep 2025 21:31:48 +0200 Subject: [PATCH] Added proper counter representation --- index.html | 2 ++ index.js | 2 +- main.css | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 2e5b56c..8b117c0 100644 --- a/index.html +++ b/index.html @@ -1,6 +1,8 @@ + + Click me! diff --git a/index.js b/index.js index 3eb6d34..bf1a049 100644 --- a/index.js +++ b/index.js @@ -131,7 +131,7 @@ for (let fart of farts) { // TODO: change it to onmousedown (it stopped working after separating button and label) clickMe.onclick = () => { counter += 1; - popupText.innerText = counter; + popupText.innerText = counter + "🍑💨"; fireEvents(); }; diff --git a/main.css b/main.css index 442e2df..db9b560 100644 --- a/main.css +++ b/main.css @@ -23,9 +23,11 @@ height: 100px; } #popupText { + display: inline-block; + white-space: nowrap; position: absolute; left: 50%; top: 50%; - transform: translate(-50%, -50%); + transform: translate(-25%, -50%); font-size: 48px; }