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

Patrick Kollitsch
13 hours ago 9252878095af8dd19cb9d84e2ea212b2943791fd
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 12:51 +0100
commit9252878095af8dd19cb9d84e2ea212b2943791fd
tree f5f60ae2c6812d276aef1acdf869f82eaff388d5 tree | zip | gz
parent 4ac021400c34ad0df551de8e02992ec6e7fa0496 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