syn/exemple/navigation/sources/index.html
GnomeZworc 1891ba3d68
clean exemple/navigation to a minimal working example
- index.html: fix title and typo, add missing #error div
- config.json: replace project-specific keys with generic api_url
- core/menu.js: remove Voltalis mock data, leave commented usage pattern
- dashboard.js: move logic to init(), Custom Element is a plain shell
- dashboard.css: add real styles, remove placeholder comment
- manifest.json: drop unused version field
- config.yml: fix web/vendor comment → sources/vendor

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2026-06-07 15:09:02 +02:00

113 lines
2.4 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Navigation — Syn exemple</title>
<link rel="icon" type="image/svg+xml" href="./favicon.svg">
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
background: #181825;
color: #cdd6f4;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
height: 100vh;
display: flex;
flex-direction: column;
}
header {
display: flex;
align-items: center;
gap: 12px;
padding: 14px 24px;
border-bottom: 1px solid #313244;
background: #1e1e2e;
flex-shrink: 0;
}
header h1 {
font-size: 17px;
font-weight: 600;
color: #89b4fa;
letter-spacing: 0.02em;
}
header span {
font-size: 12px;
color: #6c7086;
}
header .spacer {
flex: 1;
}
.layout {
display: flex;
flex: 1;
overflow: hidden;
}
main {
flex: 1;
padding: 28px;
overflow-y: auto;
display: flex;
flex-wrap: wrap;
align-content: flex-start;
gap: 20px;
}
/* Mobile: side-nav gère sa propre géométrie via inline styles (JS) */
@media (max-width: 768px) {
main { padding: 16px; }
}
#error {
display: none;
background: #313244;
border: 1px solid #f38ba8;
border-radius: 8px;
padding: 14px 18px;
color: #f38ba8;
font-family: monospace;
font-size: 13px;
width: 100%;
}
</style>
</head>
<body>
<header>
<h1>Syn</h1>
<span>exemple navigation</span>
<div class="spacer"></div>
</header>
<div class="layout">
<side-nav></side-nav>
<main></main>
</div>
<div id="error"></div>
<script type="module">
window.addEventListener('unhandledrejection', e => {
const el = document.getElementById('error')
if (el) {
el.style.display = 'block'
el.textContent = `Error: ${e.reason?.message ?? e.reason}`
}
})
// Sequential: registry defines all custom elements,
// then router renders the current route.
await import('./core/registry.js')
await import('./core/router.js')
// Non-blocking: populates dynamic menu groups after routing.
import('./core/menu.js')
</script>
</body>
</html>