0a18b94d84
- Flask + SQLite web app with user authentication - Zone management: create/delete zones, edit raw zone files - Record management: add/delete A/AAAA/CNAME/MX/TXT/NS/PTR/SRV/CAA records - Service control: start/stop/restart/reload BIND via systemctl/rndc - Configuration editor: edit named.conf.options/local with syntax validation - DNS query testing: online dig tool - Audit log: all operations logged with user/timestamp - BIND9 backend, listening on port 53
541 lines
12 KiB
CSS
541 lines
12 KiB
CSS
/* ═══ DNS Web Manager - Style Sheet ═══ */
|
|
|
|
:root {
|
|
--primary: #2563eb;
|
|
--primary-dark: #1d4ed8;
|
|
--success: #16a34a;
|
|
--warning: #d97706;
|
|
--danger: #dc2626;
|
|
--info: #0891b2;
|
|
--bg: #f8fafc;
|
|
--card-bg: #ffffff;
|
|
--border: #e2e8f0;
|
|
--text: #1e293b;
|
|
--text-muted: #64748b;
|
|
--text-light: #94a3b8;
|
|
--code-bg: #1e293b;
|
|
--code-text: #e2e8f0;
|
|
--badge-a: #3b82f6;
|
|
--badge-cname: #8b5cf6;
|
|
--badge-mx: #06b6d4;
|
|
--badge-txt: #f59e0b;
|
|
--badge-ns: #10b981;
|
|
--badge-soa: #ec4899;
|
|
--badge-ptr: #f97316;
|
|
--radius: 8px;
|
|
--shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
|
|
--shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
|
|
}
|
|
|
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
line-height: 1.6;
|
|
font-size: 14px;
|
|
}
|
|
|
|
/* ─── Navbar ─── */
|
|
.navbar {
|
|
background: var(--card-bg);
|
|
border-bottom: 1px solid var(--border);
|
|
padding: 0 24px;
|
|
height: 56px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
box-shadow: var(--shadow);
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 100;
|
|
}
|
|
|
|
.nav-brand {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
font-size: 18px;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.nav-brand a { color: var(--text); text-decoration: none; }
|
|
.nav-brand .logo { font-size: 24px; }
|
|
|
|
.nav-links {
|
|
display: flex;
|
|
gap: 4px;
|
|
}
|
|
|
|
.nav-links a {
|
|
padding: 8px 16px;
|
|
border-radius: 6px;
|
|
color: var(--text-muted);
|
|
text-decoration: none;
|
|
font-weight: 500;
|
|
transition: all 0.15s;
|
|
}
|
|
|
|
.nav-links a:hover { background: var(--bg); color: var(--text); }
|
|
.nav-links a.active { background: var(--primary); color: white; }
|
|
|
|
.nav-user {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.nav-user > span {
|
|
color: var(--text-muted);
|
|
font-size: 13px;
|
|
}
|
|
|
|
/* ─── Container ─── */
|
|
.container {
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
padding: 24px;
|
|
}
|
|
|
|
/* ─── Flash messages ─── */
|
|
.flash-messages {
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.flash {
|
|
padding: 10px 16px;
|
|
border-radius: var(--radius);
|
|
margin-bottom: 8px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.flash-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
|
|
.flash-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
|
|
.flash-warning { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
|
|
|
|
/* ─── Buttons ─── */
|
|
.btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 8px 18px;
|
|
border: none;
|
|
border-radius: 6px;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
text-decoration: none;
|
|
transition: all 0.15s;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.btn-primary { background: var(--primary); color: white; }
|
|
.btn-primary:hover { background: var(--primary-dark); }
|
|
.btn-success { background: var(--success); color: white; }
|
|
.btn-success:hover { background: #15803d; }
|
|
.btn-warning { background: var(--warning); color: white; }
|
|
.btn-warning:hover { background: #b45309; }
|
|
.btn-danger { background: var(--danger); color: white; }
|
|
.btn-danger:hover { background: #b91c1c; }
|
|
.btn-info { background: var(--info); color: white; }
|
|
.btn-info:hover { background: #0e7490; }
|
|
.btn-secondary { background: #e2e8f0; color: var(--text); }
|
|
.btn-secondary:hover { background: #cbd5e1; }
|
|
|
|
.btn-block { width: 100%; justify-content: center; }
|
|
.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 4px; }
|
|
|
|
/* ─── Cards ─── */
|
|
.card {
|
|
background: var(--card-bg);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
box-shadow: var(--shadow);
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.card-header {
|
|
padding: 12px 20px;
|
|
border-bottom: 1px solid var(--border);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.card-header h2 {
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.card-body { padding: 20px; }
|
|
|
|
/* ─── Tables ─── */
|
|
.table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
}
|
|
|
|
.table th, .table td {
|
|
padding: 10px 12px;
|
|
text-align: left;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
.table th {
|
|
font-weight: 600;
|
|
color: var(--text-muted);
|
|
font-size: 12px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.table tbody tr:hover { background: #f8fafc; }
|
|
|
|
.table-compact th, .table-compact td {
|
|
padding: 6px 12px;
|
|
}
|
|
|
|
/* ─── Badges ─── */
|
|
.badge {
|
|
display: inline-block;
|
|
padding: 2px 8px;
|
|
border-radius: 4px;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
background: var(--text-light);
|
|
color: white;
|
|
}
|
|
|
|
.badge-master { background: var(--success); }
|
|
.badge-slave { background: var(--info); }
|
|
.badge-A { background: var(--badge-a); }
|
|
.badge-AAAA { background: var(--badge-a); }
|
|
.badge-CNAME { background: var(--badge-cname); }
|
|
.badge-MX { background: var(--badge-mx); }
|
|
.badge-TXT { background: var(--badge-txt); }
|
|
.badge-NS { background: var(--badge-ns); }
|
|
.badge-SOA { background: var(--badge-soa); }
|
|
.badge-PTR { background: var(--badge-ptr); }
|
|
.badge-SRV { background: var(--badge-ptr); }
|
|
.badge-CAA { background: var(--badge-cname); }
|
|
.badge-ok { background: var(--success); }
|
|
.badge-err { background: var(--danger); }
|
|
|
|
/* ─── Forms ─── */
|
|
.form-group {
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.form-group label {
|
|
display: block;
|
|
margin-bottom: 4px;
|
|
font-weight: 500;
|
|
font-size: 13px;
|
|
color: var(--text);
|
|
}
|
|
|
|
.form-group input,
|
|
.form-group select,
|
|
.form-group textarea {
|
|
width: 100%;
|
|
padding: 8px 12px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
font-size: 14px;
|
|
font-family: inherit;
|
|
transition: border-color 0.15s;
|
|
}
|
|
|
|
.form-group input:focus,
|
|
.form-group select:focus,
|
|
.form-group textarea:focus {
|
|
outline: none;
|
|
border-color: var(--primary);
|
|
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
|
|
}
|
|
|
|
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
|
|
.form-hints { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
|
|
.form-hints p { font-size: 12px; color: var(--text-muted); }
|
|
.required { color: var(--danger); }
|
|
|
|
.form-row {
|
|
display: flex;
|
|
gap: 12px;
|
|
align-items: flex-end;
|
|
}
|
|
|
|
.form-row .form-group { flex: 1; margin-bottom: 0; }
|
|
.form-actions-vertical { align-self: flex-end; padding-bottom: 0 !important; }
|
|
|
|
.form-actions {
|
|
display: flex;
|
|
gap: 8px;
|
|
margin-top: 16px;
|
|
}
|
|
|
|
/* ─── Dashboard ─── */
|
|
.stats-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, 1fr);
|
|
gap: 16px;
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.stat-card {
|
|
background: var(--card-bg);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
padding: 20px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
.stat-icon {
|
|
font-size: 32px;
|
|
width: 48px;
|
|
height: 48px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: 50%;
|
|
background: var(--bg);
|
|
}
|
|
|
|
.stat-ok { color: var(--success); }
|
|
.stat-err { color: var(--danger); }
|
|
|
|
.stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
|
|
.stat-value { font-size: 24px; font-weight: 700; }
|
|
.stat-value-small { font-size: 13px; font-weight: 600; }
|
|
.stat-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
|
|
|
|
.text-ok { color: var(--success); }
|
|
.text-err { color: var(--danger); }
|
|
|
|
.dashboard-grid {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1.5fr;
|
|
gap: 16px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.service-controls {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.service-note {
|
|
padding: 12px;
|
|
background: #eff6ff;
|
|
border-radius: 6px;
|
|
border: 1px solid #bfdbfe;
|
|
}
|
|
|
|
.service-note p { font-size: 13px; color: #1e40af; margin-bottom: 4px; }
|
|
|
|
/* ─── Login ─── */
|
|
.login-wrap {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
min-height: calc(100vh - 120px);
|
|
}
|
|
|
|
.login-card {
|
|
background: var(--card-bg);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
box-shadow: var(--shadow-md);
|
|
width: 400px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.login-header {
|
|
background: linear-gradient(135deg, var(--primary), var(--primary-dark));
|
|
color: white;
|
|
padding: 32px;
|
|
text-align: center;
|
|
}
|
|
|
|
.login-header h1 { font-size: 24px; margin-bottom: 8px; }
|
|
.login-header p { opacity: 0.9; font-size: 14px; }
|
|
|
|
.login-form { padding: 32px; }
|
|
|
|
.login-hint {
|
|
padding: 16px 32px 32px;
|
|
text-align: center;
|
|
color: var(--text-muted);
|
|
font-size: 12px;
|
|
}
|
|
|
|
.login-hint code {
|
|
background: var(--bg);
|
|
padding: 2px 6px;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
/* ─── Code editors ─── */
|
|
.code-editor {
|
|
font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
|
|
font-size: 13px;
|
|
line-height: 1.5;
|
|
background: var(--code-bg);
|
|
color: var(--code-text);
|
|
border: 1px solid #334155;
|
|
border-radius: 6px;
|
|
padding: 12px;
|
|
resize: vertical;
|
|
tab-size: 4;
|
|
}
|
|
|
|
.config-viewer {
|
|
font-family: monospace;
|
|
font-size: 13px;
|
|
background: var(--code-bg);
|
|
color: var(--code-text);
|
|
padding: 16px;
|
|
border-radius: 6px;
|
|
overflow-x: auto;
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
.query-output {
|
|
font-family: monospace;
|
|
font-size: 13px;
|
|
background: var(--code-bg);
|
|
color: var(--code-text);
|
|
padding: 16px;
|
|
border-radius: 6px;
|
|
overflow-x: auto;
|
|
white-space: pre;
|
|
max-height: 500px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.config-status {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 12px 16px;
|
|
border-radius: var(--radius);
|
|
margin-bottom: 16px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.config-ok { background: #dcfce7; color: #166534; }
|
|
.config-err { background: #fee2e2; color: #991b1b; flex-direction: column; align-items: flex-start; }
|
|
|
|
.config-error {
|
|
font-family: monospace;
|
|
font-size: 12px;
|
|
background: rgba(0,0,0,0.06);
|
|
padding: 8px;
|
|
border-radius: 4px;
|
|
margin-top: 8px;
|
|
width: 100%;
|
|
}
|
|
|
|
/* ─── Page header ─── */
|
|
.page-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.page-header h1 { font-size: 24px; font-weight: 700; }
|
|
|
|
.zone-meta {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
margin-top: 4px;
|
|
}
|
|
|
|
/* ─── Record form ─── */
|
|
.record-form-wrap {
|
|
background: #f8fafc;
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
padding: 16px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.record-form .form-row { flex-wrap: wrap; }
|
|
|
|
/* ─── Query ─── */
|
|
.query-meta {
|
|
display: flex;
|
|
gap: 24px;
|
|
margin-bottom: 12px;
|
|
font-size: 13px;
|
|
}
|
|
|
|
/* ─── Misc ─── */
|
|
.text-muted { color: var(--text-muted); }
|
|
.text-mono { font-family: "JetBrains Mono", monospace; }
|
|
.text-sm { font-size: 12px; }
|
|
|
|
.empty-state {
|
|
text-align: center;
|
|
padding: 40px;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.empty-state p { margin-bottom: 16px; }
|
|
|
|
.pagination {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 12px;
|
|
margin-top: 16px;
|
|
}
|
|
|
|
.page-info { font-size: 13px; color: var(--text-muted); }
|
|
|
|
.footer {
|
|
text-align: center;
|
|
padding: 24px;
|
|
color: var(--text-light);
|
|
font-size: 12px;
|
|
}
|
|
|
|
.footer a { color: var(--primary); text-decoration: none; }
|
|
|
|
.error-page {
|
|
text-align: center;
|
|
padding: 80px 24px;
|
|
}
|
|
|
|
.error-code {
|
|
font-size: 72px;
|
|
font-weight: 800;
|
|
color: var(--danger);
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.error-msg {
|
|
font-size: 18px;
|
|
color: var(--text-muted);
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
/* ─── Responsive ─── */
|
|
@media (max-width: 768px) {
|
|
.navbar { padding: 0 12px; flex-wrap: wrap; height: auto; }
|
|
.nav-links { width: 100%; overflow-x: auto; padding: 4px 0; }
|
|
.stats-grid { grid-template-columns: 1fr 1fr; }
|
|
.dashboard-grid { grid-template-columns: 1fr; }
|
|
.form-row { flex-direction: column; }
|
|
.page-header { flex-direction: column; gap: 12px; align-items: flex-start; }
|
|
}
|