From 16e80eb82415455a6519abc87bcff872bb56614d Mon Sep 17 00:00:00 2001 From: Katie Spivakovsky <kspivakovsky@gmail.com> Date: Thu, 10 Aug 2023 14:35:06 -0400 Subject: [PATCH] home animation --- static/scripts/functions.js | 4 ++-- static/style.css | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/static/scripts/functions.js b/static/scripts/functions.js index 318dffc..4d61441 100644 --- a/static/scripts/functions.js +++ b/static/scripts/functions.js @@ -71,7 +71,7 @@ function countTo(start, end, element, withPercent, intervalLength){ /* HOME PAGE */ if (window.location.href.endsWith("mit/") || window.location.href.indexOf("index") > -1) { - document.querySelector('#home-header-container').style.height = '50vh' + document.querySelector('#home-header-container').style.height = `{document.querySelector('#home-header-container').clientHeight + 120 + document.querySelector('#home-lead').clientHeight}` document.querySelector('#home-header').style.font_size = 'calc(2.5*(1.475rem + 2.7vw))' document.querySelector('#home-lead').style.color = '#fff' @@ -80,7 +80,7 @@ if (window.location.href.endsWith("mit/") || window.location.href.indexOf("index let countToPercentPatients = countTo(0, 80, 'percent_patients', true, 10) let countToPercentDeaths = countTo(0, 30, 'percent_deaths', true, 80/3) let countToNumTreatments = countTo(100, 0, 'num_treatments', false, 8) - }, 2400) + }, 3200) } diff --git a/static/style.css b/static/style.css index 9ae5aa0..0d6d248 100644 --- a/static/style.css +++ b/static/style.css @@ -46,15 +46,15 @@ h1, .gradient-header { transition-property: height; transition-duration: 1s; transition-timing-function: ease-in-out; - transition-delay: 2s; + transition-delay: 3s; } #home-header { font-size: calc(3*(1.475rem + 2.7vw)); transition-property: font-size; - transition-duration: 1s; + transition-dsuration: 1s; transition-timing-function: ease-in-out; - transition-delay: 2s; + transition-delay: 3s; } #home-lead { @@ -62,7 +62,7 @@ h1, .gradient-header { transition-property: color; transition-duration: 1s; transition-timing-function: ease-in-out; - transition-delay: 0.8s; + transition-delay: 1.2s; } /* body */ -- GitLab