refactor: remove watch page borders and update filler/recap indicator

This commit is contained in:
2026-05-24 20:07:36 +02:00
parent 3cd7302c9c
commit 54aca51e2b

View File

@@ -23,7 +23,7 @@
<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>
</button>
</div>
<div data-content class="hidden absolute z-50 min-w-40 bg-background-button shadow-soft ring-1 ring-border right-0 top-full mt-2">
<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 class="flex flex-col py-1">
<button data-unstyled-button class="flex w-full items-center px-5 py-2.5 transition-colors focus:outline-none hover:bg-surface-hover" onclick="updateWatchlist({{$anime.MalID}}, 'watching', 'Watching', '{{$anime.Title}}', this)">
<span class="text-sm text-foreground">Watching</span>
@@ -41,7 +41,7 @@
"ID" $anime.MalID
"Title" $anime.Title
"ContainerClass" "hidden"
"DividerClass" "border-t border-border my-1"
"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"
}}
@@ -73,13 +73,13 @@
<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 ring-1 ring-border">
<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 ring-1 ring-border shadow-soft">
<div class="flex items-center justify-between px-4 py-3 border-b border-border">
<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>
@@ -93,12 +93,12 @@
<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 border border-border text-sm text-foreground hover:bg-surface-hover transition-colors">
<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-soft ring-1 ring-border">
<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>
@@ -117,11 +117,11 @@
</div>
<div class="grid grid-cols-2 gap-3">
<div class="flex items-center justify-between px-3 py-2 bg-background-button ring-1 ring-border">
<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 ring-1 ring-border">
<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>
@@ -148,7 +148,7 @@
{{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 border border-border rounded 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-surface rounded text-sm text-foreground-muted hover:bg-surface-hover transition-colors">
<span class="truncate">
{{if $currentSeason.Prefix}}<span class="font-bold text-foreground mr-1">{{$currentSeason.Prefix}}:</span>{{end}}
{{$currentSeason.Title}}
@@ -156,7 +156,7 @@
<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>
</button>
</div>
<div data-content class="hidden absolute z-50 top-full mt-1 left-0 w-full bg-background-button rounded shadow-soft ring-1 ring-border border border-border max-h-64 overflow-y-auto scrollbar-hide">
<div data-content class="hidden absolute z-50 top-full mt-1 left-0 w-full bg-background-button rounded 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 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">
@@ -179,19 +179,19 @@
<div class="flex items-center justify-between">
<span class="text-sm font-normal text-foreground-muted">Episodes</span>
{{if gt $totalEpisodes 100}}
<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-1.5 rounded border border-border text-foreground placeholder-foreground-muted focus:outline-none focus:border-accent" />
<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-1.5 rounded text-foreground placeholder-foreground-muted focus:outline-none focus:ring-1 focus:ring-accent" />
{{end}}
</div>
{{if gt $totalEpisodes 100}}
<ui-dropdown class="relative block" 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 border border-border rounded text-sm text-foreground-muted hover:bg-surface-hover">
<button class="w-full flex items-center justify-between px-3 py-2 bg-background-surface rounded text-sm text-foreground-muted hover:bg-surface-hover">
<span data-dropdown-label>01-100</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="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 rounded shadow-soft ring-1 ring-border">
<div data-content class="hidden absolute z-50 top-full mt-1 left-0 min-w-50 bg-background-button rounded shadow-[var(--shadow-card)]">
<div class="flex flex-col py-1">
{{$ranges := ceilDiv $totalEpisodes 100}}
{{range $i := seq $ranges}}
@@ -220,12 +220,12 @@
{{end}}
</div>
{{else}}
<div class="flex min-h-0 flex-1 flex-col gap-1 pr-2 pb-4 scrollbar-hide mt-2 overflow-y-auto" data-episode-list style="overscroll-behavior-y: contain">
<div class="flex min-h-0 flex-1 flex-col gap-1 pr-2 pb-4 mt-2 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)]" data-episode-list style="overscroll-behavior-y: contain">
{{range $episodes}}
{{$isCurrent := eq (printf "%v" .Number) $currentEpID}}
{{$isFiller := .Filler}}
{{$isRecap := .Recap}}
<a href="/anime/{{$anime.MalID}}/watch?ep={{.Number}}" class="flex items-center gap-3 px-3 py-2 transition-colors hover:bg-foreground/5 text-left {{if $isFiller}}border-l-2 border-l-yellow-500{{else if $isRecap}}border-l-2 border-l-blue-500{{end}} {{if $isCurrent}}bg-accent/20{{end}}" data-episode-id="{{.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="flex items-center gap-3 px-3 py-2 transition-colors hover:bg-foreground/5 text-left {{if $isFiller}}bg-yellow-500/10{{else if $isRecap}}bg-blue-500/10{{end}} {{if $isCurrent}}bg-accent/20{{end}}" data-episode-id="{{.Number}}" data-episode-title="{{.Title}}" data-has-sub="{{.HasSub}}" data-has-dub="{{.HasDub}}" data-sub-only="{{.SubOnly}}">
<span class="w-10 shrink-0 text-xs font-normal text-foreground-muted tabular-nums">EP{{.Number}}</span>
<span class="truncate text-sm {{if $isFiller}}text-yellow-400{{else if $isRecap}}text-blue-400{{else}}text-foreground-muted{{end}}" data-episode-title>{{.Title}}</span>
{{if .SubOnly}}<span class="ml-auto shrink-0 text-[10px] font-semibold uppercase tracking-wide text-accent">Sub only</span>{{end}}