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

Patrick Kollitsch
18 hours ago 992d7bdc01d7eaf495a582eb3dcb7badf9da1e8e
refs
author Patrick Kollitsch <davidsneighbourdev+gh@gmail.com>
Thursday, November 19, 2026 08:55 +0100
committer Patrick Kollitsch <davidsneighbourdev+gh@gmail.com>
Friday, November 20, 2026 00:10 +0100
commit992d7bdc01d7eaf495a582eb3dcb7badf9da1e8e
tree 8dc2b1038541af9f6befa7332888ecd1412b1023 tree | zip | gz
parent fddc0ed34fc8dfa14b769369f5faccfcbf5a3cef 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