Files
offline-db/templates/search.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

39 lines
1.9 KiB
HTML

{% extends "base.html" %}
{% block title %}Search: {{ query }} - Anime Platform{% endblock %}
{% block content %}
<h2 class="text-3xl font-bold mb-6">Search Results for: <span class="text-blue-500">{{ query }}</span></h2>
{% if results %}
<div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-6">
{% for anime in results %}
<a href="/player?mal_id={{ anime.mal_id }}" class="anime-card bg-gray-800 rounded-lg overflow-hidden shadow-lg border border-gray-700">
<div class="relative">
{% if anime.cover_local %}
<img src="/covers/{{ anime.mal_id }}.jpg" alt="{{ anime.title }}" class="w-full h-64 object-cover">
{% else %}
<img src="{{ anime.cover_url }}" alt="{{ anime.title }}" class="w-full h-64 object-cover">
{% endif %}
<div class="absolute top-2 right-2 bg-blue-600 text-white text-xs font-bold px-2 py-1 rounded shadow">
{{ anime.type }}
</div>
</div>
<div class="p-4">
<h3 class="font-bold text-lg truncate" title="{{ anime.title }}">{{ anime.title }}</h3>
<div class="flex justify-between items-center mt-2 text-sm text-gray-400">
<span>{{ anime.year or 'N/A' }}</span>
<span class="text-yellow-500 font-bold">⭐ {{ anime.score or 'N/A' }}</span>
</div>
</div>
</a>
{% endfor %}
</div>
{% else %}
<div class="bg-gray-800 p-12 rounded-lg text-center shadow-inner border border-gray-700">
<p class="text-gray-400 text-xl">No results found in database.</p>
<p class="text-gray-500 mt-2">Try a different name or check the season list.</p>
</div>
{% endif %}
{% endblock %}