Skip to content

Commit 0ec1b3d

Browse files
committed
fixed for tailwindcss style and some refactor
1 parent 99acf32 commit 0ec1b3d

13 files changed

Lines changed: 271 additions & 275 deletions

frontend/src/components/FloatingActionBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export const FloatingActionBar = ({
7878
value={selectedAction}
7979
onValueChange={(v) => setSelectedAction(v as BulkAction)}
8080
>
81-
<SelectTrigger className="w-[100px] h-10">
81+
<SelectTrigger className="w-25 h-10">
8282
<SelectValue />
8383
</SelectTrigger>
8484
<SelectContent>

frontend/src/components/Header.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export function Header({
4747
</div>
4848

4949
<div className="flex min-w-0 flex-wrap items-center gap-2.5">
50-
<h2 className="min-w-0 break-words text-xl leading-none font-extrabold tracking-tight text-foreground sm:text-2xl">
50+
<h2 className="min-w-0 wrap-break-word text-xl leading-none font-extrabold tracking-tight text-foreground sm:text-2xl">
5151
{title}
5252
</h2>
5353
{releaseVersion && (
@@ -118,7 +118,7 @@ export function Header({
118118
className="h-12 w-12 cursor-pointer rounded-full border-border/70 bg-background/90 text-foreground shadow-sm transition-all hover:-translate-y-0.5 hover:border-destructive/40 hover:bg-background hover:text-destructive"
119119
aria-label="Logout"
120120
>
121-
<LogOut className="h-[22px] w-[22px]" />
121+
<LogOut className="h-5.5 w-5.5" />
122122
</Button>
123123
</TooltipTrigger>
124124
<TooltipContent>

frontend/src/components/LandingHero.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ export function LandingHero() {
287287
className="pointer-events-none absolute inset-0"
288288
>
289289
<div
290-
className="absolute inset-0 opacity-45 [background-size:14px_14px] [mask-image:linear-gradient(to_bottom,white,transparent_82%)]"
290+
className="absolute inset-0 opacity-45 bg-size-[14px_14px] mask-[linear-gradient(to_bottom,white,transparent_82%)]"
291291
style={{
292292
backgroundImage:
293293
"radial-gradient(var(--hero-grid-dot) 0.8px, transparent 0.8px)",
@@ -327,10 +327,10 @@ export function LandingHero() {
327327
<div className="pointer-events-none absolute inset-x-0 top-6 flex justify-center sm:top-8">
328328
<div className="h-28 w-28 rounded-full bg-primary/16 blur-3xl dark:bg-primary/22" />
329329
</div>
330-
<div className="pointer-events-none absolute inset-y-0 left-0 z-40 w-12 bg-gradient-to-r from-background via-background/74 to-transparent dark:from-background dark:via-background/60 sm:w-24" />
331-
<div className="pointer-events-none absolute inset-y-0 right-0 z-40 w-12 bg-gradient-to-l from-background via-background/74 to-transparent dark:from-background dark:via-background/60 sm:w-24" />
330+
<div className="pointer-events-none absolute inset-y-0 left-0 z-40 w-12 bg-linear-to-r from-background via-background/74 to-transparent dark:from-background dark:via-background/60 sm:w-24" />
331+
<div className="pointer-events-none absolute inset-y-0 right-0 z-40 w-12 bg-linear-to-l from-background via-background/74 to-transparent dark:from-background dark:via-background/60 sm:w-24" />
332332

333-
<div className="relative h-[328px] sm:h-[360px]">
333+
<div className="relative h-82 sm:h-90">
334334
<div
335335
onPointerDown={handlePointerDown}
336336
onPointerMove={handlePointerMove}
@@ -353,12 +353,12 @@ export function LandingHero() {
353353
return (
354354
<article
355355
key={`${card.key}-${index}`}
356-
className={`relative h-[244px] shrink-0 overflow-hidden rounded-[1.65rem] border px-5 py-5 text-left transition-[opacity,transform,box-shadow] duration-700 ease-[cubic-bezier(0.22,1,0.36,1)] sm:h-[268px] sm:px-7 sm:py-6 ${
356+
className={`relative h-61 shrink-0 overflow-hidden rounded-[1.65rem] border px-5 py-5 text-left transition-[opacity,transform,box-shadow] duration-700 ease-[cubic-bezier(0.22,1,0.36,1)] sm:h-67 sm:px-7 sm:py-6 ${
357357
isActive
358-
? "border-primary/24 bg-white/92 opacity-100 shadow-[0_24px_54px_rgba(15,23,42,0.08)] dark:bg-white/[0.08] dark:shadow-[0_26px_60px_rgba(0,0,0,0.22)]"
358+
? "border-primary/24 bg-white/92 opacity-100 shadow-[0_24px_54px_rgba(15,23,42,0.08)] dark:bg-white/8 dark:shadow-[0_26px_60px_rgba(0,0,0,0.22)]"
359359
: distance === 1
360-
? "border-border/70 bg-background/78 opacity-62 shadow-[0_14px_32px_rgba(15,23,42,0.04)] dark:bg-white/[0.04]"
361-
: "border-border/60 bg-background/70 opacity-30 shadow-none dark:bg-white/[0.03]"
360+
? "border-border/70 bg-background/78 opacity-62 shadow-[0_14px_32px_rgba(15,23,42,0.04)] dark:bg-white/4"
361+
: "border-border/60 bg-background/70 opacity-30 shadow-none dark:bg-white/3"
362362
} ${isActive ? "translate-y-0 scale-100" : "translate-y-5 scale-[0.95]"}`}
363363
style={{ width: `${slideSize}px` }}
364364
aria-hidden={!isActive}
@@ -379,7 +379,7 @@ export function LandingHero() {
379379
</p>
380380
</div>
381381
<div className="mt-auto pt-8">
382-
<div className="h-px w-16 bg-gradient-to-r from-primary/55 to-transparent" />
382+
<div className="h-px w-16 bg-linear-to-r from-primary/55 to-transparent" />
383383
</div>
384384
</div>
385385
</article>
@@ -394,7 +394,7 @@ export function LandingHero() {
394394
<div className="relative -mx-4 w-auto sm:-mx-6 md:-mx-8">
395395
<div className="overflow-hidden border-t border-border/80 bg-border/70">
396396
<div className="grid gap-px sm:grid-cols-2 lg:grid-cols-3">
397-
<div className="flex min-h-[184px] bg-background/88 p-6 text-left sm:min-h-[196px] sm:p-7">
397+
<div className="flex min-h-46 bg-background/88 p-6 text-left sm:min-h-49 sm:p-7">
398398
<div className="space-y-2">
399399
<p className="text-sm font-semibold uppercase tracking-[0.3em] text-primary">
400400
Core features
@@ -411,7 +411,7 @@ export function LandingHero() {
411411
{heroFeatures.map(({ title, description }) => (
412412
<article
413413
key={title}
414-
className="flex min-h-[184px] bg-background/88 p-6 text-left transition-colors duration-200 hover:bg-background/92 sm:min-h-[196px] sm:p-7"
414+
className="flex min-h-46 bg-background/88 p-6 text-left transition-colors duration-200 hover:bg-background/92 sm:min-h-49 sm:p-7"
415415
>
416416
<div className="space-y-2">
417417
<h3 className="whitespace-nowrap text-[1.2rem] font-semibold tracking-tight text-foreground sm:text-[1.32rem] sm:leading-none">
@@ -439,7 +439,7 @@ export function LandingHero() {
439439
</div>
440440

441441
<div
442-
className="relative mx-auto mt-4 w-full max-w-[520px] rounded-[1.75rem] border px-4 py-5 sm:px-5 sm:py-6"
442+
className="relative mx-auto mt-4 w-full max-w-130 rounded-xl border px-4 py-5 sm:px-5 sm:py-6"
443443
style={{
444444
background: "var(--hero-terminal-bg)",
445445
borderColor: "var(--hero-terminal-border)",

frontend/src/components/SearchBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export function SearchBar({
3838
return (
3939
<div className="flex flex-wrap mt-4 sm:mt-6 items-center gap-3 px-4 sm:px-6">
4040
<div className="flex gap-2 items-center w-full">
41-
<label className="flex min-w-[220px] flex-1 items-stretch h-10 relative">
41+
<label className="flex min-w-55 flex-1 items-stretch h-10 relative">
4242
<div className="left-0 h-full absolute text-text-muted flex items-center justify-center pl-3 pr-2 rounded-l-md bg-border border border-border">
4343
<Search className="w-4 h-4" />
4444
</div>

frontend/src/components/ServerCard.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ export function ServerCard({
226226
<article
227227
data-hero-key={`server-bg-${serverId}`}
228228
className={clsx(
229-
"group flex h-full flex-col overflow-hidden rounded-[1.75rem] border border-border bg-card shadow-[0_18px_42px_oklch(0%_0_0_/_0.06)] transition-transform duration-200 hover:-translate-y-1 hover:shadow-[0_24px_56px_oklch(0%_0_0_/_0.08)]",
230-
showAdminControls ? "min-h-[360px]" : "min-h-[310px]"
229+
"group flex h-full flex-col overflow-hidden rounded-xl border border-border bg-card shadow-[0_18px_42px_oklch(0%_0_0/0.06)] transition-transform duration-200 hover:-translate-y-1 hover:shadow-[0_24px_56px_oklch(0%_0_0/0.08)]",
230+
showAdminControls ? "min-h-90" : "min-h-77.5"
231231
)}
232232
>
233233
<div
@@ -248,7 +248,7 @@ export function ServerCard({
248248
)}
249249

250250
<div className="absolute inset-x-0 top-0 flex items-start justify-between p-4">
251-
<div className="inline-flex items-center gap-2 rounded-full border border-border bg-card/95 px-3 py-1 text-[11px] font-semibold uppercase tracking-[0.18em] text-foreground shadow-[0_8px_18px_oklch(0%_0_0_/_0.05)]">
251+
<div className="inline-flex items-center gap-2 rounded-full border border-border bg-card/95 px-3 py-1 text-[11px] font-semibold uppercase tracking-[0.18em] text-foreground shadow-[0_8px_18px_oklch(0%_0_0/0.05)]">
252252
<span
253253
className={clsx(
254254
"h-2.5 w-2.5 rounded-full",
@@ -270,7 +270,7 @@ export function ServerCard({
270270
<button
271271
onClick={handleSelectClick}
272272
className={clsx(
273-
"flex size-9 items-center justify-center rounded-full border border-border bg-card/95 text-text-muted shadow-[0_8px_18px_oklch(0%_0_0_/_0.05)] transition-colors cursor-pointer",
273+
"flex size-9 items-center justify-center rounded-full border border-border bg-card/95 text-text-muted shadow-[0_8px_18px_oklch(0%_0_0/0.05)] transition-colors cursor-pointer",
274274
isSelected
275275
? "bg-primary text-primary-foreground"
276276
: "hover:text-foreground"
@@ -280,7 +280,7 @@ export function ServerCard({
280280
<svg
281281
xmlns="http://www.w3.org/2000/svg"
282282
viewBox="0 0 24 24"
283-
className="h-[18px] w-[18px]"
283+
className="h-4.5 w-4.5"
284284
fill="none"
285285
stroke="currentColor"
286286
strokeWidth="3"
@@ -294,7 +294,7 @@ export function ServerCard({
294294
<button
295295
onClick={handleFavoriteClick}
296296
className={clsx(
297-
"flex size-9 items-center justify-center rounded-full border border-border bg-card/95 text-text-muted shadow-[0_8px_18px_oklch(0%_0_0_/_0.05)] transition-colors cursor-pointer",
297+
"flex size-9 items-center justify-center rounded-full border border-border bg-card/95 text-text-muted shadow-[0_8px_18px_oklch(0%_0_0/0.05)] transition-colors cursor-pointer",
298298
isFavorite
299299
? "bg-primary text-primary-foreground"
300300
: "hover:text-foreground"
@@ -306,7 +306,7 @@ export function ServerCard({
306306
<svg
307307
xmlns="http://www.w3.org/2000/svg"
308308
viewBox="0 0 24 24"
309-
className="h-[18px] w-[18px]"
309+
className="h-4.5 w-4.5"
310310
fill={isFavorite ? "currentColor" : "none"}
311311
stroke="currentColor"
312312
strokeWidth="2"
@@ -359,7 +359,7 @@ export function ServerCard({
359359
</div>
360360

361361
{showAdminControls && leaseId && (
362-
<div className="flex flex-col gap-3 rounded-[1.5rem] border border-border bg-secondary/70 p-4">
362+
<div className="flex flex-col gap-3 rounded-3xl border border-border bg-secondary/70 p-4">
363363
{onBPSChange && (
364364
<div className="flex items-center justify-between gap-4">
365365
<span className="text-xs text-text-muted">

frontend/src/components/ServerListView.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ export function ServerListView({
634634
</>
635635
) : (
636636
<>
637-
<div className="sticky top-0 z-20 w-full bg-background/95 py-5 backdrop-blur supports-[backdrop-filter]:bg-background/80">
637+
<div className="sticky top-0 z-20 w-full bg-background/95 py-5 backdrop-blur supports-backdrop-filter:bg-background/80">
638638
<div className="flex w-full flex-col px-6 sm:px-8 lg:px-10">
639639
<Header
640640
title={title}
@@ -655,7 +655,7 @@ export function ServerListView({
655655
<section
656656
id="live-servers"
657657
aria-labelledby="live-servers-title"
658-
className="scroll-mt-24 min-h-[34rem] border-b border-border/80 px-4 py-8 sm:min-h-[36rem] sm:px-6 md:px-8"
658+
className="scroll-mt-24 min-h-136 border-b border-border/80 px-4 py-8 sm:min-h-144 sm:px-6 md:px-8"
659659
>
660660
<div className="flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between">
661661
<div className="space-y-2">
@@ -681,7 +681,7 @@ export function ServerListView({
681681
{serverGrid}
682682
</div>
683683
) : (
684-
<div className="mt-6 flex min-h-[22rem] flex-col">
684+
<div className="mt-6 flex min-h-88 flex-col">
685685
{searchBar}
686686
<div className="px-1 pt-3 text-sm text-text-muted">
687687
0 services visible
@@ -720,7 +720,7 @@ export function ServerListView({
720720
</a>
721721
</div>
722722

723-
<div className="mt-6 rounded-[1.75rem] border border-border/80 bg-secondary/35 p-5 sm:p-6">
723+
<div className="mt-6 rounded-xl border border-border/80 bg-secondary/35 p-5 sm:p-6">
724724
{officialRegistryRelays === null ? (
725725
<p className="text-sm text-text-muted">
726726
Loading official registry...

frontend/src/components/TagCombobox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export function TagCombobox({
125125
onBlur={handleBlur}
126126
onKeyDown={handleKeyDown}
127127
placeholder="Add tag…"
128-
className="min-w-[120px] flex-1 bg-transparent text-sm outline-none placeholder:text-text-muted"
128+
className="min-w-30 flex-1 bg-transparent text-sm outline-none placeholder:text-text-muted"
129129
role="combobox"
130130
aria-expanded={open}
131131
aria-controls={listId}

frontend/src/components/ThemeToggleButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ export function ThemeToggleButton({ className }: ThemeToggleButtonProps) {
2525
title={theme === "dark" ? "Light theme" : "Dark theme"}
2626
>
2727
{theme === "dark" ? (
28-
<Sun className="h-[22px] w-[22px]" />
28+
<Sun className="h-5.5 w-5.5" />
2929
) : (
30-
<Moon className="h-[22px] w-[22px]" />
30+
<Moon className="h-5.5 w-5.5" />
3131
)}
3232
</Button>
3333
);

0 commit comments

Comments
 (0)