From d0826c9b31c35d06289495b56e93660f9611a3fa Mon Sep 17 00:00:00 2001 From: Adam Scott Date: Thu, 18 Sep 2025 09:58:13 -0400 Subject: [PATCH] [Hotfix] Fix issues with the 4.4 page - Fix issues with 4.4 page (caused by a common release template change) - Fixes credit names to be the same size for every name - Remove superfluous debugger call in the 4.5 release page --- assets/css/releases/4.4.scss | 3 ++- assets/js/releases/4.4.mjs | 30 ++++++++++++++++++++++++------ assets/js/releases/4.5.mjs | 3 --- 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/assets/css/releases/4.4.scss b/assets/css/releases/4.4.scss index 72d50111e6..ba4ebb047f 100644 --- a/assets/css/releases/4.4.scss +++ b/assets/css/releases/4.4.scss @@ -1623,7 +1623,8 @@ $donate-robot-size: 500px; margin-bottom: calc(var(--card-padding) * 2); } - .section-title h3 { + .section-title h3, + .section-title h4 { position: relative; background: var(--color-top) linear-gradient(to bottom, var(--color-top), var(--color-bottom)); diff --git a/assets/js/releases/4.4.mjs b/assets/js/releases/4.4.mjs index cc5d444211..8d474200e1 100644 --- a/assets/js/releases/4.4.mjs +++ b/assets/js/releases/4.4.mjs @@ -63,24 +63,42 @@ for (const releaseCardContainer of releaseCardContainers) { }); } - releaseCardContainer.classList.add("overflow-y-hidden"); + // releaseCardContainer.classList.add("overflow-y-hidden"); } const sectionContainers = Array.from( - document.querySelectorAll(".section-title"), + document.querySelectorAll(".section:has(.section-title)"), ); for (const sectionContainer of sectionContainers) { elements.push({ - element: sectionContainer.querySelector("h3"), - container: sectionContainer, + element: sectionContainer.querySelector( + ".section-title h3, .section-title h4", + ), + container: sectionContainer.querySelector(".section-title"), isLastOfType: true, }); - sectionContainer.classList.add("overflow-y-hidden"); + const sectionLinks = sectionContainer.querySelector(".section-links"); + if (sectionLinks == null) { + continue; + } + + elements.push({ + element: sectionLinks, + container: sectionContainer.querySelector(".section-title"), + isLastOfType: true, + }); + + // sectionContainer.classList.add("overflow-y-hidden"); } +elements.sort((a, b) => { + const aRect = a.element.getBoundingClientRect(); + const bRect = b.element.getBoundingClientRect(); + return aRect.top - bRect.top; +}); for (const element of elements) { if (element.element.getBoundingClientRect().top < windowHeight) { if (element.isLastOfType) { - element.container.classList.remove("overflow-y-hidden"); + // element.container.classList.remove("overflow-y-hidden"); } continue; } diff --git a/assets/js/releases/4.5.mjs b/assets/js/releases/4.5.mjs index fde19f0bbe..0b76c39c82 100644 --- a/assets/js/releases/4.5.mjs +++ b/assets/js/releases/4.5.mjs @@ -110,9 +110,6 @@ elements.sort((a, b) => { return aRect.top - bRect.top; }); for (const element of elements) { - if (element.element == null) { - debugger; - } if (element.element.getBoundingClientRect().top < windowHeight) { if (element.isLastOfType) { // element.container.classList.remove("overflow-y-hidden");