rewrite the script to not depend on jQuery, so that it can be run as
soon as possible.
Also switch to use localstorage instead of cookies, which is a more
suitable mechanism for this, and use the same HTML include as was
used on the landing-page for the whole site.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
From the script's repository: https://github.com/wilddeer/stickyfill
> Stickyfill did a good job while the browsers were implementing position: sticky
> support. You can now safely use stickies without a polyfill, all modern browsers
> support them natively:
>
> https://caniuse.com/?search=position%3Asticky
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
There's no need to traverse the whole TOC if the URL matches
the current URL.
Also some small cleaning up / refactoring.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Looks like removing the front-matter in f17ebae568
caused the output to break, resulting in a JavaScript error.
Looking at where this file was used, it turned out that it was loaded, but
never used anywhere.
This commit removes the remaining parts of the glossary search functionality,
which was not used.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This helps keeping the currently selected menu item into
view on pages that have many menu-items (such as the docker
engine CLI reference)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* rough pass at tabs, jsonification
* GHPages 147, authoring YML, sitemap via plugin, working JS
* Update Gemfile
* Removing dk.rb artifact
* Simplifying authoring YML even more
* More YML simplification
* Remove jekyll-seo -- even more perf gain
* Glossary support
* Collections support
* Incremental off; GH Pages 172 gets build time to 50 seconds
* Simplify both left and right sidebars
- Rewrite the sidebars to use the same CSS class instead of having two
very similar classes. This involves removing all affix related
attributes and functionality from the sidebars and replaced them with
`position: sticky`.
- The table of content elements should not be floated
- Removed unused CSS rules related to the sidebars
- Remove JavaScript used to resize the sidebars
* Improve the mobile menu to be fixed
- Simply JS used to hide/display the navigation bar on mobile viewports
- The mobile menu should be fixed so it can be viewable from the bottom
of the page. Before this change, you would have to scroll up to see
the menu that `position: absolute`
* Fix disappearing top navbar on homepage
- Change the calculation of the affix offset for the navbar on the home
page to ensure the navbar never leaves the viewport. This change also
takes into account the change of how the sidebars' offsets are used
* Fix auto scrolling on overflow
* Add polyfill for 'position: sticky' on IE
* Fix hamburger menu at incorrect breakpoint
* Fix left nav hidden after expanding from mobile
If you expand and collapse the left nav while on mobile and expand to a
desktop view, the left nav would be hidden; this has been fixed
* Unify navbar on homepage with rest of website