From 07295609dafb9ce9986624b2904a9511d39a73b2 Mon Sep 17 00:00:00 2001 From: Colton Blake Date: Sun, 14 May 2017 13:25:05 -0400 Subject: [PATCH 1/3] Adjusted button positioning --- main.css | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/main.css b/main.css index c662fee..3761d10 100644 --- a/main.css +++ b/main.css @@ -69,6 +69,22 @@ html, body cursor: pointer; } +@keyFrames vanish +{ + 0% { + opacity: 1; + } + 100% { + opacity: 0; + } +} + +.vanish +{ + animation-duration: 1s; + animation-name: vanish; +} + .retry { position: relative; @@ -304,11 +320,16 @@ html, body padding: 5px; } -#dateSelection +#dateSelection, #displaySelection { display: flex; } +#dateSelection +{ + margin-top: 5px; +} + button { background-color: #fff; @@ -318,11 +339,6 @@ button padding: 5px 5px; } -#dateSelection:first-child -{ - margin-left: 1px; -} - button:hover { background-color: #eee; From 39be931feef08b740faa60b6714a55f963ed4a2d Mon Sep 17 00:00:00 2001 From: Colton Blake Date: Sun, 14 May 2017 13:28:55 -0400 Subject: [PATCH 2/3] Removed vanish css (for PR) --- main.css | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/main.css b/main.css index 3761d10..8d88544 100644 --- a/main.css +++ b/main.css @@ -69,22 +69,6 @@ html, body cursor: pointer; } -@keyFrames vanish -{ - 0% { - opacity: 1; - } - 100% { - opacity: 0; - } -} - -.vanish -{ - animation-duration: 1s; - animation-name: vanish; -} - .retry { position: relative; From 037f9d527e6ef5fbbe7ff5489a35675ba5b3c73a Mon Sep 17 00:00:00 2001 From: Colton Blake Date: Sun, 14 May 2017 13:39:44 -0400 Subject: [PATCH 3/3] Added notification animation --- main.css | 16 ++++++++++++++++ map.js | 13 ++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/main.css b/main.css index 8d88544..3761d10 100644 --- a/main.css +++ b/main.css @@ -69,6 +69,22 @@ html, body cursor: pointer; } +@keyFrames vanish +{ + 0% { + opacity: 1; + } + 100% { + opacity: 0; + } +} + +.vanish +{ + animation-duration: 1s; + animation-name: vanish; +} + .retry { position: relative; diff --git a/map.js b/map.js index 4b8a8cf..cb57f58 100644 --- a/map.js +++ b/map.js @@ -268,7 +268,7 @@ closeButton.className = "close"; closeButton.innerHTML = "x"; closeButton.addEventListener("click", function() { - box.style.display = "none"; + vanish(); }); box.appendChild(closeButton); @@ -282,6 +282,17 @@ box.appendChild(customDiv); } + function vanish() { + box.classList.add("vanish"); + setTimeout(function() { + if (box.classList.contains("vanish")) { + box.style.display = "none"; + } + }, 1000); + } + + setTimeout(vanish, 7000); + const topNotification = notificationArea.firstChild; notificationArea.insertBefore(box, topNotification); }