feat: refine simulcast card layout with smaller hover title and wider grid

This commit is contained in:
2026-06-30 21:24:24 +02:00
parent 59756095c2
commit 3a824c9c7e
2 changed files with 4 additions and 3 deletions

View File

@@ -5,6 +5,7 @@
{{$hideTitle := .HideTitle}}
{{$isWatchlist := .IsWatchlist}}
{{$hasTopBadge := .HasTopBadge}}
{{$smallHoverTitle := .SmallHoverTitle}}
{{$dataId := printf "id-%d" $anime.MalID}}
{{$imageUrl := posterURL $anime.Images.Webp.LargeImageURL $anime.Images.Jpg.LargeImageURL 400 600}}
@@ -21,7 +22,7 @@
{{if $withActions}}
<div class="absolute inset-0 z-10 flex flex-col p-3 {{if $hasTopBadge}}pt-10{{end}} opacity-0 transition-opacity duration-300 group-hover:opacity-100">
{{if not $isWatchlist}}
<h3 class="mb-1.5 line-clamp-2 text-base font-medium text-white">
<h3 class="mb-1.5 line-clamp-2 {{if $smallHoverTitle}}text-sm{{else}}text-base{{end}} font-medium text-white">
{{$displayTitle}}
</h3>
{{end}}

View File

@@ -1,6 +1,6 @@
{{define "title"}}Simulcast{{end}}
{{define "content"}}
<div class="mx-auto flex w-full max-w-7xl flex-col gap-6 pb-12">
<div class="mx-auto flex w-full max-w-[96rem] flex-col gap-6 pb-12">
<div class="flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between">
<h1 class="text-2xl font-medium text-foreground">Simulcast Season</h1>
<ui-dropdown class="relative block" data-align="right" data-width="min-w-44">
@@ -23,7 +23,7 @@
{{if .Animes}}
<div class="grid grid-cols-2 gap-x-4 gap-y-7 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-6">
{{range .Animes}}
{{template "anime_card" dict "Anime" . "WithActions" true "IsWatchlist" (index $.WatchlistMap .MalID)}}
{{template "anime_card" dict "Anime" . "WithActions" true "SmallHoverTitle" true "IsWatchlist" (index $.WatchlistMap .MalID)}}
{{end}}
</div>
{{else}}