466 lines
15 KiB
HTML
466 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 %}DigiServer v2{% endblock %}</title>
|
|
<style>
|
|
/* Ensure emoji font support */
|
|
@supports (font-family: "Apple Color Emoji") {
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
|
|
}
|
|
}
|
|
|
|
:root {
|
|
/* Light Mode Colors */
|
|
--primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
--primary-color: #667eea;
|
|
--primary-dark: #5568d3;
|
|
--secondary-color: #764ba2;
|
|
--bg-color: #f5f7fa;
|
|
--card-bg: #ffffff;
|
|
--text-color: #2d3748;
|
|
--text-secondary: #718096;
|
|
--border-color: #e2e8f0;
|
|
--header-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
--shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
|
|
--shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
body.dark-mode {
|
|
/* Dark Mode Colors */
|
|
--primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
--primary-color: #7c3aed;
|
|
--primary-dark: #6d28d9;
|
|
--secondary-color: #8b5cf6;
|
|
--bg-color: #1a202c;
|
|
--card-bg: #2d3748;
|
|
--text-color: #e2e8f0;
|
|
--text-secondary: #a0aec0;
|
|
--border-color: #4a5568;
|
|
--header-bg: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
|
|
--shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
|
|
--shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
|
|
}
|
|
|
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
|
line-height: 1.6;
|
|
color: var(--text-color);
|
|
background: var(--bg-color);
|
|
transition: background 0.3s, color 0.3s;
|
|
}
|
|
.container {
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
padding: 20px;
|
|
}
|
|
header {
|
|
background: var(--header-bg);
|
|
color: white;
|
|
padding: 1rem 0;
|
|
margin-bottom: 2rem;
|
|
box-shadow: var(--shadow);
|
|
}
|
|
header .container {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
gap: 1rem;
|
|
}
|
|
header h1 {
|
|
font-size: 1.5rem;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
}
|
|
nav {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
flex-wrap: wrap;
|
|
}
|
|
nav a {
|
|
color: white;
|
|
text-decoration: none;
|
|
padding: 0.5rem 1rem;
|
|
border-radius: 6px;
|
|
transition: all 0.3s;
|
|
font-weight: 500;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
}
|
|
nav a:hover {
|
|
background: rgba(255,255,255,0.2);
|
|
transform: translateY(-2px);
|
|
}
|
|
nav a img {
|
|
width: 18px;
|
|
height: 18px;
|
|
filter: brightness(0) invert(1);
|
|
}
|
|
|
|
/* Mobile Responsive */
|
|
@media (max-width: 768px) {
|
|
header .container {
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
padding: 1rem;
|
|
}
|
|
|
|
header h1 {
|
|
font-size: 1.25rem;
|
|
justify-content: center;
|
|
text-align: center;
|
|
}
|
|
|
|
nav {
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
width: 100%;
|
|
}
|
|
|
|
nav a {
|
|
justify-content: center;
|
|
width: 100%;
|
|
padding: 0.75rem 1rem;
|
|
}
|
|
|
|
.dark-mode-toggle {
|
|
margin-left: 0;
|
|
width: 100%;
|
|
padding: 0.75rem;
|
|
}
|
|
|
|
.container {
|
|
padding: 15px;
|
|
}
|
|
|
|
.card {
|
|
padding: 1rem;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.card-header {
|
|
padding: 15px;
|
|
margin: -1rem -1rem 1rem -1rem;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
header h1 {
|
|
font-size: 1.1rem;
|
|
}
|
|
|
|
nav a {
|
|
font-size: 0.9rem;
|
|
padding: 0.6rem 0.8rem;
|
|
}
|
|
|
|
nav a img {
|
|
width: 16px;
|
|
height: 16px;
|
|
}
|
|
}
|
|
|
|
.dark-mode-toggle {
|
|
background: rgba(255,255,255,0.2);
|
|
border: 2px solid rgba(255,255,255,0.3);
|
|
color: white;
|
|
cursor: pointer;
|
|
padding: 0.5rem;
|
|
border-radius: 6px;
|
|
transition: all 0.3s;
|
|
margin-left: 0.5rem;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
.dark-mode-toggle:hover {
|
|
background: rgba(255,255,255,0.3);
|
|
transform: scale(1.1);
|
|
}
|
|
.dark-mode-toggle img {
|
|
width: 20px;
|
|
height: 20px;
|
|
filter: brightness(0) invert(1);
|
|
}
|
|
|
|
/* Emoji fallback for systems without emoji fonts */
|
|
.emoji-fallback::before {
|
|
content: attr(data-emoji);
|
|
font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
|
|
}
|
|
.alert {
|
|
padding: 1rem;
|
|
margin-bottom: 1rem;
|
|
border-radius: 8px;
|
|
border-left: 4px solid;
|
|
transition: all 0.3s;
|
|
}
|
|
.alert-success {
|
|
background: #d4edda;
|
|
border-color: #28a745;
|
|
color: #155724;
|
|
}
|
|
body.dark-mode .alert-success {
|
|
background: rgba(40, 167, 69, 0.2);
|
|
border-color: #28a745;
|
|
color: #7ce3a3;
|
|
}
|
|
.alert-danger {
|
|
background: #f8d7da;
|
|
border-color: #dc3545;
|
|
color: #721c24;
|
|
}
|
|
body.dark-mode .alert-danger {
|
|
background: rgba(220, 53, 69, 0.2);
|
|
border-color: #dc3545;
|
|
color: #f88f9a;
|
|
}
|
|
.alert-warning {
|
|
background: #fff3cd;
|
|
border-color: #ffc107;
|
|
color: #856404;
|
|
}
|
|
body.dark-mode .alert-warning {
|
|
background: rgba(255, 193, 7, 0.2);
|
|
border-color: #ffc107;
|
|
color: #ffd454;
|
|
}
|
|
.alert-info {
|
|
background: #d1ecf1;
|
|
border-color: #17a2b8;
|
|
color: #0c5460;
|
|
}
|
|
body.dark-mode .alert-info {
|
|
background: rgba(23, 162, 184, 0.2);
|
|
border-color: #17a2b8;
|
|
color: #7dd3e0;
|
|
}
|
|
.card {
|
|
background: var(--card-bg);
|
|
border-radius: 12px;
|
|
padding: 1.5rem;
|
|
margin-bottom: 1.5rem;
|
|
box-shadow: var(--shadow);
|
|
transition: all 0.3s;
|
|
border: 1px solid var(--border-color);
|
|
}
|
|
.card:hover {
|
|
box-shadow: var(--shadow-lg);
|
|
transform: translateY(-2px);
|
|
}
|
|
.card h2 {
|
|
margin-bottom: 1rem;
|
|
color: var(--text-color);
|
|
font-weight: 600;
|
|
}
|
|
.card h3 {
|
|
color: var(--text-color);
|
|
}
|
|
|
|
/* Card with gradient header */
|
|
.card-header {
|
|
background: var(--primary-gradient);
|
|
color: white;
|
|
padding: 20px;
|
|
border-radius: 12px 12px 0 0;
|
|
margin: -1.5rem -1.5rem 1.5rem -1.5rem;
|
|
}
|
|
.card-header h2 {
|
|
margin: 0;
|
|
color: white;
|
|
}
|
|
|
|
.btn {
|
|
display: inline-block;
|
|
padding: 0.5rem 1rem;
|
|
background: var(--primary-color);
|
|
color: white;
|
|
text-decoration: none;
|
|
border-radius: 6px;
|
|
border: none;
|
|
cursor: pointer;
|
|
transition: all 0.3s;
|
|
font-weight: 500;
|
|
}
|
|
.btn:hover {
|
|
background: var(--primary-dark);
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
|
|
}
|
|
.btn-primary {
|
|
background: var(--primary-gradient);
|
|
}
|
|
.btn-primary:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
|
|
}
|
|
.btn-danger { background: #e74c3c; }
|
|
.btn-danger:hover {
|
|
background: #c0392b;
|
|
box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
|
|
}
|
|
.btn-success { background: #27ae60; }
|
|
.btn-success:hover {
|
|
background: #229954;
|
|
box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
|
|
}
|
|
.btn-info {
|
|
background: #3498db;
|
|
}
|
|
.btn-info:hover {
|
|
background: #2980b9;
|
|
box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
|
|
}
|
|
.btn-sm {
|
|
padding: 0.375rem 0.75rem;
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
/* Form Inputs */
|
|
input, textarea, select {
|
|
background: var(--card-bg);
|
|
color: var(--text-color);
|
|
border: 1px solid var(--border-color);
|
|
transition: all 0.3s;
|
|
}
|
|
input:focus, textarea:focus, select:focus {
|
|
border-color: var(--primary-color);
|
|
outline: none;
|
|
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
|
|
}
|
|
body.dark-mode input:focus,
|
|
body.dark-mode textarea:focus,
|
|
body.dark-mode select:focus {
|
|
box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.3);
|
|
}
|
|
|
|
/* Tables */
|
|
table {
|
|
background: var(--card-bg);
|
|
color: var(--text-color);
|
|
}
|
|
th {
|
|
background: var(--bg-color);
|
|
color: var(--text-color);
|
|
}
|
|
tr {
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
|
|
/* Code blocks */
|
|
code, pre {
|
|
background: var(--bg-color);
|
|
color: var(--text-color);
|
|
border: 1px solid var(--border-color);
|
|
}
|
|
|
|
footer {
|
|
margin-top: 2rem;
|
|
padding: 1rem 0;
|
|
text-align: center;
|
|
color: var(--text-secondary);
|
|
font-size: 0.9rem;
|
|
}
|
|
</style>
|
|
{% block extra_css %}{% endblock %}
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<div class="container">
|
|
<h1>
|
|
<img src="{{ url_for('static', filename='uploads/header_logo.png') }}" alt="DigiServer" style="height: 32px; width: auto;" onerror="this.src='{{ url_for('static', filename='icons/monitor.svg') }}'; this.style.filter='brightness(0) invert(1)'; this.style.width='28px'; this.style.height='28px';">
|
|
DigiServer
|
|
</h1>
|
|
<nav>
|
|
{% if current_user.is_authenticated %}
|
|
<a href="{{ url_for('main.dashboard') }}">
|
|
<img src="{{ url_for('static', filename='icons/home.svg') }}" alt="">
|
|
Dashboard
|
|
</a>
|
|
<a href="{{ url_for('players.list') }}">
|
|
<img src="{{ url_for('static', filename='icons/monitor.svg') }}" alt="">
|
|
Players
|
|
</a>
|
|
<a href="{{ url_for('content.content_list') }}">
|
|
<img src="{{ url_for('static', filename='icons/playlist.svg') }}" alt="">
|
|
Playlists
|
|
</a>
|
|
{% if current_user.is_admin %}
|
|
<a href="{{ url_for('admin.admin_panel') }}">Admin</a>
|
|
{% endif %}
|
|
<a href="{{ url_for('auth.logout') }}">Logout ({{ current_user.username }})</a>
|
|
<button class="dark-mode-toggle" onclick="toggleDarkMode()" title="Toggle Dark Mode">
|
|
<img id="theme-icon" src="{{ url_for('static', filename='icons/moon.svg') }}" alt="Toggle theme">
|
|
</button>
|
|
{% else %}
|
|
<a href="{{ url_for('auth.login') }}">Login</a>
|
|
<a href="{{ url_for('auth.register') }}">Register</a>
|
|
{% endif %}
|
|
</nav>
|
|
</div>
|
|
</header>
|
|
|
|
<div class="container">
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% if messages %}
|
|
{% for category, message in messages %}
|
|
<div class="alert alert-{{ category }}">
|
|
{{ message }}
|
|
</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endwith %}
|
|
|
|
{% block content %}{% endblock %}
|
|
</div>
|
|
|
|
<footer>
|
|
<div class="container">
|
|
DigiServer v2.0.0-alpha | Blueprint Architecture | {{ server_version if server_version else 'Development' }}
|
|
</div>
|
|
</footer>
|
|
|
|
<script>
|
|
// Dark Mode Toggle
|
|
function toggleDarkMode() {
|
|
const body = document.body;
|
|
const themeIcon = document.getElementById('theme-icon');
|
|
|
|
body.classList.toggle('dark-mode');
|
|
|
|
// Update icon
|
|
if (body.classList.contains('dark-mode')) {
|
|
themeIcon.src = "{{ url_for('static', filename='icons/sun.svg') }}";
|
|
localStorage.setItem('darkMode', 'enabled');
|
|
} else {
|
|
themeIcon.src = "{{ url_for('static', filename='icons/moon.svg') }}";
|
|
localStorage.setItem('darkMode', 'disabled');
|
|
}
|
|
}
|
|
|
|
// Load saved theme preference
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
const darkMode = localStorage.getItem('darkMode');
|
|
const themeIcon = document.getElementById('theme-icon');
|
|
|
|
if (darkMode === 'enabled') {
|
|
document.body.classList.add('dark-mode');
|
|
if (themeIcon) {
|
|
themeIcon.src = "{{ url_for('static', filename='icons/sun.svg') }}";
|
|
}
|
|
}
|
|
});
|
|
</script>
|
|
|
|
{% block extra_js %}{% endblock %}
|
|
</body>
|
|
</html>
|