Add blueprints for authentication, admin, dashboard, gallery, generation, and profile routes

- Created `__init__.py` for blueprint registration.
- Implemented `auth.py` for user authentication (login, register, logout).
- Added `admin.py` for admin functionalities (user management, stats).
- Developed `dashboard.py` for user dashboard displaying user info and generated content.
- Created `gallery.py` for managing and displaying images and videos.
- Implemented `generate.py` for text, image, and video generation functionalities.
- Added `profile.py` for user profile management.
- Updated templates to reflect new route structures and improve navigation.
This commit is contained in:
2026-05-30 19:39:30 +02:00
parent 02fc5995db
commit f43b13f625
20 changed files with 667 additions and 617 deletions
+13 -11
View File
@@ -13,7 +13,9 @@
<body>
<header>
<nav>
<a href="{{ url_for('index') }}" class="brand">All You Can GET AI</a>
<a href="{{ url_for('auth.index') }}" class="brand"
>All You Can GET AI</a
>
<button class="hamburger" aria-label="Open menu">
<span></span><span></span><span></span>
@@ -21,21 +23,21 @@
<div class="nav-links">
{% if session.get('access_token') %}
<a href="{{ url_for('dashboard') }}">Dashboard</a>
<a href="{{ url_for('gallery') }}">Gallery</a>
<a href="{{ url_for('dashboard.index') }}">Dashboard</a>
<a href="{{ url_for('gallery.index') }}">Gallery</a>
<a href="{{ url_for('generate_text') }}">Generate Text</a>
<a href="{{ url_for('generate_image') }}">Generate Image</a>
<a href="{{ url_for('generate_video') }}">Generate Video</a>
<a href="{{ url_for('generate.text') }}">Generate Text</a>
<a href="{{ url_for('generate.image') }}">Generate Image</a>
<a href="{{ url_for('generate.video') }}">Generate Video</a>
<a href="{{ url_for('profile') }}">Profile</a>
<a href="{{ url_for('profile.index') }}">Profile</a>
{% if session.get('user_role') == 'admin' %}
<a href="{{ url_for('admin') }}">Admin</a>
<a href="{{ url_for('admin.index') }}">Admin</a>
{% endif %}
<a href="{{ url_for('logout') }}">Log out</a>
<a href="{{ url_for('auth.logout') }}">Log out</a>
{% else %}
<a href="{{ url_for('login') }}">Log in</a>
<a href="{{ url_for('register') }}">Register</a>
<a href="{{ url_for('auth.login') }}">Log in</a>
<a href="{{ url_for('auth.register') }}">Register</a>
{% endif %}
</div>
</nav>