
✨ Features: • HTTP/1.1, HTTP/2, and HTTP/3 support with proper architecture • Reverse proxy with advanced load balancing (round-robin, least-conn, etc.) • Static file serving with content-type detection and security • Revolutionary file sync system with WebSocket real-time updates • Enterprise-grade health monitoring (active/passive checks) • TLS/HTTPS with ACME/Let's Encrypt integration • Dead simple JSON configuration + full Caddy v2 compatibility • Comprehensive test suite (72 tests passing) 🏗️ Architecture: • Rust-powered async performance with zero-cost abstractions • HTTP/3 as first-class citizen with shared routing core • Memory-safe design with input validation throughout • Modular structure for easy extension and maintenance 📊 Status: 95% production-ready 🧪 Test Coverage: 72/72 tests passing (100% success rate) 🔒 Security: Memory safety + input validation + secure defaults Built with ❤️ in Rust - Start simple, scale to enterprise!
493 lines
8.9 KiB
CSS
493 lines
8.9 KiB
CSS
/* CSS Variables for theming */
|
|
:root {
|
|
--primary-color: #007bff;
|
|
--secondary-color: #6c757d;
|
|
--success-color: #28a745;
|
|
--danger-color: #dc3545;
|
|
--warning-color: #ffc107;
|
|
--info-color: #17a2b8;
|
|
--light-color: #f8f9fa;
|
|
--dark-color: #343a40;
|
|
--border-color: #dee2e6;
|
|
--text-color: #212529;
|
|
--text-muted: #6c757d;
|
|
--background-color: #ffffff;
|
|
--hover-color: #f5f5f5;
|
|
--shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
--border-radius: 4px;
|
|
--font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
}
|
|
|
|
/* Dark mode support */
|
|
@media (prefers-color-scheme: dark) {
|
|
:root {
|
|
--text-color: #ffffff;
|
|
--text-muted: #adb5bd;
|
|
--background-color: #1a1a1a;
|
|
--light-color: #2d3748;
|
|
--border-color: #4a5568;
|
|
--hover-color: #2d3748;
|
|
--shadow: 0 2px 4px rgba(255,255,255,0.1);
|
|
}
|
|
}
|
|
|
|
/* Reset and base styles */
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: var(--font-family);
|
|
color: var(--text-color);
|
|
background-color: var(--background-color);
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.container {
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
padding: 20px;
|
|
}
|
|
|
|
/* Header */
|
|
.header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 20px;
|
|
padding-bottom: 15px;
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
|
|
.header h1 {
|
|
color: var(--primary-color);
|
|
font-size: 1.8rem;
|
|
}
|
|
|
|
.connection-status {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
|
|
.status-disconnected {
|
|
color: var(--danger-color);
|
|
}
|
|
|
|
.status-connected {
|
|
color: var(--success-color);
|
|
}
|
|
|
|
.status-connecting {
|
|
color: var(--warning-color);
|
|
}
|
|
|
|
/* Navigation */
|
|
.breadcrumb {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 20px;
|
|
padding: 10px 15px;
|
|
background-color: var(--light-color);
|
|
border-radius: var(--border-radius);
|
|
border: 1px solid var(--border-color);
|
|
}
|
|
|
|
#current-path {
|
|
font-family: monospace;
|
|
font-weight: bold;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
/* Buttons */
|
|
.btn {
|
|
padding: 8px 16px;
|
|
border: none;
|
|
border-radius: var(--border-radius);
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
transition: all 0.2s ease;
|
|
text-decoration: none;
|
|
display: inline-block;
|
|
}
|
|
|
|
.btn:hover {
|
|
transform: translateY(-1px);
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
.btn-primary {
|
|
background-color: var(--primary-color);
|
|
color: white;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background-color: #0056b3;
|
|
}
|
|
|
|
.btn-secondary {
|
|
background-color: var(--secondary-color);
|
|
color: white;
|
|
}
|
|
|
|
.btn-danger {
|
|
background-color: var(--danger-color);
|
|
color: white;
|
|
}
|
|
|
|
.btn-small {
|
|
padding: 4px 8px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
/* File List */
|
|
.file-list-container {
|
|
background-color: var(--background-color);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: var(--border-radius);
|
|
overflow: hidden;
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
.file-list-header {
|
|
display: grid;
|
|
grid-template-columns: 1fr 100px 150px 120px;
|
|
gap: 15px;
|
|
padding: 15px;
|
|
background-color: var(--light-color);
|
|
font-weight: bold;
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
|
|
.file-list {
|
|
max-height: 600px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.file-item {
|
|
display: grid;
|
|
grid-template-columns: 1fr 100px 150px 120px;
|
|
gap: 15px;
|
|
padding: 12px 15px;
|
|
border-bottom: 1px solid var(--border-color);
|
|
cursor: pointer;
|
|
transition: background-color 0.2s ease;
|
|
}
|
|
|
|
.file-item:hover {
|
|
background-color: var(--hover-color);
|
|
}
|
|
|
|
.file-item.selected {
|
|
background-color: rgba(0, 123, 255, 0.1);
|
|
}
|
|
|
|
.file-name {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.file-icon {
|
|
font-size: 16px;
|
|
}
|
|
|
|
.file-size {
|
|
color: var(--text-muted);
|
|
font-size: 14px;
|
|
}
|
|
|
|
.file-modified {
|
|
color: var(--text-muted);
|
|
font-size: 14px;
|
|
}
|
|
|
|
.file-actions {
|
|
display: flex;
|
|
gap: 5px;
|
|
}
|
|
|
|
.file-actions button {
|
|
padding: 2px 6px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
/* Upload Area */
|
|
.upload-area {
|
|
margin-top: 20px;
|
|
padding: 20px;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: var(--border-radius);
|
|
background-color: var(--light-color);
|
|
}
|
|
|
|
.upload-zone {
|
|
border: 2px dashed var(--border-color);
|
|
border-radius: var(--border-radius);
|
|
padding: 40px;
|
|
text-align: center;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.upload-zone:hover {
|
|
border-color: var(--primary-color);
|
|
background-color: rgba(0, 123, 255, 0.05);
|
|
}
|
|
|
|
.upload-zone.dragover {
|
|
border-color: var(--primary-color);
|
|
background-color: rgba(0, 123, 255, 0.1);
|
|
}
|
|
|
|
.upload-icon {
|
|
font-size: 48px;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.upload-progress {
|
|
margin-top: 20px;
|
|
}
|
|
|
|
.progress-bar {
|
|
width: 100%;
|
|
height: 20px;
|
|
background-color: #e9ecef;
|
|
border-radius: 10px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.progress-fill {
|
|
height: 100%;
|
|
background-color: var(--primary-color);
|
|
transition: width 0.3s ease;
|
|
width: 0%;
|
|
}
|
|
|
|
#progress-text {
|
|
margin-top: 10px;
|
|
text-align: center;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
/* Real-time Panel */
|
|
.realtime-panel {
|
|
margin-top: 30px;
|
|
padding: 20px;
|
|
background-color: var(--light-color);
|
|
border-radius: var(--border-radius);
|
|
border: 1px solid var(--border-color);
|
|
}
|
|
|
|
.realtime-panel h3 {
|
|
margin-bottom: 15px;
|
|
color: var(--primary-color);
|
|
}
|
|
|
|
.realtime-log {
|
|
max-height: 200px;
|
|
overflow-y: auto;
|
|
background-color: var(--background-color);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: var(--border-radius);
|
|
padding: 10px;
|
|
margin-bottom: 15px;
|
|
font-family: monospace;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.log-entry {
|
|
padding: 2px 0;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.log-entry.success {
|
|
color: var(--success-color);
|
|
}
|
|
|
|
.log-entry.error {
|
|
color: var(--danger-color);
|
|
}
|
|
|
|
.log-entry.info {
|
|
color: var(--info-color);
|
|
}
|
|
|
|
/* Context Menu */
|
|
.context-menu {
|
|
position: fixed;
|
|
background-color: var(--background-color);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: var(--border-radius);
|
|
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
|
|
padding: 5px 0;
|
|
z-index: 1000;
|
|
min-width: 150px;
|
|
}
|
|
|
|
.menu-item {
|
|
padding: 8px 15px;
|
|
cursor: pointer;
|
|
transition: background-color 0.2s ease;
|
|
}
|
|
|
|
.menu-item:hover {
|
|
background-color: var(--hover-color);
|
|
}
|
|
|
|
.menu-separator {
|
|
height: 1px;
|
|
background-color: var(--border-color);
|
|
margin: 5px 0;
|
|
}
|
|
|
|
/* Modal */
|
|
.modal {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background-color: rgba(0,0,0,0.5);
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
z-index: 2000;
|
|
}
|
|
|
|
.modal-content {
|
|
background-color: var(--background-color);
|
|
border-radius: var(--border-radius);
|
|
box-shadow: 0 8px 16px rgba(0,0,0,0.3);
|
|
max-width: 500px;
|
|
width: 90%;
|
|
max-height: 80%;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.modal-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 20px;
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
|
|
.modal-close {
|
|
background: none;
|
|
border: none;
|
|
font-size: 24px;
|
|
cursor: pointer;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.modal-body {
|
|
padding: 20px;
|
|
}
|
|
|
|
.modal-footer {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
gap: 10px;
|
|
padding: 20px;
|
|
border-top: 1px solid var(--border-color);
|
|
}
|
|
|
|
/* Loading States */
|
|
.loading {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
padding: 40px;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.spinner {
|
|
width: 20px;
|
|
height: 20px;
|
|
border: 2px solid var(--border-color);
|
|
border-top-color: var(--primary-color);
|
|
border-radius: 50%;
|
|
animation: spin 1s linear infinite;
|
|
margin-right: 10px;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to {
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|
|
|
|
/* Responsive Design */
|
|
@media (max-width: 768px) {
|
|
.container {
|
|
padding: 10px;
|
|
}
|
|
|
|
.header {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
gap: 10px;
|
|
}
|
|
|
|
.breadcrumb {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
gap: 10px;
|
|
}
|
|
|
|
.file-list-header,
|
|
.file-item {
|
|
grid-template-columns: 1fr 60px;
|
|
grid-template-areas:
|
|
"name actions"
|
|
"details details";
|
|
}
|
|
|
|
.file-name {
|
|
grid-area: name;
|
|
}
|
|
|
|
.file-actions {
|
|
grid-area: actions;
|
|
justify-self: end;
|
|
}
|
|
|
|
.file-size,
|
|
.file-modified {
|
|
grid-area: details;
|
|
grid-column: 1 / -1;
|
|
display: flex;
|
|
gap: 20px;
|
|
margin-top: 5px;
|
|
font-size: 12px;
|
|
}
|
|
}
|
|
|
|
/* Utility Classes */
|
|
.hidden {
|
|
display: none !important;
|
|
}
|
|
|
|
.text-muted {
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.text-success {
|
|
color: var(--success-color);
|
|
}
|
|
|
|
.text-danger {
|
|
color: var(--danger-color);
|
|
}
|
|
|
|
.text-warning {
|
|
color: var(--warning-color);
|
|
}
|
|
|
|
.text-info {
|
|
color: var(--info-color);
|
|
} |