Skip to content

Add left sidebar navigation to news page#205

Open
weng271190436 wants to merge 1 commit intoopenworm:masterfrom
weng271190436:fix/issue-203-news-sidebar
Open

Add left sidebar navigation to news page#205
weng271190436 wants to merge 1 commit intoopenworm:masterfrom
weng271190436:fix/issue-203-news-sidebar

Conversation

@weng271190436
Copy link
Copy Markdown

@weng271190436 weng271190436 commented Apr 11, 2026

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

  • Changed layout from span12 to span3 (sidebar) + span9 (content)
  • Added #news-nav sidebar element with loading spinner
  • Added missing jquery.pjax.js include

js/main.js

  • Updated loadFullNewsFeed() to populate the sidebar nav with clickable dates
  • Each date links to an anchor on the corresponding article
  • Gracefully handles case where sidebar doesn't exist (backwards compatible)

Screenshots

The sidebar shows article dates (e.g. "Apr 5, 2026") — clicking scrolls to that article.

Testing

  1. python3 -m http.server 8000
  2. Open http://localhost:8000/news.html
  3. Verify sidebar appears on left with dates
  4. Click a date — page scrolls to that article
image

- 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
@pgleeson
Copy link
Copy Markdown
Member

Thanks for this @weng271190436. Did you say this also fixes the issue at #202? I'm still getting that issue testing this locally...
Screenshot 2026-04-15 at 14 14 56

@weng271190436
Copy link
Copy Markdown
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

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.

Reformat news page with left clickable column

2 participants