Files
offline-db/templates/base.html
google-labs-jules[bot] 6f811d2028 ✨ FEATURE: Implemented User Account, Watch History, and Watchlist System (#14)
This major update transforms the platform into a personalized anime experience.

Key Changes:
- Database: Added 'users', 'watch_history', and 'watchlists' tables with appropriate relationships and indices.
- Backend: Created 'blueprints/user.py' for authentication (Register/Login/Logout) and User Data API (History/Watchlist).
- Security: Implemented password hashing using werkzeug.security and enabled Flask sessions.
- Frontend Architecture: Refactored all templates to use a new 'base.html' for global navigation and consistent styling.
- UI/UX: Added 'Continue Watching' and 'My Watchlist' sections to the home page.
- Tracking: Integrated real-time watch progress tracking in the video player.

This moves the platform from a static database to a dynamic, user-centric streaming site.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-01-16 07:45:49 +00:00

55 lines
2.3 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 %}Anime Platform{% endblock %}</title>
<script src="https://cdn.tailwindcss.com"></script>
<style>
.anime-card { transition: transform 0.2s; }
.anime-card:hover { transform: translateY(-5px); }
</style>
</head>
<body class="bg-gray-900 text-white min-h-screen">
<nav class="bg-gray-800 border-b border-gray-700 p-4">
<div class="container mx-auto flex justify-between items-center">
<a href="/" class="text-2xl font-bold text-blue-500">Anime Platform</a>
<form action="/search" method="get" class="hidden md:flex flex-grow max-w-md mx-4">
<input type="search" name="q" placeholder="Search anime..." class="w-full bg-gray-700 border border-gray-600 rounded-l-lg py-1 px-4 focus:outline-none focus:border-blue-500 text-sm">
<button type="submit" class="bg-blue-600 hover:bg-blue-700 rounded-r-lg px-4 py-1 text-sm">Search</button>
</form>
<div class="flex items-center space-x-4">
{% if session.user_id %}
<span class="text-gray-300">Hi, <span class="font-semibold">{{ session.username }}</span></span>
<button onclick="logout()" class="text-sm bg-red-600 hover:bg-red-700 px-3 py-1 rounded">Logout</button>
{% else %}
<a href="/login" class="text-sm hover:text-blue-400">Login</a>
<a href="/register" class="text-sm bg-blue-600 hover:bg-blue-700 px-3 py-1 rounded">Register</a>
{% endif %}
</div>
</div>
</nav>
<main class="container mx-auto p-4">
{% block content %}{% endblock %}
</main>
<footer class="bg-gray-800 border-t border-gray-700 p-6 mt-8">
<div class="container mx-auto text-center text-gray-400 text-sm">
&copy; 2024 Anime Platform - Senpai v4.0 Evolution
</div>
</footer>
<script>
async function logout() {
const resp = await fetch('/api/auth/logout', { method: 'POST' });
if (resp.ok) window.location.href = '/';
}
</script>
{% block scripts %}{% endblock %}
</body>
</html>