feat: surface recommendation rationale

This commit is contained in:
2026-06-27 17:55:38 +02:00
parent 1d9840f2b9
commit 6d5e9d0a2c
5 changed files with 47 additions and 2 deletions

View File

@@ -21,7 +21,17 @@
{{else}}
<div class="grid grid-cols-2 gap-4 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 2xl:grid-cols-7">
{{range .Animes}}
{{template "anime_card" dict "Anime" . "WithActions" true "IsWatchlist" (index $.WatchlistMap .MalID)}}
<div class="flex flex-col gap-2">
{{template "anime_card" dict "Anime" . "WithActions" true "HideTitle" true "IsWatchlist" (index $.WatchlistMap .MalID)}}
<h3 class="line-clamp-2 text-sm font-normal text-foreground">{{.DisplayTitle}}</h3>
{{if .RecommendationRationale}}
<div class="flex flex-wrap gap-1.5" aria-label="Why this was picked">
{{range .RecommendationRationale}}
<span class="rounded-full bg-background-button px-2 py-1 text-[0.68rem] leading-none text-foreground-muted">{{.}}</span>
{{end}}
</div>
{{end}}
</div>
{{end}}
</div>
{{end}}