Add left sidebar navigation to news page#205
Open
weng271190436 wants to merge 1 commit intoopenworm:masterfrom
Open
Add left sidebar navigation to news page#205weng271190436 wants to merge 1 commit intoopenworm:masterfrom
weng271190436 wants to merge 1 commit intoopenworm:masterfrom
Conversation
- Changed layout from span12 to span3 (sidebar) + span9 (content) - Left sidebar shows clickable date index that jumps to articles - Matches layout pattern used on science.html and other pages - Updated loadFullNewsFeed() in main.js to populate sidebar nav - Added missing jquery.pjax.js include (fixes openworm#202) Fixes openworm#203
Member
|
Thanks for this @weng271190436. Did you say this also fixes the issue at #202? I'm still getting that issue testing this locally... |
Author
|
@pgleeson sorry I was mistaken. I thought I fixed it by including jquery.pjax.js. But after investigating further I realized that the issue was due to flakiness of api.allorigins.win. I don't think think there is a fix if api.allorigins.win is not reliable. I updated the description to remove the incorrect claim that I fixed #202. Thanks for trying out locally and pointing that out |
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.

Summary
Adds a left sidebar with clickable date index to the news page, matching the layout used on science.html and other pages.
Fixes #203
Changes
news.html
span12tospan3(sidebar) +span9(content)#news-navsidebar element with loading spinnerjquery.pjax.jsincludejs/main.js
loadFullNewsFeed()to populate the sidebar nav with clickable datesScreenshots
The sidebar shows article dates (e.g. "Apr 5, 2026") — clicking scrolls to that article.
Testing
python3 -m http.server 8000http://localhost:8000/news.html