Team 26 updated & fixed the navbar - #9
Open
Jeevansanal2872 wants to merge 5 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Team pages to use the shared site navbar/header styling and adds cross-page smooth-scrolling behavior to land on specific sections when navigating from the Team pages back to the homepage.
Changes:
- Reworked
/team/and/team-26/pages to use the shared header/nav structure and updated page layout/styling. - Added
sessionStorage+ hash-based “scroll to section after navigation” behavior inapp.js. - Added a new
team-26/tempfile.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| team/index.html | Replaces the old logo/header layout with the shared navbar and adds new styling + custom wheel-scroll script. |
| team-26/index.html | Applies similar navbar/layout changes and adds the same custom wheel-scroll script. |
| app.js | Adds DOMContentLoaded logic to scroll to a stored/hash target after navigation. |
| team-26/temp | Adds a placeholder file (temp). |
Comments suppressed due to low confidence (2)
team-26/index.html:22
scroll-behavior: smoothis forced globally, which ignores users’prefers-reduced-motionsetting (anchors and programmatic scrolls will still animate). Add a reduced-motion override so scrolling becomes instant for those users.
html {
scroll-behavior: smooth;
overscroll-behavior-y: none;
}
team-26/index.html:290
- On mobile, the nav-link click handler closes the nav by setting
nav.style.width = '0vw'but does not update thenavOpenstate used byapp.js. After clicking a link, the hamburger may require two clicks to open again becausenavOpencan remain1.
link.addEventListener('click', () => {
if (window.innerWidth < 750) {
nav.style.width = '0vw';
}
});
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+18
to
+21
| html { | ||
| scroll-behavior: smooth; | ||
| overscroll-behavior-y: none; | ||
| } |
Comment on lines
+10
to
+29
| window.addEventListener('DOMContentLoaded', function () { | ||
| var pendingTarget = sessionStorage.getItem('alchemyScrollTarget'); | ||
| var hashTarget = window.location.hash ? window.location.hash.slice(1) : ''; | ||
| var targetId = pendingTarget || hashTarget; | ||
|
|
||
| if (!targetId) { | ||
| return; | ||
| } | ||
|
|
||
| sessionStorage.removeItem('alchemyScrollTarget'); | ||
|
|
||
| var targetElement = document.getElementById(targetId); | ||
| if (!targetElement) { | ||
| return; | ||
| } | ||
|
|
||
| window.requestAnimationFrame(function () { | ||
| targetElement.scrollIntoView({ behavior: 'smooth', block: 'start' }); | ||
| }); | ||
| }); |
Comment on lines
+343
to
+347
| link.addEventListener('click', () => { | ||
| if (window.innerWidth < 750) { | ||
| nav.style.width = '0vw'; | ||
| } | ||
| }); |
| </div> | ||
| </section> | ||
| <header class="header"> | ||
| <img src="/assets/alchemy.png" id="headerIMG" onclick="location.href = '/'" alt="alchemy logo"> |
| <div class="cards-wrapper" id="executive-committee"> | ||
| <!-- Content loaded dynamically from members.json --> | ||
| <header class="header"> | ||
| <img src="/assets/alchemy.png" id="headerIMG" onclick="location.href = '/'" alt="alchemy logo"> |
Comment on lines
+11
to
13
| <link href="https://fonts.googleapis.com/css2?family=Outfit:wght@100;200;300;400;500;600;700;800;900&display=swap" | ||
| rel="stylesheet"> | ||
| <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@500&display=swap" rel="stylesheet"> |
| @@ -0,0 +1 @@ | |||
| temp | |||
|
*Page Scroll not working properly |
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.
No description provided.