doc: sphinx: Tweak page scroll behavior to maximize real estate

This picks up custom javscript from Godot documentation and uses CSS
rules we already had in place (only they were not used) to tweak the
page scroll behavior. As folks scroll down the page, the Zephyr logo in
the top right corner gradually disappears, leaving more room for the
navigation menu.

Also, when scrolling in the navigation pane, the UI there is slightly
adapted to make it more clear that the search box is "fixed", plus,
when one reaches the bottom of the navigation tree and continues
scrolling, the "main" page scrolls down.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit is contained in:
Benjamin Cabé 2023-12-05 15:17:47 +01:00 committed by Anas Nashif
commit 29b19bcf8b
2 changed files with 123 additions and 0 deletions

View file

@ -339,4 +339,5 @@ linkcheck_anchors = False
def setup(app):
# theme customizations
app.add_css_file("css/custom.css")
app.add_js_file("js/custom.js")
app.add_js_file("js/dark-mode-toggle.min.mjs", type="module")