refactor: general architectural cleanup and bug fixes

This commit is contained in:
2026-05-13 11:20:49 +02:00
parent 1b88c4597c
commit 345853406c
34 changed files with 274 additions and 102 deletions

View File

@@ -2,7 +2,7 @@
<div class="mt-12 w-full">
<h2 class="mb-6 text-lg font-normal text-foreground">Characters & Cast</h2>
<div class="grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5">
{{range (slice . 0 (min (len .) 10))}}
{{range (slice .Items 0 (min (len .Items) 10))}}
<div class="flex gap-3 bg-background-surface p-3 ring-1 ring-border">
<div class="h-16 w-12 shrink-0 overflow-hidden bg-background-surface">
<img src="{{.Character.Images.Jpg.ImageURL}}" alt="{{.Character.Name}}" class="h-full w-full object-cover" loading="lazy" />
@@ -21,11 +21,11 @@
{{end}}
{{define "anime_recommendations"}}
{{if .}}
{{if .Items}}
<div class="w-full">
<h2 class="mb-6 text-lg font-normal text-foreground">Recommendations</h2>
<div class="grid grid-cols-2 gap-4 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 xl:grid-cols-8">
{{range (slice . 0 (min (len .) 8))}}
{{range (slice .Items 0 (min (len .Items) 8))}}
<a href="/anime/{{.Entry.MalID}}" class="group flex flex-col gap-2">
<div class="aspect-2/3 overflow-hidden bg-background-surface shadow-md">
<img src="{{.Entry.Images.Webp.LargeImageURL}}" alt="{{.Entry.Title}}" class="h-full w-full object-cover transition-transform duration-500 group-hover:scale-105" loading="lazy" />
@@ -43,7 +43,7 @@
{{if .WatchlistIDs}}<script>initWatchlist({{.WatchlistIDs}})</script>{{end}}
{{$anime := .Anime}}
<div class="flex flex-col gap-10 pr-0 lg:pr-80">
<div class="flex flex-col gap-10 lg:pr-80">
<div class="flex flex-col gap-8 md:flex-row lg:gap-12">
<div class="flex w-64 shrink-0 flex-col items-center gap-6 md:w-80 md:items-start lg:w-96">
<div class="aspect-2/3 w-full overflow-hidden bg-background-surface shadow-lg">