Files
digiserver-v2/app/templates/base.html
2025-11-12 16:07:03 +02:00

146 lines
4.5 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>
* { 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: #333;
background: #f5f5f5;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
header {
background: #2c3e50;
color: white;
padding: 1rem 0;
margin-bottom: 2rem;
}
header .container {
display: flex;
justify-content: space-between;
align-items: center;
}
header h1 { font-size: 1.5rem; }
nav a {
color: white;
text-decoration: none;
margin-left: 1rem;
padding: 0.5rem 1rem;
border-radius: 4px;
transition: background 0.3s;
}
nav a:hover { background: rgba(255,255,255,0.1); }
.alert {
padding: 1rem;
margin-bottom: 1rem;
border-radius: 4px;
border-left: 4px solid;
}
.alert-success {
background: #d4edda;
border-color: #28a745;
color: #155724;
}
.alert-danger {
background: #f8d7da;
border-color: #dc3545;
color: #721c24;
}
.alert-warning {
background: #fff3cd;
border-color: #ffc107;
color: #856404;
}
.alert-info {
background: #d1ecf1;
border-color: #17a2b8;
color: #0c5460;
}
.card {
background: white;
border-radius: 8px;
padding: 1.5rem;
margin-bottom: 1rem;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.card h2 { margin-bottom: 1rem; color: #2c3e50; }
.btn {
display: inline-block;
padding: 0.5rem 1rem;
background: #3498db;
color: white;
text-decoration: none;
border-radius: 4px;
border: none;
cursor: pointer;
transition: background 0.3s;
}
.btn:hover { background: #2980b9; }
.btn-danger { background: #e74c3c; }
.btn-danger:hover { background: #c0392b; }
.btn-success { background: #27ae60; }
.btn-success:hover { background: #229954; }
footer {
margin-top: 2rem;
padding: 1rem 0;
text-align: center;
color: #7f8c8d;
font-size: 0.9rem;
}
</style>
{% block extra_css %}{% endblock %}
</head>
<body>
<header>
<div class="container">
<h1>📺 DigiServer v2</h1>
<nav>
{% if current_user.is_authenticated %}
<a href="{{ url_for('main.dashboard') }}">Dashboard</a>
<a href="{{ url_for('players.list') }}">Players</a>
<a href="{{ url_for('groups.groups_list') }}">Groups</a>
<a href="{{ url_for('content.content_list') }}">Content</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>
{% 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>
{% block extra_js %}{% endblock %}
</body>
</html>