Files
nx9-url-shortener/templates/layout.html
T

452 lines
15 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}BZOD Admin{% endblock %}</title>
<style>
:root {
--bg-base: #090d16;
--bg-card: rgba(17, 24, 39, 0.7);
--border-color: rgba(255, 255, 255, 0.08);
--text-primary: #f8fafc;
--text-secondary: #94a3b8;
--text-muted: #64748b;
--primary-grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
--accent-color: #6366f1;
--danger-color: #ef4444;
--success-color: #10b981;
--warning-color: #f59e0b;
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
background-color: var(--bg-base);
color: var(--text-primary);
font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
min-height: 100vh;
display: flex;
overflow-x: hidden;
}
/* Sidebar Navigation */
.sidebar {
width: 260px;
background-color: rgba(15, 23, 42, 0.95);
border-right: 1px solid var(--border-color);
padding: 2rem 1.5rem;
display: flex;
flex-direction: column;
position: fixed;
height: 100vh;
z-index: 100;
}
.logo {
font-size: 1.5rem;
font-weight: 800;
background: var(--primary-grad);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
margin-bottom: 2.5rem;
letter-spacing: 2px;
display: flex;
align-items: center;
gap: 0.5rem;
}
.logo-dot {
width: 8px;
height: 8px;
background: #818cf8;
border-radius: 50%;
display: inline-block;
}
.nav-links {
list-style: none;
display: flex;
flex-direction: column;
gap: 0.5rem;
flex-grow: 1;
}
.nav-links a {
color: var(--text-secondary);
text-decoration: none;
padding: 0.75rem 1rem;
border-radius: 8px;
display: flex;
align-items: center;
gap: 0.75rem;
font-weight: 500;
transition: all 0.2s ease;
}
.nav-links a:hover {
background-color: rgba(255, 255, 255, 0.03);
color: var(--text-primary);
transform: translateX(3px);
}
.nav-links li.active a {
background: var(--primary-grad);
color: var(--text-primary);
box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.3);
}
.sidebar-footer {
border-top: 1px solid var(--border-color);
padding-top: 1.5rem;
margin-top: auto;
}
.admin-user-info {
display: flex;
align-items: center;
gap: 0.75rem;
color: var(--text-secondary);
font-size: 0.9rem;
margin-bottom: 1rem;
}
.avatar {
width: 32px;
height: 32px;
border-radius: 50%;
background: #312e81;
color: #818cf8;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
}
.logout-btn {
display: block;
width: 100%;
padding: 0.75rem;
background: rgba(239, 68, 68, 0.1);
color: var(--danger-color);
border: 1px solid rgba(239, 68, 68, 0.2);
border-radius: 8px;
text-align: center;
text-decoration: none;
font-weight: 600;
font-size: 0.9rem;
cursor: pointer;
transition: all 0.2s ease;
}
.logout-btn:hover {
background: var(--danger-color);
color: #fff;
}
/* Main Content */
.main-container {
margin-left: 260px;
flex-grow: 1;
padding: 2.5rem;
max-width: 1200px;
width: calc(100% - 260px);
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 2.5rem;
}
.header h1 {
font-size: 2rem;
font-weight: 700;
}
/* Cards and Elements */
.card {
background-color: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: 16px;
padding: 1.5rem;
margin-bottom: 1.5rem;
backdrop-filter: blur(12px);
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}
/* Grid */
.grid-stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1.5rem;
margin-bottom: 2rem;
}
.stat-card {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.stat-label {
color: var(--text-secondary);
font-size: 0.85rem;
text-transform: uppercase;
letter-spacing: 1px;
}
.stat-val {
font-size: 2rem;
font-weight: 700;
}
/* Forms */
.form-group {
margin-bottom: 1.25rem;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.form-group label {
font-size: 0.9rem;
font-weight: 600;
color: var(--text-secondary);
}
.form-input, select, textarea {
background-color: rgba(15, 23, 42, 0.6);
border: 1px solid var(--border-color);
border-radius: 8px;
padding: 0.75rem 1rem;
color: var(--text-primary);
font-family: inherit;
font-size: 0.95rem;
width: 100%;
transition: all 0.2s ease;
}
.form-input:focus, select:focus, textarea:focus {
outline: none;
border-color: var(--accent-color);
box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}
.btn {
background: var(--primary-grad);
color: #fff;
border: none;
padding: 0.75rem 1.5rem;
border-radius: 8px;
font-weight: 600;
font-size: 0.95rem;
cursor: pointer;
transition: all 0.2s ease;
text-decoration: none;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
}
.btn:hover {
opacity: 0.9;
transform: translateY(-1px);
box-shadow: 0 4px 12px 0 rgba(99, 102, 241, 0.3);
}
.btn-secondary {
background: rgba(255, 255, 255, 0.05);
border: 1px solid var(--border-color);
color: var(--text-primary);
}
.btn-secondary:hover {
background: rgba(255, 255, 255, 0.1);
box-shadow: none;
}
.btn-danger {
background: var(--danger-color);
color: white;
}
.btn-danger:hover {
box-shadow: 0 4px 12px 0 rgba(239, 68, 68, 0.3);
}
/* Tables */
.table-container {
width: 100%;
overflow-x: auto;
}
table {
width: 100%;
border-collapse: collapse;
text-align: left;
}
th {
padding: 1rem;
color: var(--text-secondary);
font-size: 0.85rem;
text-transform: uppercase;
border-bottom: 1px solid var(--border-color);
font-weight: 600;
}
td {
padding: 1rem;
border-bottom: 1px solid rgba(255, 255, 255, 0.04);
font-size: 0.95rem;
color: var(--text-primary);
}
tr:hover td {
background-color: rgba(255, 255, 255, 0.01);
}
/* Badges */
.badge {
display: inline-block;
padding: 0.25rem 0.6rem;
border-radius: 50px;
font-size: 0.75rem;
font-weight: 600;
text-transform: uppercase;
}
.badge-healthy { background: rgba(16, 185, 129, 0.15); color: var(--success-color); border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-suspect { background: rgba(245, 158, 11, 0.15); color: var(--warning-color); border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-dead { background: rgba(239, 68, 68, 0.15); color: var(--danger-color); border: 1px solid rgba(239, 68, 68, 0.2); }
.badge-published { background: rgba(16, 185, 129, 0.15); color: var(--success-color); }
.badge-draft { background: rgba(100, 116, 139, 0.15); color: var(--text-secondary); }
.badge-archived { background: rgba(239, 68, 68, 0.15); color: var(--danger-color); }
/* Alerts */
.alert {
padding: 1rem;
border-radius: 8px;
margin-bottom: 1.5rem;
font-weight: 500;
display: flex;
align-items: center;
gap: 0.5rem;
}
.alert-error {
background-color: rgba(239, 68, 68, 0.1);
border: 1px solid rgba(239, 68, 68, 0.2);
color: #fca5a5;
}
.alert-success {
background-color: rgba(16, 185, 129, 0.1);
border: 1px solid rgba(16, 185, 129, 0.2);
color: #a7f3d0;
}
/* Tooltip */
.tooltip {
position: relative;
cursor: pointer;
}
/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }
{% block extra_css %}{% endblock %}
</style>
</head>
<body>
<!-- Sidebar -->
<div class="sidebar">
<div class="logo">
BZOD <span class="logo-dot"></span>
</div>
<ul class="nav-links">
{% block sidebar_links %}
<li class="{% block active_dashboard %}{% endblock %}">
<a href="/admin/dashboard">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="7" height="9"/><rect x="14" y="3" width="7" height="5"/><rect x="14" y="12" width="7" height="9"/><rect x="3" y="16" width="7" height="5"/></svg>
Dashboard
</a>
</li>
<li class="{% block active_urls %}{% endblock %}">
<a href="/admin/urls">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg>
Short URLs
</a>
</li>
<li class="{% block active_pages %}{% endblock %}">
<a href="/admin/pages">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/></svg>
Landing Pages
</a>
</li>
<li class="{% block active_users %}{% endblock %}">
<a href="/admin/users">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>
Users Management
</a>
</li>
<li class="{% block active_settings %}{% endblock %}">
<a href="/admin/settings">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"/></svg>
Settings
</a>
</li>
<li class="{% block active_audit %}{% endblock %}">
<a href="/admin/audit">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 20h9"/><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"/></svg>
Audit Log
</a>
</li>
<li class="{% block active_status %}{% endblock %}">
<a href="/admin/status">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="22" y1="12" x2="18" y2="12"/><line x1="6" y1="12" x2="2" y2="12"/><polyline points="10 6 14 12 10 18"/><line x1="18" y1="12" x2="14" y2="12"/><line x1="6" y1="12" x2="10" y2="12"/></svg>
Status
</a>
</li>
{% endblock %}
</ul>
{% block sidebar_footer %}
<div class="sidebar-footer">
<div class="admin-user-info">
<div class="avatar">{{ admin_username[0..1].to_uppercase() }}</div>
<span>{{ admin_username }}</span>
</div>
<a href="/admin/logout" class="logout-btn">Log Out</a>
</div>
{% endblock %}
</div>
<!-- Main Workspace -->
<div class="main-container">
<div class="header">
<h1>{% block header_title %}{% endblock %}</h1>
<div>
{% block header_actions %}{% endblock %}
</div>
</div>
{% block content %}{% endblock %}
</div>
</body>
</html>