bookdown icon indicating copy to clipboard operation
bookdown copied to clipboard

[FR] Make the "On this page" menu in bs4_book accessible on mobile

Open jtbayly opened this issue 1 year ago • 1 comments

There is no way to find out what other sections are on the page when using a mobile device. The whole "On this page" section just disappears with no way to show it. I'd love it if we could get either a right and left hamburger menu to show both of the menus, or alternately if we could do what Discourse does and show the reading progress for the current page on screen, as a link that says "On this page" that you could click and it would slide in that menu.

Here's a screenshot showing what I'm talking about:

I'm imagining something like the blue bar at the bottom showing reading progress in blue, and the text 45/48. Replace the numbers with "On this page" (because unnumbered sections are possible). And if somebody clicks on it, display the menu.

jtbayly avatar Sep 01 '22 20:09 jtbayly

Thanks for sharing this.

CSS for mobile development is not easy - I don't have a lot of experience. Probably Boostrap contains what is needed for that. I wonder if we can detect and say mobile-only. 🤔 I need to learn about this more

i'll mark as feature. If anyone wants to give it a try please feel free to play with it and send a PR

cderv avatar Sep 02 '22 10:09 cderv