From 65e20625a1ce95e2d68bddabe56c13ffabae9b86 Mon Sep 17 00:00:00 2001 From: Matthew Grove Date: Mon, 29 Aug 2022 17:31:17 +0100 Subject: [PATCH] Update cookie notice Adjust wording, remove unnecessary (and buggy) animations, and make more prominent --- src/App.js | 33 +-------------------------------- src/css/App.css | 3 +++ 2 files changed, 4 insertions(+), 32 deletions(-) diff --git a/src/App.js b/src/App.js index 34b6787..af94dc2 100644 --- a/src/App.js +++ b/src/App.js @@ -191,29 +191,6 @@ class App extends React.Component { iterations: 1, fill: "forwards", }); - this.root.animate({ - marginBottom: ["0px", `${this.cookieNoticeHeight}px`], - }, { - duration: 1000, - easing: "ease-in-out", - iterations: 1, - fill: "forwards", - }); - window.addEventListener('resize', this.updateCookieNoticeMargins); - } - } - - updateCookieNoticeMargins = () => { - if (this.cookieNoticeHeight !== this.cookieNotice.offsetHeight) { - this.cookieNoticeHeight = this.cookieNotice.offsetHeight; - this.root.animate({ - marginBottom: [`${this.root.marginBottom}px`, `${this.cookieNoticeHeight}px`], - }, { - duration: 500, - easing: "ease-in-out", - iterations: 1, - fill: "forwards", - }); } } @@ -261,14 +238,6 @@ class App extends React.Component { iterations: 1, fill: "forwards", }); - this.root.animate({ - marginBottom: [`${this.cookieNoticeHeight}px`, "0px"], - }, { - duration: 1000, - easing: "ease-in-out", - iterations: 1, - fill: "forwards", - }); setTimeout(() => this.cookieNotice.style.display = "none", 1000); this.cookies.set("parandum-cookies-accepted", "true", { maxAge: 31556952, @@ -367,7 +336,7 @@ class App extends React.Component { }