59 lines
3.6 KiB
Plaintext
59 lines
3.6 KiB
Plaintext
{{define "title"}}Simulcast{{end}}
|
|
{{define "content"}}
|
|
<div class="mx-auto flex w-full max-w-7xl 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">
|
|
<div data-trigger class="cursor-pointer">
|
|
<button type="button" class="flex h-10 min-w-44 items-center justify-between gap-3 bg-background-button px-4 text-sm text-foreground transition-colors hover:bg-background-button-hover focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">
|
|
<span>{{.SeasonLabel}} {{.Year}}</span>
|
|
<svg class="h-4 w-4 text-foreground-muted" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="m6 9 6 6 6-6" /></svg>
|
|
</button>
|
|
</div>
|
|
<div data-content class="absolute right-0 top-full z-50 mt-2 hidden max-h-80 min-w-44 overflow-y-auto bg-background-button shadow-card scrollbar-hidden">
|
|
<div class="flex flex-col py-1">
|
|
{{range .SeasonOptions}}
|
|
<a href="/simulcast?season={{.Season}}&year={{.Year}}" class="flex w-full items-center px-5 py-2.5 text-sm transition-colors hover:bg-surface-hover {{if and (eq .Season $.Season) (eq .Year $.Year)}}text-accent{{else}}text-foreground-muted hover:text-foreground{{end}}">{{.Label}}</a>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
</ui-dropdown>
|
|
</div>
|
|
|
|
{{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)}}
|
|
{{end}}
|
|
</div>
|
|
{{else}}
|
|
<div class="border border-border-light px-6 py-16 text-center text-sm text-foreground-muted">No provider releases found for {{.SeasonLabel}} {{.Year}}.</div>
|
|
{{end}}
|
|
|
|
<div class="flex items-center justify-between border-t-2 border-border-light pt-4 text-xs font-medium uppercase tracking-wide text-foreground-muted">
|
|
{{if .Previous}}
|
|
<a href="/simulcast?season={{.Previous.Season}}&year={{.Previous.Year}}" class="inline-flex items-center gap-2 transition-colors hover:text-foreground">
|
|
<svg class="size-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m15 18-6-6 6-6" /></svg>
|
|
Previous season
|
|
</a>
|
|
{{else}}
|
|
<span class="inline-flex cursor-not-allowed items-center gap-2 opacity-35" aria-disabled="true">
|
|
<svg class="size-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m15 18-6-6 6-6" /></svg>
|
|
Previous season
|
|
</span>
|
|
{{end}}
|
|
{{if .Next}}
|
|
<a href="/simulcast?season={{.Next.Season}}&year={{.Next.Year}}" class="inline-flex items-center gap-2 transition-colors hover:text-foreground">
|
|
Next season
|
|
<svg class="size-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m9 18 6-6-6-6" /></svg>
|
|
</a>
|
|
{{else}}
|
|
<span class="inline-flex cursor-not-allowed items-center gap-2 opacity-35" aria-disabled="true">
|
|
Next season
|
|
<svg class="size-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m9 18 6-6-6-6" /></svg>
|
|
</span>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
{{end}}
|