Fix Dropdown Arrow Direction for “Latest New 2025”#576
Closed
KomatiBhavaniSankar wants to merge 0 commit intoOSGeo:masterfrom
Closed
Fix Dropdown Arrow Direction for “Latest New 2025”#576KomatiBhavaniSankar wants to merge 0 commit intoOSGeo:masterfrom
KomatiBhavaniSankar wants to merge 0 commit intoOSGeo:masterfrom
Conversation
cwhite911
requested changes
Dec 18, 2025
Contributor
There was a problem hiding this comment.
No changes were made to this file. Please remove it file from the PR.
Contributor
Author
There was a problem hiding this comment.
No changes were made to this file. Please remove it file from the PR.
Yes. I will remove it. Thank you.
Contributor
There was a problem hiding this comment.
These libraries are already imported and don' t need to be include here.
|
|
||
| {{ partial "footer.html" . }} | ||
|
|
||
| <script> |
Contributor
There was a problem hiding this comment.
We don't need this extra Javascript.
Comment on lines
60
to
70
| <a class="d-block h3 text-dark text-decoration-none" | ||
| data-bs-toggle="collapse" | ||
| data-bs-target="#{{ $collapseID }}" | ||
| aria-expanded="{{ if eq $year $currentYear }}true{{ else }}false{{ end }}" | ||
| aria-controls="{{ $collapseID }}"> | ||
|
|
||
| <i id="icon-{{ $collapseID }}" | ||
| class="fa-solid {{ if eq $year $currentYear }}fa-chevron-up{{ else }}fa-chevron-down{{ end }} me-2"> | ||
| </i> | ||
| {{ $year }} | ||
| </a> |
Contributor
There was a problem hiding this comment.
You can use this without the extra Javascript, and please be careful to maintain the proper indentation. I know it is not great everywhere, but we should at least improve it when we are making a change.
Suggested change
| <a class="d-block h3 text-dark text-decoration-none" | |
| data-bs-toggle="collapse" | |
| data-bs-target="#{{ $collapseID }}" | |
| aria-expanded="{{ if eq $year $currentYear }}true{{ else }}false{{ end }}" | |
| aria-controls="{{ $collapseID }}"> | |
| <i id="icon-{{ $collapseID }}" | |
| class="fa-solid {{ if eq $year $currentYear }}fa-chevron-up{{ else }}fa-chevron-down{{ end }} me-2"> | |
| </i> | |
| {{ $year }} | |
| </a> | |
| <a class="d-block h3 text-dark text-decoration-none" | |
| data-bs-toggle="collapse" | |
| data-bs-target="#{{ $collapseID }}" | |
| role="button" | |
| href="#{{ $collapseID }}" | |
| aria-expanded="{{ if eq $year $currentYear }}true{{ else }}false{{ end }}" | |
| aria-controls="{{ $collapseID }}"> | |
| <i | |
| id="icon-{{ $collapseID }}" | |
| class="fa-solid fa-chevron-{{ if eq $year $currentYear }}down{{ else }}right{{ end }}"> | |
| </i> | |
| {{ $year }} | |
| </a> |
Comment on lines
148
to
167
| <script> | ||
| document.addEventListener("DOMContentLoaded", function () { | ||
| document.querySelectorAll('[data-bs-toggle="collapse"]').forEach(function (toggle) { | ||
| toggle.addEventListener("click", function () { | ||
| const targetId = toggle.getAttribute("data-bs-target"); | ||
| const icon = document.querySelector("#icon-" + targetId.replace("#", "")); | ||
| if (!icon) return; | ||
| const target = document.querySelector(targetId); | ||
| target.addEventListener("shown.bs.collapse", function () { | ||
| icon.classList.remove("fa-chevron-down"); | ||
| icon.classList.add("fa-chevron-up"); | ||
| }); | ||
| target.addEventListener("hidden.bs.collapse", function () { | ||
| icon.classList.remove("fa-chevron-up"); | ||
| icon.classList.add("fa-chevron-down"); | ||
| }); | ||
| }); | ||
| }); | ||
| }); | ||
| </script> |
Contributor
There was a problem hiding this comment.
Suggested change
| <script> | |
| document.addEventListener("DOMContentLoaded", function () { | |
| document.querySelectorAll('[data-bs-toggle="collapse"]').forEach(function (toggle) { | |
| toggle.addEventListener("click", function () { | |
| const targetId = toggle.getAttribute("data-bs-target"); | |
| const icon = document.querySelector("#icon-" + targetId.replace("#", "")); | |
| if (!icon) return; | |
| const target = document.querySelector(targetId); | |
| target.addEventListener("shown.bs.collapse", function () { | |
| icon.classList.remove("fa-chevron-down"); | |
| icon.classList.add("fa-chevron-up"); | |
| }); | |
| target.addEventListener("hidden.bs.collapse", function () { | |
| icon.classList.remove("fa-chevron-up"); | |
| icon.classList.add("fa-chevron-down"); | |
| }); | |
| }); | |
| }); | |
| }); | |
| </script> |
20f158c to
d4cb030
Compare
Member
|
Continued in #580 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR: Fix Dropdown Arrow Direction for “Latest New 2025” ( fixes #575)
This PR fixes the issue where the dropdown arrow in “Latest New 2025” always pointed up, even when the menu was closed.
What’s Fixed
Let me know if any changes are needed. I’m open to suggestions.
Also, I’ll make sure to improve my PR workflow next time; I couldn’t raise the PR earlier as I was out of state. Thank you for assigning me this issue!