Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Initiatives by permalink #363

Merged
merged 4 commits into from
Jul 16, 2024
Merged

Conversation

machikoyasuda
Copy link
Member

closes #353

How to test

image - Click around other tabs to make sure the other tabs still also open (but the anchor tag in the URL will not change).

@machikoyasuda machikoyasuda requested a review from a team as a code owner July 15, 2024 22:08
Copy link

netlify bot commented Jul 15, 2024

Deploy Preview for cal-itp-website ready!

Name Link
🔨 Latest commit c55ee0e
🔍 Latest deploy log https://app.netlify.com/sites/cal-itp-website/deploys/6695c71a0c6f930008f6672b
😎 Deploy Preview https://deploy-preview-363--cal-itp-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -305,6 +305,10 @@ footer a:hover {
border-style: solid;
}

.scroll-link {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This allows the anchor link to scroll an extra 240px (roughly double the height of the top nav), so that the anchor scrolls to here
image

instead of here:
image

In this scenario, the Explore the intiatives is hidden by the sticky nav.

@machikoyasuda machikoyasuda self-assigned this Jul 15, 2024
Copy link
Member

@thekaveman thekaveman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really cool! Works great and the smooth scroll is nice.

One note on testing: this doesn't really work if you have already loaded the page, and then add the #pills-whatever to the URL and hit enter, or change to #pills-whatever2; I don't think this is a real use-case we need to be concerned about. It worked just fine if I entered the URL directly in the browser bar in a blank tab and hit enter (like what would happen if someone clicked a link).

One small request: can we swap the word pills- for something like initiatives- -- if these are going to be URLs that are shared, we want them to sort of make sense and not look weird 😅

Copy link
Member

@thekaveman thekaveman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool 😎

@thekaveman
Copy link
Member

cc @indexing we now have direct links to the Initiatives sections on calitp.org

@machikoyasuda machikoyasuda merged commit 3f06a34 into main Jul 16, 2024
5 checks passed
@machikoyasuda machikoyasuda deleted the feat/353-initiatives-permalinks branch July 16, 2024 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Home page: Permalinks for homepage Initiatives section
2 participants