fix: standardize watch page and player dropdown styles

This commit is contained in:
2026-05-25 01:54:30 +02:00
parent 585b02b37a
commit 345c3b05f7
2 changed files with 105 additions and 94 deletions

View File

@@ -73,17 +73,17 @@
<svg class="size-6 transition-transform duration-300" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg>
</button>
</div>
<div data-content class="hidden absolute z-50 w-64 bg-background-button rounded-none shadow-[var(--shadow-card)] right-0 bottom-full mb-2">
<div data-content class="hidden absolute z-50 w-64 bg-background-button rounded-none shadow-[var(--shadow-card)] ring-1 ring-black/10 right-0 bottom-full mb-2">
<div class="flex flex-col py-1">
<div class="flex items-center justify-between px-5 py-2.5">
<span class="text-[15px] font-medium text-foreground">Autoplay</span>
<span class="text-[15px] font-normal text-foreground">Autoplay</span>
<label class="relative inline-flex cursor-pointer items-center">
<input id="player-autoplay" type="checkbox" data-autoplay class="peer sr-only" checked />
<div class="peer-checked:bg-accent peer h-5 w-9 rounded-full bg-foreground-muted/20 transition-colors after:absolute after:top-[2px] after:left-[2px] after:h-4 after:w-4 after:rounded-full after:bg-white after:transition-all peer-checked:after:translate-x-full"></div>
</label>
</div>
<div class="flex items-center justify-between px-5 py-2.5">
<span class="text-[15px] font-medium text-foreground">Auto-skip</span>
<span class="text-[15px] font-normal text-foreground">Auto-skip</span>
<label class="relative inline-flex cursor-pointer items-center">
<input id="player-autoskip" type="checkbox" data-autoskip class="peer sr-only" />
<div class="peer-checked:bg-accent peer h-5 w-9 rounded-full bg-foreground-muted/20 transition-colors after:absolute after:top-[2px] after:left-[2px] after:h-4 after:w-4 after:rounded-full after:bg-white after:transition-all peer-checked:after:translate-x-full"></div>
@@ -91,20 +91,20 @@
</div>
<div class="my-1 h-px w-full bg-white/10"></div>
<div class="py-1">
<span class="mb-1 block px-5 text-xs font-medium tracking-wider text-foreground-muted">Audio / Subtitles</span>
<span class="mb-1 block px-5 text-xs font-normal tracking-wider text-foreground-muted">Audio / Subtitles</span>
<div class="flex flex-col">
<button data-mode-dub data-unstyled-button class="flex items-center justify-between px-5 py-2.5 text-left transition-colors hover:bg-surface-hover text-foreground focus:outline-none">
<span class="text-sm font-medium">English (Dub)</span>
<button data-mode-dub data-unstyled-button class="flex items-center justify-between px-5 py-2.5 text-left transition-colors hover:bg-surface-hover text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">
<span class="text-sm font-normal">English (Dub)</span>
</button>
<button data-mode-sub data-unstyled-button class="flex items-center justify-between px-5 py-2.5 text-left transition-colors hover:bg-surface-hover text-foreground focus:outline-none">
<span class="text-sm font-medium">Japanese (Sub)</span>
<button data-mode-sub data-unstyled-button class="flex items-center justify-between px-5 py-2.5 text-left transition-colors hover:bg-surface-hover text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">
<span class="text-sm font-normal">Japanese (Sub)</span>
</button>
<div class="hidden px-5 py-2 flex flex-col gap-1">
<span class="text-[10px] text-neutral-500 uppercase font-bold tracking-widest">Subtitles</span>
<span class="text-[10px] text-neutral-500 uppercase font-normal tracking-widest">Subtitles</span>
<select id="player-subtitle-select" data-subtitle-select class="w-full bg-white/5 text-white text-xs px-2 py-1.5 outline-none rounded"></select>
</div>
<div class="hidden px-5 py-2 flex flex-col gap-1">
<span class="text-[10px] text-neutral-500 uppercase font-bold tracking-widest">Quality</span>
<span class="text-[10px] text-neutral-500 uppercase font-normal tracking-widest">Quality</span>
<select id="player-quality-select" data-quality-select class="w-full bg-white/5 text-white text-xs px-2 py-1.5 outline-none rounded"></select>
</div>
</div>

View File

@@ -12,21 +12,21 @@
<div id="watch-layout" class="flex flex-col gap-6 lg:flex-row lg:gap-6{{if le $totalEpisodes 100}} max-h-dvh{{end}}">
<div class="{{if le $totalEpisodes 100}}shrink-0 lg:flex-1 lg:self-start{{else}}flex-1{{end}} min-w-0">
<div class="flex items-center justify-between mb-4">
<a href="/anime/{{$anime.MalID}}" class="inline-flex items-center gap-2 text-sm text-foreground-muted hover:text-foreground transition-colors">
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18" /></svg>
<div class="mb-4 flex items-center justify-between">
<a href="/anime/{{$anime.MalID}}" class="inline-flex items-center gap-2 text-sm text-foreground-muted transition-colors hover:text-foreground">
<svg class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8"><path stroke-linecap="round" stroke-linejoin="round" d="M10 19l-7-7m0 0l7-7m-7 7h18" /></svg>
Back
</a>
<ui-dropdown class="relative block" data-align="right" data-width="min-w-[160px]">
<div data-trigger class="cursor-pointer">
<button type="button" class="bg-accent/20 hover:bg-accent/30 flex items-center justify-between gap-2 px-4 py-2 text-sm text-accent font-normal transition-colors">
<button type="button" class="!rounded-none flex items-center justify-between gap-2 bg-background-button px-4 py-2 text-sm font-normal text-foreground transition-colors hover:bg-background-button-hover focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">
<span id="watchlist-status-display-{{$anime.MalID}}">
{{if .WatchlistStatus}}{{if eq .WatchlistStatus "watching"}}Watching{{else if eq .WatchlistStatus "completed"}}Completed{{else if eq .WatchlistStatus "plan_to_watch"}}Plan to Watch{{else if eq .WatchlistStatus "dropped"}}Dropped{{end}}{{else}}Add to Watchlist{{end}}
</span>
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m6 9 6 6 6-6" /></svg>
<svg class="h-4 w-4 text-foreground-muted" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8"><path stroke-linecap="round" stroke-linejoin="round" d="m6 9 6 6 6-6" /></svg>
</button>
</div>
<div data-content class="hidden absolute z-50 min-w-40 bg-background-button shadow-[var(--shadow-card)] right-0 top-full mt-2">
<div data-content class="hidden absolute z-50 min-w-40 bg-background-button shadow-[var(--shadow-card)] ring-1 ring-black/10 right-0 top-full mt-2">
<div class="flex flex-col py-1">
<button
data-unstyled-button
@@ -35,9 +35,9 @@
data-watchlist-status="watching"
data-watchlist-display="Watching"
data-watchlist-title="{{$anime.Title}}"
class="flex w-full items-center px-5 py-2.5 transition-colors focus:outline-none hover:bg-surface-hover disabled:opacity-50"
class="flex w-full items-center px-5 py-2.5 text-left transition-colors hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent disabled:opacity-50"
>
<span class="text-sm text-foreground">Watching</span>
<span class="text-sm font-normal text-foreground">Watching</span>
</button>
<button
data-unstyled-button
@@ -46,9 +46,9 @@
data-watchlist-status="completed"
data-watchlist-display="Completed"
data-watchlist-title="{{$anime.Title}}"
class="flex w-full items-center px-5 py-2.5 transition-colors focus:outline-none hover:bg-surface-hover disabled:opacity-50"
class="flex w-full items-center px-5 py-2.5 text-left transition-colors hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent disabled:opacity-50"
>
<span class="text-sm text-foreground">Completed</span>
<span class="text-sm font-normal text-foreground">Completed</span>
</button>
<button
data-unstyled-button
@@ -57,9 +57,9 @@
data-watchlist-status="plan_to_watch"
data-watchlist-display="Plan to Watch"
data-watchlist-title="{{$anime.Title}}"
class="flex w-full items-center px-5 py-2.5 transition-colors focus:outline-none hover:bg-surface-hover disabled:opacity-50"
class="flex w-full items-center px-5 py-2.5 text-left transition-colors hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent disabled:opacity-50"
>
<span class="text-sm text-foreground">Plan to Watch</span>
<span class="text-sm font-normal text-foreground">Plan to Watch</span>
</button>
<button
data-unstyled-button
@@ -68,17 +68,17 @@
data-watchlist-status="dropped"
data-watchlist-display="Dropped"
data-watchlist-title="{{$anime.Title}}"
class="flex w-full items-center px-5 py-2.5 transition-colors focus:outline-none hover:bg-surface-hover disabled:opacity-50"
class="flex w-full items-center px-5 py-2.5 text-left transition-colors hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent disabled:opacity-50"
>
<span class="text-sm text-foreground">Dropped</span>
<span class="text-sm font-normal text-foreground">Dropped</span>
</button>
{{template "watchlist_remove_button" dict
"ID" $anime.MalID
"Title" $anime.Title
"ContainerClass" "hidden"
"DividerClass" "my-1"
"ButtonClass" "flex w-full items-center px-5 py-2.5 transition-colors focus:outline-none hover:bg-red-500/10"
"SpanClass" "text-sm text-red-400 whitespace-nowrap"
"ButtonClass" "flex w-full items-center px-5 py-2.5 text-left transition-colors hover:bg-red-500/10 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent"
"SpanClass" "text-sm font-normal text-red-400 whitespace-nowrap"
}}
</div>
</div>
@@ -92,86 +92,97 @@
<div class="flex gap-2">
{{$prevEp := sub (int $currentEpID) 1}}
{{if ge $prevEp 1}}
<a href="/anime/{{$anime.MalID}}/watch?ep={{$prevEp}}" class="inline-flex items-center gap-2 px-4 py-2 bg-background-surface hover:bg-surface-hover text-sm text-foreground-muted leading-none transition-colors">
<svg class="block w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7" /></svg>
<a href="/anime/{{$anime.MalID}}/watch?ep={{$prevEp}}" class="!rounded-none inline-flex items-center gap-2 bg-background-button px-4 py-2 text-sm font-normal leading-none text-foreground-muted transition-colors hover:bg-background-button-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">
<svg class="block h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19l-7-7 7-7" /></svg>
Prev
</a>
{{end}}
{{$nextEp := add (int $currentEpID) 1}}
{{if le $nextEp $totalEpisodes}}
<a href="/anime/{{$anime.MalID}}/watch?ep={{$nextEp}}" class="inline-flex items-center gap-2 px-4 py-2 bg-background-surface hover:bg-surface-hover text-sm text-foreground-muted leading-none transition-colors">
<a href="/anime/{{$anime.MalID}}/watch?ep={{$nextEp}}" class="!rounded-none inline-flex items-center gap-2 bg-background-button px-4 py-2 text-sm font-normal leading-none text-foreground-muted transition-colors hover:bg-background-button-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">
Next
<svg class="block w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7" /></svg>
<svg class="block h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8"><path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7" /></svg>
</a>
{{end}}
</div>
<div class="flex justify-end" data-segment-editor-root>
<div class="relative">
<button type="button" data-segment-editor-toggle class="inline-flex items-center gap-2 px-4 py-2 bg-background-surface hover:bg-surface-hover text-sm text-foreground-muted leading-none transition-colors">
<svg class="block w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4" /></svg>
Add missing segment
</button>
<div data-segment-editor class="hidden absolute right-0 bottom-full mb-2 z-50 w-[520px] max-w-[calc(100vw-2rem)] max-h-[min(420px,60vh)] overflow-auto bg-background-surface shadow-[var(--shadow-card)]">
<div class="flex items-center justify-between px-4 py-3">
<div class="flex flex-col">
<span class="text-sm font-semibold text-foreground">Segment capture</span>
<span class="text-xs text-foreground-muted">Mark start (position 1), then end (position 2), then save.</span>
<ui-dropdown class="relative block" data-align="right" data-width="min-w-[220px]">
<div data-trigger>
<button type="button" class="!rounded-none inline-flex items-center gap-2 bg-background-button px-4 py-2 text-sm font-normal leading-none text-foreground-muted transition-colors hover:bg-background-button-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">
<svg class="block h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8"><circle cx="12" cy="12" r="1.5"/><circle cx="5" cy="12" r="1.5"/><circle cx="19" cy="12" r="1.5"/></svg>
More
</button>
</div>
<button type="button" data-segment-editor-close class="text-sm text-foreground-muted hover:text-foreground transition-colors">Close</button>
</div>
<div data-content class="hidden absolute z-50 right-0 top-full mt-2 min-w-[220px] bg-background-button shadow-[var(--shadow-card)] ring-1 ring-black/10">
<div class="flex flex-col py-1">
<button type="button" data-segment-editor-toggle class="flex w-full items-center px-4 py-2.5 text-left text-sm font-normal text-foreground-muted transition-colors hover:bg-surface-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">
Add missing segment
</button>
</div>
</div>
</ui-dropdown>
<div class="px-4 py-4 flex flex-col gap-4">
<div class="flex items-center gap-3">
<label for="segment-type-trigger" class="text-xs text-foreground-muted w-12">Type</label>
<input type="hidden" data-segment-type-value value="ed" />
<ui-dropdown class="relative block flex-1" data-align="left" data-width="w-full">
<div data-trigger>
<button id="segment-type-trigger" type="button" data-segment-type-trigger class="w-full flex items-center justify-between px-3 py-2 bg-background-button text-sm text-foreground hover:bg-surface-hover transition-colors">
<span data-segment-type-label>Ending (ED)</span>
<svg class="w-4 h-4 text-foreground-muted" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m6 9 6 6 6-6" /></svg>
</button>
</div>
<div data-content class="hidden absolute z-50 top-full mt-1 left-0 w-full bg-background-button shadow-[var(--shadow-card)]">
<div class="flex flex-col py-1">
<button type="button" data-segment-type-option data-value="ed" class="flex w-full items-center justify-between px-4 py-2.5 text-left transition-colors hover:bg-surface-hover">
<span class="text-sm text-foreground">Ending (ED)</span>
</button>
<button type="button" data-segment-type-option data-value="op" class="flex w-full items-center justify-between px-4 py-2.5 text-left transition-colors hover:bg-surface-hover">
<span class="text-sm text-foreground">Opening (OP)</span>
<div data-segment-editor class="hidden fixed inset-0 z-50 items-center justify-center bg-black/50 px-4" role="dialog" aria-modal="true" aria-labelledby="segment-editor-title" aria-describedby="segment-editor-description">
<div class="w-full max-w-[520px] max-h-[min(420px,60vh)] overflow-auto bg-background-button shadow-[var(--shadow-card)] ring-1 ring-black/10">
<div class="flex items-center justify-between px-4 py-3">
<div class="flex flex-col">
<span id="segment-editor-title" class="text-sm font-normal text-foreground">Segment capture</span>
<span id="segment-editor-description" class="text-xs text-foreground-muted">Mark start (position 1), then end (position 2), then save.</span>
</div>
<button type="button" data-segment-editor-close class="text-sm font-normal text-foreground-muted transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">Close</button>
</div>
<div class="px-4 py-4 flex flex-col gap-4">
<div class="flex items-center gap-3">
<label for="segment-type-trigger" class="text-xs text-foreground-muted w-12">Type</label>
<input type="hidden" data-segment-type-value value="ed" />
<ui-dropdown class="relative block flex-1" data-align="left" data-width="w-full">
<div data-trigger>
<button id="segment-type-trigger" type="button" data-segment-type-trigger class="w-full flex items-center justify-between px-3 py-2 bg-background-button text-sm font-normal text-foreground transition-colors hover:bg-background-button-hover focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">
<span data-segment-type-label>Ending (ED)</span>
<svg class="h-4 w-4 text-foreground-muted" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8"><path stroke-linecap="round" stroke-linejoin="round" d="m6 9 6 6 6-6" /></svg>
</button>
</div>
<div data-content class="hidden absolute z-50 top-full mt-1 left-0 w-full bg-background-button shadow-[var(--shadow-card)] ring-1 ring-black/10">
<div class="flex flex-col py-1">
<button type="button" data-segment-type-option data-value="ed" class="flex w-full items-center justify-between px-4 py-2.5 text-left transition-colors hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">
<span class="text-sm font-normal text-foreground">Ending (ED)</span>
</button>
<button type="button" data-segment-type-option data-value="op" class="flex w-full items-center justify-between px-4 py-2.5 text-left transition-colors hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">
<span class="text-sm font-normal text-foreground">Opening (OP)</span>
</button>
</div>
</div>
</ui-dropdown>
</div>
<div class="grid grid-cols-2 gap-3">
<button type="button" data-segment-mark-start class="!rounded-none px-3 py-2 bg-background-button text-sm font-normal text-foreground transition-colors hover:bg-background-button-hover focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">Mark start</button>
<button type="button" data-segment-mark-end class="!rounded-none px-3 py-2 bg-background-button text-sm font-normal text-foreground transition-colors hover:bg-background-button-hover focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">Mark end</button>
</div>
<div class="grid grid-cols-2 gap-3">
<div class="flex items-center justify-between px-3 py-2 bg-background-button">
<span class="text-xs text-foreground-muted">Start</span>
<span data-segment-start class="text-sm tabular-nums text-foreground">—</span>
</div>
<div class="flex items-center justify-between px-3 py-2 bg-background-button">
<span class="text-xs text-foreground-muted">End</span>
<span data-segment-end class="text-sm tabular-nums text-foreground">—</span>
</div>
</ui-dropdown>
</div>
<div class="grid grid-cols-2 gap-3">
<button type="button" data-segment-mark-start class="px-3 py-2 bg-accent/15 hover:bg-accent/20 text-sm text-accent transition-colors ring-1 ring-accent/30">Mark start</button>
<button type="button" data-segment-mark-end class="px-3 py-2 bg-accent/15 hover:bg-accent/20 text-sm text-accent transition-colors ring-1 ring-accent/30">Mark end</button>
</div>
<div class="grid grid-cols-2 gap-3">
<div class="flex items-center justify-between px-3 py-2 bg-background-button">
<span class="text-xs text-foreground-muted">Start</span>
<span data-segment-start class="text-sm tabular-nums text-foreground">—</span>
</div>
<div class="flex items-center justify-between px-3 py-2 bg-background-button">
<span class="text-xs text-foreground-muted">End</span>
<span data-segment-end class="text-sm tabular-nums text-foreground">—</span>
<div class="flex items-center justify-between">
<button type="button" data-segment-reset class="text-sm font-normal text-foreground-muted transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">Reset</button>
<button type="button" data-segment-save class="!rounded-none px-4 py-2 bg-accent text-sm font-normal text-black transition-opacity hover:opacity-90 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">Save</button>
</div>
</div>
<div class="flex items-center justify-between">
<button type="button" data-segment-reset class="text-sm text-foreground-muted hover:text-foreground transition-colors">Reset</button>
<button type="button" data-segment-save class="px-4 py-2 bg-accent text-black text-sm font-semibold hover:opacity-90 transition-opacity">Save</button>
<div data-segment-error class="hidden text-sm text-red-400"></div>
</div>
<div data-segment-error class="hidden text-sm text-red-400"></div>
</div>
</div>
</div>
</div>
</div>
</div>
@@ -183,19 +194,19 @@
{{end}}
<ui-dropdown class="relative block mb-4" data-align="left" data-width="w-full">
<div data-trigger>
<button class="w-full flex items-center justify-between px-3 py-2 bg-background-surface text-sm text-foreground-muted hover:bg-surface-hover transition-colors">
<button class="w-full flex items-center justify-between px-3 py-2 bg-background-button text-sm font-normal text-foreground-muted hover:bg-background-button-hover transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">
<span class="truncate">
{{if $currentSeason.Prefix}}<span class="font-bold text-foreground mr-1">{{$currentSeason.Prefix}}:</span>{{end}}
{{if $currentSeason.Prefix}}<span class="font-normal text-foreground mr-1">{{$currentSeason.Prefix}}:</span>{{end}}
{{$currentSeason.Title}}
</span>
<svg class="w-4 h-4 text-foreground-muted shrink-0 ml-2" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" /></svg>
<svg class="h-4 w-4 text-foreground-muted shrink-0 ml-2" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8"><path stroke-linecap="round" stroke-linejoin="round" d="M19 9l-7 7-7-7" /></svg>
</button>
</div>
<div data-content class="hidden absolute z-50 top-full mt-1 left-0 w-full bg-background-button shadow-[var(--shadow-card)] max-h-64 overflow-y-auto [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden lg:[-ms-overflow-style:auto] lg:[scrollbar-width:thin] lg:[scrollbar-color:var(--scrollbar-thumb)_var(--scrollbar-track)] lg:[&::-webkit-scrollbar]:block lg:[&::-webkit-scrollbar]:h-2 lg:[&::-webkit-scrollbar-track]:bg-[var(--scrollbar-track)] lg:[&::-webkit-scrollbar-track]:rounded-none lg:[&::-webkit-scrollbar-thumb]:bg-[var(--scrollbar-thumb)] lg:[&::-webkit-scrollbar-thumb]:rounded-none lg:[&::-webkit-scrollbar-thumb:hover]:bg-[var(--scrollbar-thumb-hover)]">
<div data-content class="hidden absolute z-50 top-full mt-1 left-0 w-full bg-background-button shadow-[var(--shadow-card)] ring-1 ring-black/10 max-h-64 overflow-y-auto [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden lg:[-ms-overflow-style:auto] lg:[scrollbar-width:thin] lg:[scrollbar-color:var(--scrollbar-thumb)_var(--scrollbar-track)] lg:[&::-webkit-scrollbar]:block lg:[&::-webkit-scrollbar]:h-2 lg:[&::-webkit-scrollbar-track]:bg-[var(--scrollbar-track)] lg:[&::-webkit-scrollbar-track]:rounded-none lg:[&::-webkit-scrollbar-thumb]:bg-[var(--scrollbar-thumb)] lg:[&::-webkit-scrollbar-thumb]:rounded-none lg:[&::-webkit-scrollbar-thumb:hover]:bg-[var(--scrollbar-thumb-hover)]">
<div class="flex flex-col py-1">
{{range .Seasons}}
<a href="/anime/{{.MalID}}/watch" class="px-4 py-2 text-left text-sm {{if .IsCurrent}}text-accent bg-accent/10{{else}}text-foreground-muted hover:bg-surface-hover{{end}} transition-colors">
<span class="font-bold text-foreground mr-1">{{.Prefix}}:</span>
<span class="font-normal text-foreground mr-1">{{.Prefix}}:</span>
{{.Title}}
</a>
{{end}}
@@ -222,18 +233,18 @@
<div class="flex items-center gap-2">
<ui-dropdown class="relative block grow min-w-0" data-align="left" data-width="min-w-[200px]" data-episode-dropdown>
<div data-trigger>
<button class="w-full flex items-center justify-between px-3 py-2 bg-background-surface text-sm text-foreground-muted hover:bg-surface-hover">
<button class="w-full flex items-center justify-between px-3 py-2 bg-background-button text-sm font-normal text-foreground-muted hover:bg-background-button-hover focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent">
<span data-dropdown-label>{{printf "%02d" $rangeStart}}-{{printf "%02d" $rangeEnd}}</span>
<svg class="w-4 h-4 text-foreground-muted shrink-0 ml-2" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" /></svg>
<svg class="h-4 w-4 text-foreground-muted shrink-0 ml-2" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8"><path stroke-linecap="round" stroke-linejoin="round" d="M19 9l-7 7-7-7" /></svg>
</button>
</div>
<div data-content class="hidden absolute z-50 top-full mt-1 left-0 min-w-50 bg-background-button shadow-[var(--shadow-card)]">
<div data-content class="hidden absolute z-50 top-full mt-1 left-0 min-w-50 bg-background-button shadow-[var(--shadow-card)] ring-1 ring-black/10">
<div class="flex flex-col py-1">
{{$ranges := ceilDiv $totalEpisodes 100}}
{{range $i := seq $ranges}}
{{$start := imul $i 100}}
{{$end := min (add $start 100) $totalEpisodes}}
<button class="episode-range-btn px-4 py-2 text-left text-sm text-foreground-muted hover:bg-surface-hover" data-range-index="{{$i}}" data-range-start="{{add $start 1}}" data-range-end="{{$end}}">
<button class="episode-range-btn px-4 py-2 text-left text-sm font-normal text-foreground-muted hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent" data-range-index="{{$i}}" data-range-start="{{add $start 1}}" data-range-end="{{$end}}">
{{printf "%02d" (add $start 1)}}-{{printf "%02d" $end}}
</button>
{{end}}
@@ -241,7 +252,7 @@
</div>
</ui-dropdown>
<input id="episode-search" type="text" name="episode-search" placeholder="Find" data-episode-search class="w-24 bg-background-surface text-sm px-3 py-2 text-foreground placeholder-foreground-muted focus:outline-none focus:ring-1 focus:ring-accent" />
<input id="episode-search" type="text" name="episode-search" placeholder="Find" data-episode-search class="w-24 bg-background-button text-sm px-3 py-2 text-foreground placeholder-foreground-muted outline-none focus:ring-1 focus:ring-accent" />
</div>
{{end}}
</div>
@@ -252,7 +263,7 @@
{{$isCurrent := eq (printf "%v" .Number) $currentEpID}}
{{$isFiller := .Filler}}
{{$isRecap := .Recap}}
<a href="/anime/{{$anime.MalID}}/watch?ep={{.Number}}" class="relative flex items-center justify-center py-2 text-xs transition-colors {{if or (lt .Number $rangeStart) (gt .Number $rangeEnd)}}hidden{{end}} {{if $isFiller}}bg-yellow-500/20 text-yellow-400{{else if $isRecap}}bg-blue-500/20 text-blue-400{{else}}text-foreground-muted hover:bg-foreground/5{{end}} {{if $isCurrent}}bg-accent/20 text-accent ring-1 ring-accent{{end}}" data-episode-id="{{.Number}}" data-episode-index="{{.Number}}" data-episode-title="{{.Title}}" data-has-sub="{{.HasSub}}" data-has-dub="{{.HasDub}}" data-sub-only="{{.SubOnly}}">
<a href="/anime/{{$anime.MalID}}/watch?ep={{.Number}}" class="relative flex items-center justify-center py-2 text-xs transition-colors {{if or (lt .Number $rangeStart) (gt .Number $rangeEnd)}}hidden{{end}} {{if $isFiller}}bg-yellow-500/20 text-yellow-400{{else if $isRecap}}bg-blue-500/20 text-blue-400{{else}}text-foreground-muted hover:bg-foreground/5{{end}} {{if $isCurrent}}bg-accent/15 text-accent ring-1 ring-accent{{end}}" data-episode-id="{{.Number}}" data-episode-index="{{.Number}}" data-episode-title="{{.Title}}" data-has-sub="{{.HasSub}}" data-has-dub="{{.HasDub}}" data-sub-only="{{.SubOnly}}">
{{.Number}}
{{if .SubOnly}}<span class="absolute right-0.5 top-0.5 text-[8px] font-semibold uppercase text-accent">Sub</span>{{end}}
</a>