From 36f84f93988f2bd1325b5870b44c3911587a66d8 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 27 Dec 2023 10:52:28 +0530 Subject: [PATCH 01/30] get banner height --- src/email-recovery.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/email-recovery.js b/src/email-recovery.js index f862693..e7993c1 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -13,6 +13,9 @@ document.addEventListener('DOMContentLoaded', function() { newDiv.appendChild(contentDiv) newDiv.appendChild(link) insertIntoDOM(newDiv) + // Measure the height after the element is inserted into the DOM + const bannerHeight = document.getElementById('recovery-email-banner').clientHeight; + console.log('Height of recovery-email-banner:', bannerHeight) }) /** -- GitLab From 27948612494b074457c40c23cfc7fba5dbbd676f Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 27 Dec 2023 10:58:32 +0530 Subject: [PATCH 02/30] get banner height --- src/email-recovery.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/email-recovery.js b/src/email-recovery.js index e7993c1..d906eca 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -14,7 +14,7 @@ document.addEventListener('DOMContentLoaded', function() { newDiv.appendChild(link) insertIntoDOM(newDiv) // Measure the height after the element is inserted into the DOM - const bannerHeight = document.getElementById('recovery-email-banner').clientHeight; + const bannerHeight = document.getElementById('recovery-email-banner').clientHeight console.log('Height of recovery-email-banner:', bannerHeight) }) -- GitLab From f5a5bfd8b23a84288b7426b9179cc73815f88ab8 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 27 Dec 2023 11:04:57 +0530 Subject: [PATCH 03/30] get banner height --- src/email-recovery.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/email-recovery.js b/src/email-recovery.js index d906eca..8abfd31 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -14,8 +14,9 @@ document.addEventListener('DOMContentLoaded', function() { newDiv.appendChild(link) insertIntoDOM(newDiv) // Measure the height after the element is inserted into the DOM - const bannerHeight = document.getElementById('recovery-email-banner').clientHeight - console.log('Height of recovery-email-banner:', bannerHeight) + const bannerHeight = document.getElementById('recovery-email-banner').clientHeight + /* eslint-disable no-console */ + console.log('Height of recovery-email-banner:', bannerHeight) }) /** -- GitLab From 10f7ad45ab325b004c2b7f9b513ab6c97891eae3 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 27 Dec 2023 11:18:11 +0530 Subject: [PATCH 04/30] get banner height --- src/email-recovery.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/email-recovery.js b/src/email-recovery.js index 8abfd31..9cb6efc 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -14,9 +14,13 @@ document.addEventListener('DOMContentLoaded', function() { newDiv.appendChild(link) insertIntoDOM(newDiv) // Measure the height after the element is inserted into the DOM - const bannerHeight = document.getElementById('recovery-email-banner').clientHeight - /* eslint-disable no-console */ - console.log('Height of recovery-email-banner:', bannerHeight) + const banner = document.getElementById('recovery-email-banner') + if (banner) { + const bannerHeight = banner.clientHeight + /* eslint-disable no-console */ + console.log('Height of recovery-email-banner:', bannerHeight) + } + }) /** -- GitLab From 7f8c9a9665c789d205d32e93c6eae9699bc1c679 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 27 Dec 2023 11:39:16 +0530 Subject: [PATCH 05/30] get banner height --- src/email-recovery.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/email-recovery.js b/src/email-recovery.js index 9cb6efc..d22ec76 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -17,6 +17,9 @@ document.addEventListener('DOMContentLoaded', function() { const banner = document.getElementById('recovery-email-banner') if (banner) { const bannerHeight = banner.clientHeight + document.querySelector('body#body-user #header').style = bannerHeight + document.querySelector('body#body-settings #header').style = bannerHeight + document.querySelector('body#body-public #header').style = bannerHeight /* eslint-disable no-console */ console.log('Height of recovery-email-banner:', bannerHeight) } -- GitLab From f088812dea87e4e81e11e71598be3f7b15f169c9 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 27 Dec 2023 11:44:33 +0530 Subject: [PATCH 06/30] get banner height --- src/email-recovery.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/email-recovery.js b/src/email-recovery.js index d22ec76..b61ee6e 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -17,9 +17,9 @@ document.addEventListener('DOMContentLoaded', function() { const banner = document.getElementById('recovery-email-banner') if (banner) { const bannerHeight = banner.clientHeight - document.querySelector('body#body-user #header').style = bannerHeight - document.querySelector('body#body-settings #header').style = bannerHeight - document.querySelector('body#body-public #header').style = bannerHeight + document.querySelector('body#body-user #header').style.top = bannerHeight + document.querySelector('body#body-settings #header').style.top = bannerHeight + document.querySelector('body#body-public #header').style.top = bannerHeight /* eslint-disable no-console */ console.log('Height of recovery-email-banner:', bannerHeight) } -- GitLab From 3eb4d7ce0a19c7ccc8c5f6ec3391782f42eaba41 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 27 Dec 2023 11:51:14 +0530 Subject: [PATCH 07/30] get banner height --- src/email-recovery.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/email-recovery.js b/src/email-recovery.js index b61ee6e..b510ed6 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -17,9 +17,9 @@ document.addEventListener('DOMContentLoaded', function() { const banner = document.getElementById('recovery-email-banner') if (banner) { const bannerHeight = banner.clientHeight - document.querySelector('body#body-user #header').style.top = bannerHeight - document.querySelector('body#body-settings #header').style.top = bannerHeight - document.querySelector('body#body-public #header').style.top = bannerHeight + document.querySelector('body#body-user #header').style.top = bannerHeight + 'px' + document.querySelector('body#body-settings #header').style.top = bannerHeight + 'px' + document.querySelector('body#body-public #header').style.top = bannerHeight + 'px' /* eslint-disable no-console */ console.log('Height of recovery-email-banner:', bannerHeight) } -- GitLab From bee7581f8ac11717a1e7a07f5f00b85a39d8adb6 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 27 Dec 2023 11:54:07 +0530 Subject: [PATCH 08/30] get banner height --- src/email-recovery.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/email-recovery.js b/src/email-recovery.js index b510ed6..53341af 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -16,10 +16,10 @@ document.addEventListener('DOMContentLoaded', function() { // Measure the height after the element is inserted into the DOM const banner = document.getElementById('recovery-email-banner') if (banner) { - const bannerHeight = banner.clientHeight - document.querySelector('body#body-user #header').style.top = bannerHeight + 'px' - document.querySelector('body#body-settings #header').style.top = bannerHeight + 'px' - document.querySelector('body#body-public #header').style.top = bannerHeight + 'px' + const bannerHeight = banner.clientHeight + 'px' + document.querySelector('body#body-user #header').style.top = bannerHeight + document.querySelector('body#body-settings #header').style.top = bannerHeight + document.querySelector('body#body-public #header').style.top = bannerHeight /* eslint-disable no-console */ console.log('Height of recovery-email-banner:', bannerHeight) } -- GitLab From ae529fa100fc319b8a0be04f0152d7ba6b8da383 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 27 Dec 2023 12:00:28 +0530 Subject: [PATCH 09/30] get banner height --- src/email-recovery.js | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/src/email-recovery.js b/src/email-recovery.js index 53341af..c5a68ab 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -17,15 +17,32 @@ document.addEventListener('DOMContentLoaded', function() { const banner = document.getElementById('recovery-email-banner') if (banner) { const bannerHeight = banner.clientHeight + 'px' - document.querySelector('body#body-user #header').style.top = bannerHeight - document.querySelector('body#body-settings #header').style.top = bannerHeight - document.querySelector('body#body-public #header').style.top = bannerHeight + + // Apply the style to each header if they exist + setTopStyle('body#body-user #header', bannerHeight) + setTopStyle('body#body-settings #header', bannerHeight) + setTopStyle('body#body-public #header', bannerHeight) /* eslint-disable no-console */ console.log('Height of recovery-email-banner:', bannerHeight) } }) +/** + * + * @param selector + * @param topValue + */ +function setTopStyle(selector, topValue) { + const element = document.querySelector(selector) + if (element) { + element.style.top = topValue + console.log(`Set top for ${selector}:`, topValue) + } else { + console.log(`Element not found for selector: ${selector}`) + } +} + /** * * @param className -- GitLab From dfcbadb908bd98d5f8c0c3ecc457071e1163a85e Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 27 Dec 2023 12:06:21 +0530 Subject: [PATCH 10/30] get banner height --- src/email-recovery.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/email-recovery.js b/src/email-recovery.js index c5a68ab..8609bea 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -22,6 +22,7 @@ document.addEventListener('DOMContentLoaded', function() { setTopStyle('body#body-user #header', bannerHeight) setTopStyle('body#body-settings #header', bannerHeight) setTopStyle('body#body-public #header', bannerHeight) + banner.style.height = bannerHeight /* eslint-disable no-console */ console.log('Height of recovery-email-banner:', bannerHeight) } -- GitLab From ef4ada26545847dd7aba104a9af3282e6a90ab78 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 27 Dec 2023 12:17:01 +0530 Subject: [PATCH 11/30] get banner height --- src/email-recovery.js | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/src/email-recovery.js b/src/email-recovery.js index 8609bea..25e3d67 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -17,11 +17,17 @@ document.addEventListener('DOMContentLoaded', function() { const banner = document.getElementById('recovery-email-banner') if (banner) { const bannerHeight = banner.clientHeight + 'px' - + const topHeight = (banner.clientHeight + 50) + 'px' // Apply the style to each header if they exist - setTopStyle('body#body-user #header', bannerHeight) - setTopStyle('body#body-settings #header', bannerHeight) - setTopStyle('body#body-public #header', bannerHeight) + setHeaderTopStyle('body#body-user #header', bannerHeight) + setHeaderTopStyle('body#body-settings #header', bannerHeight) + setHeaderTopStyle('body#body-public #header', bannerHeight) + + setContentStyle('body#body-user #content', topHeight) + setContentStyle('body#body-settings #content', topHeight) + setContentStyle('body#body-public #content', topHeight) + setContentStyle('body#body-user #content-vue', topHeight) + banner.style.height = bannerHeight /* eslint-disable no-console */ console.log('Height of recovery-email-banner:', bannerHeight) @@ -34,16 +40,30 @@ document.addEventListener('DOMContentLoaded', function() { * @param selector * @param topValue */ -function setTopStyle(selector, topValue) { +function setHeaderTopStyle(selector, topValue) { const element = document.querySelector(selector) if (element) { element.style.top = topValue - console.log(`Set top for ${selector}:`, topValue) - } else { - console.log(`Element not found for selector: ${selector}`) } } +/* +* @param selector +* @param topValue +*/ +/** + * + * @param selector + * @param topValue + */ +function setContentStyle(selector, topValue) { + const element = document.querySelector(selector) + if (element) { + element.style.marginTop = topValue + const heightValue = `calc(100% - env(safe-area-inset-bottom) - ${topValue} - var(--body-container-margin))` + element.style.height = heightValue + } +} /** * * @param className -- GitLab From 887990838b4a767c13950e338201857c96ff5a23 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 27 Dec 2023 12:27:17 +0530 Subject: [PATCH 12/30] get banner height --- src/email-recovery.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/email-recovery.js b/src/email-recovery.js index 25e3d67..d74d708 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -59,9 +59,9 @@ function setHeaderTopStyle(selector, topValue) { function setContentStyle(selector, topValue) { const element = document.querySelector(selector) if (element) { - element.style.marginTop = topValue - const heightValue = `calc(100% - env(safe-area-inset-bottom) - ${topValue} - var(--body-container-margin))` - element.style.height = heightValue + element.style.cssText += `margin-top: ${topValue} !important;` + const heightValue = `calc(100% - env(safe-area-inset-bottom) - ${topValue} - var(--body-container-margin)) !important` + element.style.cssText += `height: ${heightValue};` } } /** -- GitLab From 6f068783df9e6d5f8a169728ec6f6e7522b2da07 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 27 Dec 2023 12:30:00 +0530 Subject: [PATCH 13/30] get banner height --- src/email-recovery.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/email-recovery.js b/src/email-recovery.js index d74d708..bd1d655 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -60,8 +60,8 @@ function setContentStyle(selector, topValue) { const element = document.querySelector(selector) if (element) { element.style.cssText += `margin-top: ${topValue} !important;` - const heightValue = `calc(100% - env(safe-area-inset-bottom) - ${topValue} - var(--body-container-margin)) !important` - element.style.cssText += `height: ${heightValue};` + const heightValue = `calc(100% - env(safe-area-inset-bottom) - ${topValue} - var(--body-container-margin)) !important` + element.style.cssText += `height: ${heightValue};` } } /** -- GitLab From bb013ecf60a701dc5281901a1fac7199ab46bf15 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 27 Dec 2023 12:39:48 +0530 Subject: [PATCH 14/30] get banner height --- src/email-recovery.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/email-recovery.js b/src/email-recovery.js index bd1d655..a5b5c10 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -27,7 +27,8 @@ document.addEventListener('DOMContentLoaded', function() { setContentStyle('body#body-settings #content', topHeight) setContentStyle('body#body-public #content', topHeight) setContentStyle('body#body-user #content-vue', topHeight) - + + setHeaderRightTopStyle('#header .header-right .header-menu__wrapper', topHeight) banner.style.height = bannerHeight /* eslint-disable no-console */ console.log('Height of recovery-email-banner:', bannerHeight) @@ -46,6 +47,17 @@ function setHeaderTopStyle(selector, topValue) { element.style.top = topValue } } +/** + * + * @param selector + * @param topValue + */ +function setHeaderRightTopStyle(selector, topValue) { + const element = document.querySelector(selector) + if (element) { + element.style.top = topValue + } +} /* * @param selector -- GitLab From a30507c88a2d5380220900baf918277618c54be0 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 27 Dec 2023 12:41:17 +0530 Subject: [PATCH 15/30] get banner height --- src/email-recovery.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/email-recovery.js b/src/email-recovery.js index a5b5c10..59fb55d 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -27,7 +27,7 @@ document.addEventListener('DOMContentLoaded', function() { setContentStyle('body#body-settings #content', topHeight) setContentStyle('body#body-public #content', topHeight) setContentStyle('body#body-user #content-vue', topHeight) - + setHeaderRightTopStyle('#header .header-right .header-menu__wrapper', topHeight) banner.style.height = bannerHeight /* eslint-disable no-console */ -- GitLab From 8f2e2de5be9d22ea5ddc0b2488803e23d4a27890 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 27 Dec 2023 12:49:35 +0530 Subject: [PATCH 16/30] get banner height --- src/email-recovery.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/email-recovery.js b/src/email-recovery.js index 59fb55d..6759b99 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -28,7 +28,7 @@ document.addEventListener('DOMContentLoaded', function() { setContentStyle('body#body-public #content', topHeight) setContentStyle('body#body-user #content-vue', topHeight) - setHeaderRightTopStyle('#header .header-right .header-menu__wrapper', topHeight) + setHeaderRightTopStyle('#header-menu-user-menu', topHeight) banner.style.height = bannerHeight /* eslint-disable no-console */ console.log('Height of recovery-email-banner:', bannerHeight) -- GitLab From 0301edf1da853600caff23ad5e5c61f8d4585652 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 27 Dec 2023 12:50:53 +0530 Subject: [PATCH 17/30] get banner height --- src/email-recovery.js | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/email-recovery.js b/src/email-recovery.js index 6759b99..48e14d8 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -27,8 +27,7 @@ document.addEventListener('DOMContentLoaded', function() { setContentStyle('body#body-settings #content', topHeight) setContentStyle('body#body-public #content', topHeight) setContentStyle('body#body-user #content-vue', topHeight) - - setHeaderRightTopStyle('#header-menu-user-menu', topHeight) + document.getElementById('recovery-email-banner').style.top = topHeight banner.style.height = bannerHeight /* eslint-disable no-console */ console.log('Height of recovery-email-banner:', bannerHeight) @@ -47,17 +46,6 @@ function setHeaderTopStyle(selector, topValue) { element.style.top = topValue } } -/** - * - * @param selector - * @param topValue - */ -function setHeaderRightTopStyle(selector, topValue) { - const element = document.querySelector(selector) - if (element) { - element.style.top = topValue - } -} /* * @param selector -- GitLab From 6e84d4ba2951f00ce0aa73560d24d2ebfdd69ffe Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 27 Dec 2023 12:51:31 +0530 Subject: [PATCH 18/30] get banner height --- src/email-recovery.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/email-recovery.js b/src/email-recovery.js index 48e14d8..788ec37 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -27,7 +27,9 @@ document.addEventListener('DOMContentLoaded', function() { setContentStyle('body#body-settings #content', topHeight) setContentStyle('body#body-public #content', topHeight) setContentStyle('body#body-user #content-vue', topHeight) - document.getElementById('recovery-email-banner').style.top = topHeight + if(document.getElementById('recovery-email-banner')){ + document.getElementById('recovery-email-banner').style.top = topHeight + } banner.style.height = bannerHeight /* eslint-disable no-console */ console.log('Height of recovery-email-banner:', bannerHeight) -- GitLab From f73cb6c604d20b8f722d4b1ad3671d834be52bf3 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 27 Dec 2023 12:53:27 +0530 Subject: [PATCH 19/30] get banner height --- src/email-recovery.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/email-recovery.js b/src/email-recovery.js index 788ec37..2272844 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -27,7 +27,7 @@ document.addEventListener('DOMContentLoaded', function() { setContentStyle('body#body-settings #content', topHeight) setContentStyle('body#body-public #content', topHeight) setContentStyle('body#body-user #content-vue', topHeight) - if(document.getElementById('recovery-email-banner')){ + if (document.getElementById('recovery-email-banner')) { document.getElementById('recovery-email-banner').style.top = topHeight } banner.style.height = bannerHeight -- GitLab From 8a6fad5149ccf8a3c5c7d0af8a6d8b0caffec410 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 27 Dec 2023 12:58:30 +0530 Subject: [PATCH 20/30] get banner height --- src/email-recovery.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/email-recovery.js b/src/email-recovery.js index 2272844..c9c14c3 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -27,8 +27,8 @@ document.addEventListener('DOMContentLoaded', function() { setContentStyle('body#body-settings #content', topHeight) setContentStyle('body#body-public #content', topHeight) setContentStyle('body#body-user #content-vue', topHeight) - if (document.getElementById('recovery-email-banner')) { - document.getElementById('recovery-email-banner').style.top = topHeight + if (document.getElementById('header-menu-user-menu')) { + document.getElementById('header-menu-user-menu').style.top = topHeight } banner.style.height = bannerHeight /* eslint-disable no-console */ -- GitLab From 3fadf73ba114c6ac3045f1e0605d874c55d557ca Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 27 Dec 2023 13:03:05 +0530 Subject: [PATCH 21/30] get banner height --- src/email-recovery.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/email-recovery.js b/src/email-recovery.js index c9c14c3..ec31b4a 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -27,11 +27,13 @@ document.addEventListener('DOMContentLoaded', function() { setContentStyle('body#body-settings #content', topHeight) setContentStyle('body#body-public #content', topHeight) setContentStyle('body#body-user #content-vue', topHeight) + /* eslint-disable no-console */ if (document.getElementById('header-menu-user-menu')) { document.getElementById('header-menu-user-menu').style.top = topHeight + console.log('Top Height of recovery-email-banner:', topHeight) } banner.style.height = bannerHeight - /* eslint-disable no-console */ + console.log('Height of recovery-email-banner:', bannerHeight) } -- GitLab From f2714217782323e671a7d5214bf7c5a3af64bd5f Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 27 Dec 2023 13:05:48 +0530 Subject: [PATCH 22/30] get banner height --- src/email-recovery.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/email-recovery.js b/src/email-recovery.js index ec31b4a..0f64f9c 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -33,7 +33,6 @@ document.addEventListener('DOMContentLoaded', function() { console.log('Top Height of recovery-email-banner:', topHeight) } banner.style.height = bannerHeight - console.log('Height of recovery-email-banner:', bannerHeight) } -- GitLab From 387a83dc0ea6163ea93cc72f8a801acecf0215bc Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 27 Dec 2023 13:13:03 +0530 Subject: [PATCH 23/30] get banner height --- src/email-recovery.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/email-recovery.js b/src/email-recovery.js index 0f64f9c..da8096e 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -28,9 +28,12 @@ document.addEventListener('DOMContentLoaded', function() { setContentStyle('body#body-public #content', topHeight) setContentStyle('body#body-user #content-vue', topHeight) /* eslint-disable no-console */ - if (document.getElementById('header-menu-user-menu')) { - document.getElementById('header-menu-user-menu').style.top = topHeight + const userMenu = document.getElementById('header-menu-user-menu') + if (userMenu) { + userMenu.style.top = topHeight // Ensure you add 'px' if topHeight is a number console.log('Top Height of recovery-email-banner:', topHeight) + } else { + console.log('Element with ID header-menu-user-menu not found') } banner.style.height = bannerHeight console.log('Height of recovery-email-banner:', bannerHeight) -- GitLab From cf0395754bf846a3175059831f53b41a17ff75fb Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 27 Dec 2023 13:22:51 +0530 Subject: [PATCH 24/30] get banner height --- src/email-recovery.js | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/email-recovery.js b/src/email-recovery.js index da8096e..35e510a 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -27,20 +27,28 @@ document.addEventListener('DOMContentLoaded', function() { setContentStyle('body#body-settings #content', topHeight) setContentStyle('body#body-public #content', topHeight) setContentStyle('body#body-user #content-vue', topHeight) + setMenuTopStyle('body #header #user-menu', topHeight) /* eslint-disable no-console */ - const userMenu = document.getElementById('header-menu-user-menu') - if (userMenu) { - userMenu.style.top = topHeight // Ensure you add 'px' if topHeight is a number - console.log('Top Height of recovery-email-banner:', topHeight) - } else { - console.log('Element with ID header-menu-user-menu not found') - } banner.style.height = bannerHeight console.log('Height of recovery-email-banner:', bannerHeight) } }) +/** + * + * @param selector + * @param topValue + */ +function setMenuTopStyle(selector, topValue) { + const element = document.querySelector(selector) + if (element) { + element.style.top = topValue + console.log('Top Height of recovery-email-banner:', topValue) + } + console.log('Element with ID header-menu-user-menu not found') +} + /** * * @param selector -- GitLab From bf0aff48b1fc2fb9ece508eed42ce634a58a2c9e Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 27 Dec 2023 13:26:50 +0530 Subject: [PATCH 25/30] get banner height --- src/email-recovery.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/email-recovery.js b/src/email-recovery.js index 35e510a..fe13c35 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -27,7 +27,7 @@ document.addEventListener('DOMContentLoaded', function() { setContentStyle('body#body-settings #content', topHeight) setContentStyle('body#body-public #content', topHeight) setContentStyle('body#body-user #content-vue', topHeight) - setMenuTopStyle('body #header #user-menu', topHeight) + setMenuTopStyle('body #header #user-menu #header-menu-user-menu', topHeight) /* eslint-disable no-console */ banner.style.height = bannerHeight console.log('Height of recovery-email-banner:', bannerHeight) -- GitLab From 799afd2291bbd845b8a8c660b9c6473095bd89a6 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 27 Dec 2023 13:36:44 +0530 Subject: [PATCH 26/30] get banner height --- src/email-recovery.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/email-recovery.js b/src/email-recovery.js index fe13c35..46c440c 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -41,12 +41,15 @@ document.addEventListener('DOMContentLoaded', function() { * @param topValue */ function setMenuTopStyle(selector, topValue) { - const element = document.querySelector(selector) - if (element) { - element.style.top = topValue - console.log('Top Height of recovery-email-banner:', topValue) - } - console.log('Element with ID header-menu-user-menu not found') + const interval = setInterval(function() { + const element = document.querySelector(selector) + if (element) { + clearInterval(interval) // Stop the interval + element.style.top = topValue + console.log('Top Height of recovery-email-banner:', topValue) + } + console.log('Element with ID header-menu-user-menu not found') + }, 1000) // Interval set to 1 second (1000 milliseconds) } /** -- GitLab From 3768ad120879d7ddd8c554fbe5c278532506dc4d Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 27 Dec 2023 13:44:39 +0530 Subject: [PATCH 27/30] get banner height --- src/email-recovery.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/email-recovery.js b/src/email-recovery.js index 46c440c..129c9dd 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -46,9 +46,7 @@ function setMenuTopStyle(selector, topValue) { if (element) { clearInterval(interval) // Stop the interval element.style.top = topValue - console.log('Top Height of recovery-email-banner:', topValue) } - console.log('Element with ID header-menu-user-menu not found') }, 1000) // Interval set to 1 second (1000 milliseconds) } -- GitLab From e4adfc110c9543489fef7b404aae806065b66cf9 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 27 Dec 2023 13:48:21 +0530 Subject: [PATCH 28/30] get banner height --- scss/email-recovery.scss | 70 +--------------------------------------- src/email-recovery.js | 5 ++- 2 files changed, 3 insertions(+), 72 deletions(-) diff --git a/scss/email-recovery.scss b/scss/email-recovery.scss index 4fbf9ae..3403e08 100644 --- a/scss/email-recovery.scss +++ b/scss/email-recovery.scss @@ -33,72 +33,4 @@ font-weight: 600; } -} - -body#body-user #header, -body#body-settings #header, -body#body-public #header { - top: 56px; -} -#header .header-right .header-menu__wrapper{ - top:106px; -} - -#body-user #content, -#body-settings #content, -#body-public #content, -#body-public #content, -#body-user #content-vue { - margin-top: 100px !important; - height: calc(100% - env(safe-area-inset-bottom) - 106px - var(--body-container-margin)); - @media only screen and (min-width: 769px) and (max-width: 1024) { - margin-top: 130px !important; - height: calc(100% - env(safe-area-inset-bottom) - 130px - var(--body-container-margin)); - } - @media only screen and (min-width: 481px) and (max-width: 768px) { - margin-top: 162px !important; - height: calc(100% - env(safe-area-inset-bottom) - 162px - var(--body-container-margin)); - } - @media only screen and (max-width: 399px) { - margin-top: 186px !important; - height: calc(100% - env(safe-area-inset-bottom) - 186px - var(--body-container-margin)); - } - - -} -@media only screen and (max-width: 1024px) { - body#body-user #header, - body#body-settings #header, - body#body-public #header { - top: 80px; - } - #header .header-right .header-menu__wrapper{ - top:130px; - } -} -@media only screen and (max-width: 768px) { - .recovery-email-banner { - display: block; - a{ - padding: 8px 0 0 30px; - } - } - body#body-user #header, - body#body-settings #header, - body#body-public #header { - top: 112px; - } - #header .header-right .header-menu__wrapper{ - top:162px; - } -} -@media only screen and (max-width: 399px) { - body#body-user #header, - body#body-settings #header, - body#body-public #header { - top: 136px; - } - #header .header-right .header-menu__wrapper{ - top:186px; - } -} +} \ No newline at end of file diff --git a/src/email-recovery.js b/src/email-recovery.js index 129c9dd..148bd82 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -18,7 +18,7 @@ document.addEventListener('DOMContentLoaded', function() { if (banner) { const bannerHeight = banner.clientHeight + 'px' const topHeight = (banner.clientHeight + 50) + 'px' - // Apply the style to each header if they exist + setHeaderTopStyle('body#body-user #header', bannerHeight) setHeaderTopStyle('body#body-settings #header', bannerHeight) setHeaderTopStyle('body#body-public #header', bannerHeight) @@ -28,9 +28,8 @@ document.addEventListener('DOMContentLoaded', function() { setContentStyle('body#body-public #content', topHeight) setContentStyle('body#body-user #content-vue', topHeight) setMenuTopStyle('body #header #user-menu #header-menu-user-menu', topHeight) - /* eslint-disable no-console */ + banner.style.height = bannerHeight - console.log('Height of recovery-email-banner:', bannerHeight) } }) -- GitLab From 98ad85101db683ae7e8fda57864e9ca536b45d59 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 27 Dec 2023 13:50:30 +0530 Subject: [PATCH 29/30] get banner height --- src/email-recovery.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/email-recovery.js b/src/email-recovery.js index 148bd82..05911a8 100644 --- a/src/email-recovery.js +++ b/src/email-recovery.js @@ -18,17 +18,14 @@ document.addEventListener('DOMContentLoaded', function() { if (banner) { const bannerHeight = banner.clientHeight + 'px' const topHeight = (banner.clientHeight + 50) + 'px' - setHeaderTopStyle('body#body-user #header', bannerHeight) setHeaderTopStyle('body#body-settings #header', bannerHeight) setHeaderTopStyle('body#body-public #header', bannerHeight) - setContentStyle('body#body-user #content', topHeight) setContentStyle('body#body-settings #content', topHeight) setContentStyle('body#body-public #content', topHeight) setContentStyle('body#body-user #content-vue', topHeight) setMenuTopStyle('body #header #user-menu #header-menu-user-menu', topHeight) - banner.style.height = bannerHeight } -- GitLab From 64f6562fd6c846c50b502fd9696576ebfaabdd7a Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 27 Dec 2023 13:56:11 +0530 Subject: [PATCH 30/30] get banner height --- scss/email-recovery.scss | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scss/email-recovery.scss b/scss/email-recovery.scss index 3403e08..c71c9a6 100644 --- a/scss/email-recovery.scss +++ b/scss/email-recovery.scss @@ -33,4 +33,14 @@ font-weight: 600; } -} \ No newline at end of file +} + +@media only screen and (max-width: 768px) { + .recovery-email-banner { + display: block; + a{ + padding: 8px 0 0 30px; + } + } +} + -- GitLab