feat(web-app-littlejs): add JS submenu support, left-expand menus, improve headline & cleanup examples

This update introduces full JavaScript-based nested submenu handling for the
Apps menu, enabling reliable click-based toggling without interference from
Bootstrap’s native dropdown logic. Submenus now expand to the left via custom
CSS and no longer require dropstart or data-bs-toggle attributes.

Changes include:
- Add javascript feature flag and enable inline eval in CSP
- Add javascript.js implementing custom submenu toggle logic
- Add CSS rules for left-expanding nested dropdown menus
- Replace hardcoded headline with LITTLEJS_HEADLINE variable
- Modernize “Play” → “Start” labels in cards
- Remove unused/legacy examples from examples.yml (commented out, not deleted)
- Cleanup nav_top.html.j2 to remove conflicting Bootstrap attributes

Conversation reference:
https://chatgpt.com/share/6928b4c7-19ec-800f-a087-9af304ef4ed9
This commit is contained in:
2025-11-27 21:30:15 +01:00
parent 6abd4b0373
commit 6fda85788a
6 changed files with 186 additions and 146 deletions

View File

@@ -1,8 +1,8 @@
<main class="container py-4">
<header class="mb-4">
<h1 class="h3 mb-2">LittleJS Examples &amp; Games</h1>
<h1 class="h3 mb-2">{{ LITTLEJS_HEADLINE }}</h1>
<p class="text-secondary small mb-0">
Browse and launch LittleJS demos rendered dynamically through Infinito.Nexus.
Browse and launch LittleJS demos rendered dynamically through {{ SOFTWARE_NAME }}.
</p>
</header>
@@ -37,7 +37,7 @@
<div class="mt-auto">
<a href="{{ href }}" class="btn btn-primary app-footer-btn">
<i class="{{ ex.icon }} me-2"></i>Play {{ ex.name }}
<i class="{{ ex.icon }} me-2"></i>Start {{ ex.name }}
</a>
</div>