Open ekstroem opened 8 years ago
Okay. I did a bit of tweaking and seems to have it almost working. You can see a working example here. There's still a few corrections to be made to make it blend in completely but it's somewhat acceptable as it is.
I can write it up in case anyone else would be of interest.
I haven't had time to look at this, but at first glance this seems like a good idea, particularly for the smaller device width use cases. If it can be easily added I will add it to the repo.
Want me to try to extract the necessary bits and put them into a pull request?
That would be great if it wont chew up too much of your time.
Thanks
Sent using 100% all-natural biodynamic electrons
On Apr 4, 2016, at 7:17 PM, Claus Ekstrøm notifications@github.com wrote:
Want me to try to extract the necessary bits and put them into a pull request?
— You are receiving this because you commented. Reply to this email directly or view it on GitHub
This is not a bug but more like a feature/enhancement request. I'm still trying to tweak my pages and have run into this minor issue:
Currently the navigation bar is created from the
site.pages
and while the tex size scales with device/media size it is not uncommon to get something that is wider that a single line if there are more than a few pages in the menu.If the text width becomes too large then I'd like either all the menu items (besides the site name) to collapse or just the ones that there aren't room for.
For starters I moved the navigation part to a separate file
_includes/nav.html
(shown below)where the menu items are items in an unordered list. Now I found some previous code to work as a collapsible navbar. Here's the part of the script that does all the computation with the width of the menu bar entries and moves them back and forth between being hidden (included as part of the footer).
and then there's the corresponding css file information (included in the header).
Okay. So far so good. Then I want to fix the
nav.html
so it matches the collapsible code (forget about the aesthetics here for now - it's not a beauty but that could be fixed). I add the ID's tonav.html
which makes the collapsible navbar function. Sort or anyway. The width calculation is not working perfectly and the menu item pops in and out of existence until there's two items in the hidden part of the menu. Can anyone help with this and/or would help make it blend in with the rest of the Tufte-CSS format?
I can set up a (version) of the page so you can see what is wrong, but I haven't pushed it to the official server since it isn't working.