refactor: use tailwind theme utilities

This commit is contained in:
2026-06-20 19:39:34 +02:00
committed by Milas Holsting
parent 2dca69c9f4
commit 2593a45cc3
10 changed files with 21 additions and 22 deletions

View File

@@ -50,7 +50,7 @@
<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 right-0 bottom-full mb-2 min-w-40 bg-background-button shadow-(--shadow-card) ring-1 ring-black/10">
<div data-content class="hidden absolute z-50 right-0 bottom-full mb-2 min-w-40 bg-background-button shadow-card ring-1 ring-black/10">
<div class="flex flex-col">
<button
data-unstyled-button
@@ -114,7 +114,7 @@
More
</button>
</div>
<div data-content class="hidden absolute z-50 right-0 bottom-full mb-2 min-w-55 bg-background-button shadow-(--shadow-card) ring-1 ring-black/10">
<div data-content class="hidden absolute z-50 right-0 bottom-full mb-2 min-w-55 bg-background-button shadow-card ring-1 ring-black/10">
<div class="flex flex-col">
<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
@@ -124,7 +124,7 @@
</ui-dropdown>
<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">
<div class="w-full max-w-130 max-h-[min(420px,60vh)] overflow-auto bg-background-button shadow-(--shadow-card) ring-1 ring-black/10">
<div class="w-full max-w-130 max-h-[min(420px,60vh)] overflow-auto bg-background-button shadow-card ring-1 ring-black/10">
<div class="flex items-start justify-between px-4 py-3">
<span id="segment-editor-title" class="text-base font-medium tracking-[0.02em] text-foreground">Segment capture</span>
<button type="button" data-segment-editor-close class="inline-flex h-8 w-8 items-center justify-center text-foreground/60 transition-opacity hover:text-foreground/80 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent" aria-label="Close segment capture modal">
@@ -145,7 +145,7 @@
<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-(--shadow-card) ring-1 ring-black/10">
<div data-content class="hidden absolute z-50 top-full mt-1 left-0 w-full bg-background-button shadow-card ring-1 ring-black/10">
<div class="flex flex-col">
<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>
@@ -203,7 +203,7 @@
<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-(--shadow-card) ring-1 ring-black/10 max-h-64 overflow-y-auto scrollbar-hidden lg:scrollbar-thin lg:[scrollbar-color:var(--scrollbar-thumb)_var(--scrollbar-track)] lg:[&::-webkit-scrollbar]:block lg:[&::-webkit-scrollbar]:h-2 lg:[&::-webkit-scrollbar-track]:bg-(--scrollbar-track) lg:[&::-webkit-scrollbar-track]:rounded-none lg:[&::-webkit-scrollbar-thumb]:bg-(--scrollbar-thumb) lg:[&::-webkit-scrollbar-thumb]:rounded-none lg:[&::-webkit-scrollbar-thumb:hover]:bg-(--scrollbar-thumb-hover)">
<div data-content class="hidden absolute z-50 top-full mt-1 left-0 w-full bg-background-button shadow-card ring-1 ring-black/10 max-h-64 overflow-y-auto scrollbar-hidden lg:scrollbar-thin lg:[scrollbar-color:var(--scrollbar-thumb)_var(--scrollbar-track)] lg:[&::-webkit-scrollbar]:block lg:[&::-webkit-scrollbar]:h-2 lg:[&::-webkit-scrollbar-track]:bg-(--scrollbar-track) lg:[&::-webkit-scrollbar-track]:rounded-none lg:[&::-webkit-scrollbar-thumb]:bg-(--scrollbar-thumb) lg:[&::-webkit-scrollbar-thumb]:rounded-none lg:[&::-webkit-scrollbar-thumb:hover]:bg-(--scrollbar-thumb-hover)">
<div class="flex flex-col">
{{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">
@@ -239,7 +239,7 @@
<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-(--shadow-card) ring-1 ring-black/10">
<div data-content class="hidden absolute z-50 top-full mt-1 left-0 min-w-50 bg-background-button shadow-card ring-1 ring-black/10">
<div class="flex flex-col">
{{$ranges := ceilDiv $totalEpisodes 100}}
{{range $i := seq $ranges}}
@@ -271,7 +271,7 @@
{{end}}
</div>
{{else}}
<div class="flex min-h-0 flex-1 flex-col gap-1 pb-4 mt-2 overflow-y-auto scrollbar-hidden" data-episode-list style="overscroll-behavior-y: contain">
<div class="mt-2 flex min-h-0 flex-1 flex-col gap-1 overflow-y-auto overscroll-contain pb-4 scrollbar-hidden" data-episode-list>
{{range $episodes}}
{{$isCurrent := eq (printf "%v" .Number) $currentEpID}}
{{$isFiller := .Filler}}