From 6febf90fdb2521bb0a7796a324382f000383ba90 Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Sat, 23 Mar 2019 14:21:03 -0700 Subject: [PATCH] Wait to show about links until we know what they will be This ensures we don't have an experience where images flicker in at diffent times. --- demo/css/page.css | 6 +++++- demo/js/index.js | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/demo/css/page.css b/demo/css/page.css index 59402995..6fb3f080 100644 --- a/demo/css/page.css +++ b/demo/css/page.css @@ -25,10 +25,14 @@ body { /* Let users drag windows over this text */ z-index: -1; margin: 0; - display: flex; + display: none; flex-direction: row; } +.about.loaded { + display: flex; +} + .about a { display: flex; } diff --git a/demo/js/index.js b/demo/js/index.js index 1a60c8dd..3a0df8a5 100644 --- a/demo/js/index.js +++ b/demo/js/index.js @@ -113,14 +113,16 @@ window.addEventListener("beforeinstallprompt", e => { Raven.context(async () => { window.Raven = Raven; + const about = document.getElementsByClassName("about")[0]; if (screenshot) { - document.getElementsByClassName("about")[0].style.visibility = "hidden"; + about.style.visibility = "hidden"; } if (!WebampLazy.browserIsSupported()) { document.getElementById("browser-compatibility").style.display = "block"; document.getElementById("app").style.visibility = "hidden"; return; } + about.classList.add("loaded"); let __butterchurnOptions = null; let __initialWindowLayout = null;