mirror of https://github.com/theNewDynamic/gohugo-theme-ananke.git

Patrick Kollitsch
14 hours ago 444e11a571ed79eface9273f749b754e1dbc14f6
refs
author Patrick Kollitsch <davidsneighbourdev+gh@gmail.com>
Thursday, November 19, 2026 08:55 +0100
committer Patrick Kollitsch <davidsneighbourdev+gh@gmail.com>
Thursday, November 19, 2026 08:55 +0100
commit444e11a571ed79eface9273f749b754e1dbc14f6
tree 55b3d170f775416bb913473e8667ce9194b19e21 tree | zip | gz
parent e23701d6088e1585de70cb36c45f258539ce9027 view | diff
feat(layouts): add disclosure script for header submenus

Add a dependency-free inline script, included only if a `main` menu entry has children and independent of `copy_code`. It reveals the toggle buttons, collapses the submenus, keeps one submenu open at a time, and closes it on Escape (focus returns to the button), on a click outside, and when keyboard focus leaves the item. It aligns the dropdown to the other edge when it would leave the viewport.
1 files modified
106 ■■■■■ changed files
layouts/_partials/site-scripts.html 106 ●●●●● diff | view | raw | blame | history