feat: add For You recommendations to discover

This commit is contained in:
2026-05-26 20:16:09 +02:00
parent f2b4a7994a
commit 71dd130744
4 changed files with 257 additions and 0 deletions

View File

@@ -72,6 +72,17 @@
</div>
</section>
{{/* For You Section */}}
<section class="flex flex-col gap-4">
<div class="flex items-center justify-between">
<h2 class="text-base font-normal text-foreground">For You</h2>
<span class="text-sm text-foreground-muted">Based on your watchlist</span>
</div>
<div hx-get="/api/discover/for-you" hx-trigger="load" hx-swap="outerHTML">
{{template "discover_skeleton"}}
</div>
</section>
{{/* Upcoming Section */}}
<section class="flex flex-col gap-4">
<div class="flex items-center justify-between">
@@ -124,6 +135,14 @@
</div>
{{end}}
{{define "discover_row"}}
<div class="grid gap-4 [grid-template-columns:repeat(auto-fit,minmax(160px,1fr))]">
{{range .Animes}}
{{template "anime_card" dict "Anime" . "WithActions" true "IsWatchlist" (index $.WatchlistMap .MalID)}}
{{end}}
</div>
{{end}}
{{define "discover_skeleton"}}
<div class="discover-grid">
{{range (seq 8)}}