commit e9b1e23f5be13bf12ac680849a214bbd49e43e23
parent 753bced8870f080e7cbd8547f0cab3e6f6b4b23c
Author: tongong <tongong@gmx.net>
Date: Mon, 19 Aug 2019 20:11:36 +0200
second click on settings icon closes settings
Diffstat:
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/scripts/interface.js b/scripts/interface.js
@@ -27,7 +27,12 @@ function initIconAnimation() {
this.classList.remove("animated");
}, false);
settings.addEventListener("click", function() {
- document.getElementById("settings").classList.add("in");
+ var settings = document.getElementById("settings");
+ if (settings.classList.contains("in")) {
+ settings.classList.remove("in");
+ } else {
+ settings.classList.add("in");
+ }
}, false);
settings.addEventListener('touchstart', function() {
this.classList.add("animated");
diff --git a/styles.css b/styles.css
@@ -35,16 +35,16 @@
#settings {
margin: 10px;
z-index: 2;
- right: -400px;
+ right: -310px;
position: absolute;
top: 50px;
width: 300px;
height: 300px;
background-color: #000000;
border-radius: 20px;
- -webkit-transition: right 700ms ease-in;
- -moz-transition: right 700ms ease-in;
- transition: right 700ms ease-in;
+ -webkit-transition: right 500ms ease-in;
+ -moz-transition: right 500ms ease-in;
+ transition: right 500ms ease-in;
}
#settings.in {