Files
dhcp-dns-manager/web/static/css/style.css
T
CNBUGS AI 8ad4c3576d Fix DHCP client unable to get IP and config not persisting
- Fixed verifyAssignment being too strict for new clients
- Fixed parseRequestedIP string conversion bug
- Fixed response sent to 0.0.0.0 instead of broadcast address
- Added SO_BROADCAST support for UDP socket
- Fixed session persistence after page refresh (localStorage)
- Added in-memory session store for auth middleware
- Added config reloader so DHCP server picks up web UI changes dynamically
2026-04-24 16:03:54 +08:00

304 sor
4.4 KiB
CSS

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: #f5f5f5;
color: #333;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
header {
background: #2c3e50;
color: white;
padding: 20px;
margin-bottom: 20px;
border-radius: 8px;
}
header h1 {
margin-bottom: 15px;
}
nav {
display: flex;
gap: 15px;
flex-wrap: wrap;
}
nav a {
color: white;
text-decoration: none;
padding: 8px 16px;
border-radius: 4px;
background: rgba(255,255,255,0.1);
}
nav a:hover {
background: rgba(255,255,255,0.2);
}
section {
background: white;
padding: 20px;
margin-bottom: 20px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
h2 {
margin-bottom: 20px;
color: #2c3e50;
}
h3 {
margin-bottom: 15px;
color: #34495e;
}
/* Login Form */
#loginForm {
max-width: 400px;
display: flex;
flex-direction: column;
gap: 15px;
}
input, select {
padding: 10px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 14px;
}
button {
padding: 10px 20px;
background: #3498db;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 14px;
}
button:hover {
background: #2980b9;
}
/* Stats */
.stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 20px;
}
.stat-card {
background: #3498db;
color: white;
padding: 20px;
border-radius: 8px;
text-align: center;
}
.stat-card h3 {
color: white;
margin-bottom: 10px;
font-size: 14px;
}
.stat-card p {
font-size: 36px;
font-weight: bold;
}
/* Status Grid */
.status-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 15px;
}
.status-item {
padding: 15px;
background: #f8f9fa;
border-radius: 4px;
}
.status-label {
display: block;
font-size: 14px;
color: #666;
margin-bottom: 5px;
}
.status-value {
font-size: 18px;
font-weight: bold;
color: #27ae60;
}
/* Info Grid */
.info-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 15px;
}
.info-item {
padding: 15px;
background: #f8f9fa;
border-radius: 4px;
}
.info-label {
display: block;
font-size: 14px;
color: #666;
margin-bottom: 5px;
}
.info-value {
font-size: 18px;
font-weight: bold;
color: #2c3e50;
}
/* Tables */
table {
width: 100%;
border-collapse: collapse;
margin-top: 15px;
}
th, td {
padding: 12px;
text-align: left;
border-bottom: 1px solid #ddd;
}
th {
background: #f8f9fa;
font-weight: 600;
}
tr:hover {
background: #f8f9fa;
}
/* Panels */
.panel {
margin-bottom: 30px;
}
/* Form Styles */
.form-row {
margin-bottom: 15px;
}
.form-row label {
display: block;
margin-bottom: 5px;
font-weight: 500;
color: #34495e;
}
.form-row input[type="text"],
.form-row input[type="number"] {
width: 100%;
}
.form-row input[type="checkbox"] {
width: auto;
margin-right: 10px;
}
/* Utility */
.hidden {
display: none;
}
/* Pool Stats */
.pool-stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 15px;
margin-bottom: 15px;
}
.stat-item {
padding: 15px;
background: #f8f9fa;
border-radius: 4px;
}
.stat-label {
display: block;
font-size: 14px;
color: #666;
margin-bottom: 5px;
}
.stat-value {
font-size: 18px;
font-weight: bold;
color: #2c3e50;
}
/* Pool Bar */
.pool-bar {
height: 24px;
background: #e9ecef;
border-radius: 12px;
overflow: hidden;
margin-top: 10px;
}
.pool-bar-fill {
height: 100%;
background: linear-gradient(90deg, #27ae60, #2ecc71);
border-radius: 12px;
transition: width 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 12px;
font-weight: bold;
min-width: 30px;
}
/* Client Status */
.status-active {
color: #27ae60;
font-weight: bold;
}
.status-expired {
color: #e74c3c;
font-weight: bold;
}
/* Responsive */
@media (max-width: 768px) {
.stats {
grid-template-columns: 1fr;
}
.status-grid,
.info-grid {
grid-template-columns: 1fr;
}
nav {
flex-direction: column;
}
}