Summary Files Commits Branches @commit @diff @stats
path: root / src
diff options
context:
space:
mode:
Commita3b5ec81e60a3185d6426c2b33b5dae2b5866b45 (patch)
Author
 Syndamia <kamen@syndamia.com>
2025-12-25 18:14:17 +0200
Committer
 Syndamia <kamen@syndamia.com>
2025-12-25 18:14:17 +0200
Filesc9def39ebbc67e8481ba988115beeb2a8d77d4b6 /src
syndamia.com-a3b5ec81e60a3185d6426c2b33b5dae2b5866b45.tar
syndamia.com-a3b5ec81e60a3185d6426c2b33b5dae2b5866b45.tar.gz
syndamia.com-a3b5ec81e60a3185d6426c2b33b5dae2b5866b45.zip
Parent2d0859936833ea72aad40bd7165e96a792ca5a49 (diff)
feat(snow): Improve implementation
- Simplify css - Remove erronious semicolumns (which aren't a problem in firefox, but are in chrome) - Fix bad button functionality of no storage property is set
2 files changed, 12 insertions, 14 deletions
-rw-r--r--src/scripts/snow.js10
-rw-r--r--src/styles.css16
diff --git a/src/scripts/snow.js b/src/scripts/snow.js
index a7eca9a..54d581b 100644
--- a/src/scripts/snow.js
+++ b/src/scripts/snow.js
@@ -24,13 +24,13 @@ if (enableSnow) {
snowBtn.onclick = function() {
snowCont.classList.toggle('noSnow');
- if (localStorage.getItem('snow') !== 'on') {
- localStorage.setItem('snow', 'on');
- snowEnabledLabel.innerText = 'Remove';
+ if (localStorage.getItem('snow') !== 'off') {
+ localStorage.setItem('snow', 'off');
+ snowEnabledLabel.innerText = 'Add';
}
else {
- snowEnabledLabel.innerText = 'Add';
- localStorage.setItem('snow', 'off');
+ localStorage.setItem('snow', 'on');
+ snowEnabledLabel.innerText = 'Remove';
}
}
}
diff --git a/src/styles.css b/src/styles.css
index ea758c6..01772ae 100644
--- a/src/styles.css
+++ b/src/styles.css
@@ -551,15 +551,15 @@ td:empty { height: 1em; }
.snowflake {
pointer-events: none;
-
position: fixed;
- border: 1px solid white;
+
+ width: 2px;
+ height: 2px;
+ background-color: white;
box-shadow: 1px 1px 2px black;
- width: 0;
- height: 0;
+ top: -3vh;
- top: -20vh;
animation:
70s linear 0s infinite snowfall,
10s ease-in-out 0s infinite alternate snowsway;
@@ -567,13 +567,11 @@ td:empty { height: 1em; }
@keyframes snowfall {
from {
- display: initial;
top: -3vh;
- };
+ }
to {
- display: initial;
top: 101vh;
- };
+ }
}
@keyframes snowsway {