135 lines
3.2 KiB
HTML
135 lines
3.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>two — dashboard</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;
|
|
}
|
|
|
|
#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>
|
|
|
|
<login-gate></login-gate>
|
|
<api-client></api-client>
|
|
|
|
<header>
|
|
<h1>two</h1>
|
|
<span>network orchestrator</span>
|
|
<div class="spacer"></div>
|
|
<logout-button></logout-button>
|
|
</header>
|
|
|
|
<div class="layout">
|
|
<side-nav></side-nav>
|
|
|
|
<main>
|
|
<div id="error"></div>
|
|
<date-display></date-display>
|
|
|
|
<!-- Dev test: open stacked panels -->
|
|
<div style="display:flex;gap:8px;margin-top:8px;">
|
|
<button onclick="openTestPanel('Panel A', '400px')"
|
|
style="background:#313244;border:1px solid #45475a;border-radius:6px;
|
|
padding:7px 14px;color:#89b4fa;font-size:13px;cursor:pointer;">
|
|
Open panel A
|
|
</button>
|
|
<button onclick="openTestPanel('Panel B', '520px')"
|
|
style="background:#313244;border:1px solid #45475a;border-radius:6px;
|
|
padding:7px 14px;color:#a6e3a1;font-size:13px;cursor:pointer;">
|
|
Open panel B
|
|
</button>
|
|
</div>
|
|
</main>
|
|
</div>
|
|
|
|
<script type="module">
|
|
import './core/registry.js'
|
|
import { SidePanel } from './components/side-panel/side-panel.js'
|
|
|
|
window.openTestPanel = (title, width) => {
|
|
SidePanel.open({
|
|
title,
|
|
width,
|
|
content: `<p style="color:#a6adc8;font-size:14px;line-height:1.6">
|
|
Contenu du panneau <strong style="color:#cdd6f4">${title}</strong>.<br>
|
|
Largeur : ${width}.<br><br>
|
|
Tu peux ouvrir plusieurs panneaux — ils s'empilent vers la gauche.
|
|
Ferme avec ✕, Échap, ou en cliquant le fond.
|
|
</p>`,
|
|
})
|
|
}
|
|
|
|
window.addEventListener('unhandledrejection', e => {
|
|
const el = document.getElementById('error')
|
|
el.style.display = 'block'
|
|
el.textContent = `Error: ${e.reason?.message ?? e.reason}`
|
|
})
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|