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

Patrick Kollitsch
yesterday b94950f88994c005ddcd5e71531a288a156cae30
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 09:03 +0100
commitb94950f88994c005ddcd5e71531a288a156cae30
tree 9fc9abeb3bd892795785e9a957fc22a61e2c5888 tree | zip | gz
parent d70da7534fa01bdee1486d27ed23d62a1ea7ef16 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