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

Toggleable Sidebar #34

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Toggleable Sidebar #34

wants to merge 2 commits into from

Conversation

rrcobb
Copy link
Contributor

@rrcobb rrcobb commented Nov 3, 2022

Issue: #32
Ref: #33

Adds a button to hide / show the sidebar.

  • Button is unobtrusive, it's just ☰ (U+2630)with a little padding
  • For screens < 1080px, sidebar defaults to closed
  • The js is a little inline script tag, should be easy to find / modify if anyone has a bright idea
  • The CSS is a little cute; it uses a negative transform to move the sidebar away so that it can have a transition.

This PR is stacked on top of the fixed-width sidebar PR. Compare just the diff that adds the JS

@gvwilson
Copy link
Owner

gvwilson commented Nov 3, 2022

I like the toggleable sidebar, but other people have suggested stacking the ToC on top of the content for mobile devices; I've also made a few changes to your changes to mccole.css (thanks for those) that may introduce some conflicts. I'll take another look at this one tomorrow - thank you for submitting it.

@gvwilson
Copy link
Owner

I've pushed changes that move the navigation to the top of the page for narrow devices - please check it out. If anyone has more thoughts on toggling, please let me know.

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.

None yet

2 participants