Repository navigation
Add a switch to open and close the page TOC - #108
Merged
Merged
Conversation
The $ CONTENTS title is now a button. Closing the panel shrinks it to a [+] switch and gives the content the full width. The state is saved in localStorage and applied before first paint, and the reading position is kept when the content rewraps. Screens under 900px start closed when no state is saved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fixed 280px column left about 30px for the content on a phone, so opening the TOC there made the page unreadable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
$ CONTENTStitle is now a button with a[-]/[+]marker. Closing the panel shrinks it to[+], and the content widens from 780px to 1058px at a 1366px viewport.localStorageand applies across pages. A small script in<head>setshtml.toc-closedbefore first paint, so the sidebar does not flash on load.Pages without the TOC (
toc: false) are unchanged.Verification
bundle exec jekyll buildsucceeds.Known issue, not addressed here
At 390px the header nav still overflows and causes horizontal scrolling. This comes from the header, not this change.
🤖 Generated with Claude Code