Skip to content

Commit e98bacc

Browse files
authored
Merge pull request #1170 from adamscott/hotfix-4.4-release-page
[Hotfix] Fix issues with the 4.4 page
2 parents d66c9f9 + d0826c9 commit e98bacc

File tree

3 files changed

+26
-10
lines changed

3 files changed

+26
-10
lines changed

assets/css/releases/4.4.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1623,7 +1623,8 @@ $donate-robot-size: 500px;
16231623
margin-bottom: calc(var(--card-padding) * 2);
16241624
}
16251625

1626-
.section-title h3 {
1626+
.section-title h3,
1627+
.section-title h4 {
16271628
position: relative;
16281629
background: var(--color-top)
16291630
linear-gradient(to bottom, var(--color-top), var(--color-bottom));

assets/js/releases/4.4.mjs

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,24 +63,42 @@ for (const releaseCardContainer of releaseCardContainers) {
6363
});
6464
}
6565

66-
releaseCardContainer.classList.add("overflow-y-hidden");
66+
// releaseCardContainer.classList.add("overflow-y-hidden");
6767
}
6868
const sectionContainers = Array.from(
69-
document.querySelectorAll(".section-title"),
69+
document.querySelectorAll(".section:has(.section-title)"),
7070
);
7171
for (const sectionContainer of sectionContainers) {
7272
elements.push({
73-
element: sectionContainer.querySelector("h3"),
74-
container: sectionContainer,
73+
element: sectionContainer.querySelector(
74+
".section-title h3, .section-title h4",
75+
),
76+
container: sectionContainer.querySelector(".section-title"),
7577
isLastOfType: true,
7678
});
7779

78-
sectionContainer.classList.add("overflow-y-hidden");
80+
const sectionLinks = sectionContainer.querySelector(".section-links");
81+
if (sectionLinks == null) {
82+
continue;
83+
}
84+
85+
elements.push({
86+
element: sectionLinks,
87+
container: sectionContainer.querySelector(".section-title"),
88+
isLastOfType: true,
89+
});
90+
91+
// sectionContainer.classList.add("overflow-y-hidden");
7992
}
93+
elements.sort((a, b) => {
94+
const aRect = a.element.getBoundingClientRect();
95+
const bRect = b.element.getBoundingClientRect();
96+
return aRect.top - bRect.top;
97+
});
8098
for (const element of elements) {
8199
if (element.element.getBoundingClientRect().top < windowHeight) {
82100
if (element.isLastOfType) {
83-
element.container.classList.remove("overflow-y-hidden");
101+
// element.container.classList.remove("overflow-y-hidden");
84102
}
85103
continue;
86104
}

assets/js/releases/4.5.mjs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,6 @@ elements.sort((a, b) => {
110110
return aRect.top - bRect.top;
111111
});
112112
for (const element of elements) {
113-
if (element.element == null) {
114-
debugger;
115-
}
116113
if (element.element.getBoundingClientRect().top < windowHeight) {
117114
if (element.isLastOfType) {
118115
// element.container.classList.remove("overflow-y-hidden");

0 commit comments

Comments
 (0)