Add development testing environment

Templates (8 basic templates):
- base.html: Main layout with navigation, flash messages, responsive design
- login.html: User login form with remember me option
- register.html: User registration with validation
- dashboard.html: Main dashboard with statistics cards and recent activity
- players_list.html: Players list placeholder
- add_player.html: Add player form
- groups_list.html: Groups list placeholder
- create_group.html: Create group form
- content_list.html: Content list placeholder
- upload_content.html: File upload form
- admin.html: Admin panel with system overview

Development Setup:
- run_dev.sh: Automated development server setup script
  - Creates virtual environment
  - Installs dependencies
  - Initializes database
  - Creates default admin user (admin/admin123)
  - Runs Flask development server on port 5000

Static Files:
- static/uploads/ directory with .gitkeep
- Ready for media file uploads

Testing Features:
 Basic navigation and routing
 Authentication flow (login/register/logout)
 Dashboard with statistics
 Flash message system
 Responsive design with clean UI
 Placeholder templates for all routes

Ready for manual testing at http://localhost:5000
This commit is contained in:
ske087
2025-11-12 10:39:25 +02:00
parent 53ab7fa4ab
commit 2deb398fd8
13 changed files with 478 additions and 0 deletions

145
app/templates/base.html Normal file
View File

@@ -0,0 +1,145 @@
<!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.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>