2025-12-10 10:42:29 -05:00

214 lines
3.7 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Strandcast Monitor</title>
<style>
/* --- RESET & BASICS --- */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
/* Unified Font Stack */
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
background: #0a0a0a;
color: #eee;
min-height: 100vh;
display: flex;
flex-direction: column;
}
/* --- NAVIGATION BAR --- */
.navbar {
background-color: #111;
border-bottom: 1px solid #333;
padding: 15px 20px;
display: flex;
justify-content: space-between;
align-items: center;
}
.navbar .brand {
color: #00d2ff;
font-size: 18px;
font-weight: bold;
text-decoration: none;
}
.nav-links a {
color: #888;
text-decoration: none;
margin-left: 20px;
font-size: 14px;
padding: 5px;
}
.nav-links a:hover {
color: #fff;
}
.nav-links a.active {
color: #fff;
font-weight: bold;
border-bottom: 2px solid #00d2ff;
}
/* --- DASHBOARD --- */
h1 {
text-align: center;
margin: 20px 0;
font-weight: 300;
font-size: 24px;
/* Matched to index.html */
}
#dashboard {
padding: 10px 20px;
flex: 1;
overflow-x: hidden;
width: 100%;
max-width: 1200px;
margin: 0 auto;
}
.stream-container {
/* Matched to .card in index.html */
background: #161616;
border: 1px solid #333;
border-radius: 12px;
padding: 20px;
margin-bottom: 20px;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}
.stream-title {
color: #00d2ff;
font-size: 14px;
margin-bottom: 15px;
font-weight: bold;
text-transform: uppercase;
letter-spacing: 1px;
border-bottom: 1px solid #333;
padding-bottom: 8px;
}
/* The scrolling wrapper */
.chain-wrapper {
overflow-x: auto;
-webkit-overflow-scrolling: touch;
padding-bottom: 10px;
}
.chain-visual {
display: flex;
align-items: center;
width: max-content;
}
/* The Nodes */
.node {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 90px;
height: 70px;
border-radius: 8px;
/* Softer corners */
background: #222;
border: 1px solid #444;
position: relative;
margin: 0 4px;
transition: all 0.2s;
}
.node-id {
font-size: 11px;
font-weight: bold;
margin-bottom: 4px;
color: #fff;
}
.node-score {
font-size: 16px;
font-weight: bold;
}
.node-role {
font-size: 9px;
color: #888;
text-transform: uppercase;
margin-top: 4px;
letter-spacing: 0.5px;
}
/* Health Colors */
.healthy {
border-color: #00ff88;
color: #00ff88;
box-shadow: 0 0 10px rgba(0, 255, 136, 0.05);
}
.meh {
border-color: #ffaa00;
color: #ffaa00;
}
.weak {
border-color: #ff3333;
color: #ff3333;
}
/* Arrows */
.arrow {
font-size: 16px;
color: #555;
margin: 0 8px;
}
/* --- MOBILE MEDIA QUERY --- */
@media (max-width: 600px) {
.navbar {
flex-direction: column;
padding: 10px;
}
.navbar .brand {
margin-bottom: 10px;
}
.nav-links a {
margin: 0 10px;
}
#dashboard {
padding: 10px;
}
h1 {
font-size: 20px;
}
}
</style>
</head>
<body>
<nav class="navbar">
<a href="/" class="brand">Strandcast</a>
<div class="nav-links">
<a href="/">Streams</a>
<a href="/monitor.html" class="active">Monitor</a>
</div>
</nav>
<h1>Network Status</h1>
<div id="dashboard" style="text-align: center; color: #555;">Connecting...</div>
<script src="/socket.io/socket.io.js"></script>
<script src="monitor.js"></script>
</body>
</html>