web: start: add sliding menu

Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
GnomeZworc 2026-06-03 23:54:41 +02:00
commit d4282353e7
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632
4 changed files with 159 additions and 22 deletions

View file

@ -253,10 +253,15 @@ if [[ "$CHECK_ONLY" == false ]]; then
NAV_ENTRIES=$(jq -n \
--argjson menu "$menu_json" \
--argjson pages "$PAGE_ENTRIES" \
'[ $menu[] |
'def resolve($pages):
. as $r | $pages[] | select(.route == $r) | { label, href: ("#/" + .route), icon };
[ $menu[] |
if type == "string"
then (. as $r | $pages[] | select(.route == $r) |
{ label, href: ("#/" + .route), icon })
then resolve($pages)
elif .type == "group"
then { type: "group", label: .label, icon: (.icon // ""),
children: [ .children[]? |
if type == "string" then resolve($pages) else . end ] }
else .
end
]')