Add category menu row to the header#11
Merged
Merged
Conversation
Add a second header row listing the theme categories (Power & Politics, Identity & Belonging, etc.) as quick links. Each links to /?theme=<Category>#browse, and BrowseSection now reads the ?theme= query param on mount to land on a pre-filtered grid. Bump the guide page's sticky sub-nav offset (top-12 -> top-[76px]) to account for the now two-row header.
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.
Add a category menu row to the header
Per the request for a second/third row of category menus as part of the header, this adds a second header row that lists the theme categories as quick links.
Changes
Header.tsx— a new "Categories" row beneath the main nav, listing every theme category (Power & Politics, Identity & Belonging, Morality & Justice, Love & Family, Race & Class, Dreams & Ambition, Freedom & Society, Science & Mortality). On narrow screens it scrolls horizontally. The list is sourced fromallThemes()so it stays in sync with the filter bar./?theme=<Category>#browse.BrowseSection.tsx— reads the?theme=query param on mount (client-side) and pre-selects that theme, so clicking a category lands you on a filtered grid at the browse section. Invalid params are ignored.books/[slug]/page.tsx— bumped the sticky in-page sub-nav offset (top-12→top-[76px]) so it clears the now two-row header.Verify
npm run buildsucceeds (50 routes export); the PRbuildCI job runs it too.?theme=links render in the header on both the home page and guide pages.https://claude.ai/code/session_01Egnnw9v4T3ppsAQveFnijo
Generated by Claude Code