Skip to content

Commit d69b3c1

Browse files
authored
Codex/vercel style refresh (#50)
* feat: add erasure code calculator page * feat(erasure-code-calculator): integer input formatting, recommended when invalid, Apply feedback - Add formatIntegerInput for servers, drives per server, drive capacity - Show recommended config block when input invalid (corrected params) - Apply button: queueMicrotask for stripe/parity, Applied feedback - fix(select): custom ChevronDown with right-3, appearance-none * fix: align section colors and logo fills * chore: wip --------- Signed-off-by: 安正超 <anzhengchao@gmail.com>
1 parent 672f2a6 commit d69b3c1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+5417
-614
lines changed

app/download/components/code-block.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export default function CodeBlock({ code, title, className }: CodeBlockProps) {c
4646
title={'Copy code'}
4747
>
4848
{copied ? (
49-
<CheckIcon className="w-4 h-4 text-green-500" />
49+
<CheckIcon className="w-4 h-4 text-success" />
5050
) : (
5151
<CopyIcon className="w-4 h-4" />
5252
)}

app/download/components/download-page-client.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ export default function DownloadPageClient({ release, launcherRelease }: Downloa
133133
{release ? formatVersion(release.tag_name) : 'v1.0.0'}
134134
</span>
135135
{release && (
136-
<span className="inline-flex items-center space-x-1 px-2 py-1 bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300 text-xs rounded-full">
137-
<div className="w-1 h-1 bg-green-500 rounded-full"></div>
136+
<span className="inline-flex items-center space-x-1 px-2 py-1 bg-success/10 text-success text-xs rounded-full">
137+
<div className="w-1 h-1 bg-success rounded-full"></div>
138138
<span>{'Latest'}</span>
139139
</span>
140140
)}

app/globals.css

Lines changed: 59 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
@import "tailwindcss";
22
@import "tw-animate-css";
3+
@import "shadcn/tailwind.css";
34

45
@custom-variant dark (&:is(.dark *));
56

67
@theme inline {
78
--color-background: var(--background);
89
--color-foreground: var(--foreground);
9-
--font-sans: var(--font-geist-sans);
10+
--font-sans: var(--font-sans);
1011
--font-mono: var(--font-geist-mono);
1112
--color-sidebar-ring: var(--sidebar-ring);
1213
--color-sidebar-border: var(--sidebar-border);
@@ -25,6 +26,14 @@
2526
--color-input: var(--input);
2627
--color-border: var(--border);
2728
--color-destructive: var(--destructive);
29+
--color-brand: var(--brand);
30+
--color-brand-foreground: var(--brand-foreground);
31+
--color-success: var(--success);
32+
--color-success-foreground: var(--success-foreground);
33+
--color-warning: var(--warning);
34+
--color-warning-foreground: var(--warning-foreground);
35+
--color-info: var(--info);
36+
--color-info-foreground: var(--info-foreground);
2837
--color-accent-foreground: var(--accent-foreground);
2938
--color-accent: var(--accent);
3039
--color-muted-foreground: var(--muted-foreground);
@@ -43,28 +52,34 @@
4352
--radius-xl: calc(var(--radius) + 4px);
4453
--animate-marquee: marquee var(--duration) infinite linear;
4554
--animate-marquee-vertical: marquee-vertical var(--duration) linear infinite;
55+
4656
@keyframes marquee {
47-
from {
48-
transform: translateX(0);
57+
from {
58+
transform: translateX(0);
4959
}
50-
to {
51-
transform: translateX(calc(-100% - var(--gap)));
60+
61+
to {
62+
transform: translateX(calc(-100% - var(--gap)));
5263
}
5364
}
65+
5466
@keyframes marquee-vertical {
55-
from {
56-
transform: translateY(0);
67+
from {
68+
transform: translateY(0);
5769
}
58-
to {
59-
transform: translateY(calc(-100% - var(--gap)));
70+
71+
to {
72+
transform: translateY(calc(-100% - var(--gap)));
6073
}
6174
}
75+
76+
--radius-2xl: calc(var(--radius) + 8px);
77+
--radius-3xl: calc(var(--radius) + 12px);
78+
--radius-4xl: calc(var(--radius) + 16px)
6279
}
6380

6481
:root {
6582
--radius: 0.625rem;
66-
--background: oklch(1 0 0);
67-
--foreground: oklch(0.145 0 0);
6883
--card: oklch(1 0 0);
6984
--card-foreground: oklch(0.145 0 0);
7085
--popover: oklch(1 0 0);
@@ -77,15 +92,23 @@
7792
--muted-foreground: oklch(0.556 0 0);
7893
--accent: oklch(0.97 0 0);
7994
--accent-foreground: oklch(0.205 0 0);
80-
--destructive: oklch(0.577 0.245 27.325);
95+
--destructive: oklch(0.58 0.22 27);
96+
--brand: #2563eb;
97+
--brand-foreground: #ffffff;
98+
--success: #16a34a;
99+
--success-foreground: #ffffff;
100+
--warning: #f97316;
101+
--warning-foreground: #ffffff;
102+
--info: #06b6d4;
103+
--info-foreground: #ffffff;
81104
--border: oklch(0.922 0 0);
82105
--input: oklch(0.922 0 0);
83106
--ring: oklch(0.708 0 0);
84-
--chart-1: oklch(0.646 0.222 41.116);
85-
--chart-2: oklch(0.6 0.118 184.704);
86-
--chart-3: oklch(0.398 0.07 227.392);
87-
--chart-4: oklch(0.828 0.189 84.429);
88-
--chart-5: oklch(0.769 0.188 70.08);
107+
--chart-1: oklch(0.809 0.105 251.813);
108+
--chart-2: oklch(0.623 0.214 259.815);
109+
--chart-3: oklch(0.546 0.245 262.881);
110+
--chart-4: oklch(0.488 0.243 264.376);
111+
--chart-5: oklch(0.424 0.199 265.638);
89112
--sidebar: oklch(0.985 0 0);
90113
--sidebar-foreground: oklch(0.145 0 0);
91114
--sidebar-primary: oklch(0.205 0 0);
@@ -94,6 +117,8 @@
94117
--sidebar-accent-foreground: oklch(0.205 0 0);
95118
--sidebar-border: oklch(0.922 0 0);
96119
--sidebar-ring: oklch(0.708 0 0);
120+
--background: oklch(1 0 0);
121+
--foreground: oklch(0.145 0 0);
97122
}
98123

99124
.dark {
@@ -103,23 +128,31 @@
103128
--card-foreground: oklch(0.985 0 0);
104129
--popover: oklch(0.205 0 0);
105130
--popover-foreground: oklch(0.985 0 0);
106-
--primary: oklch(0.922 0 0);
131+
--primary: oklch(0.87 0.00 0);
107132
--primary-foreground: oklch(0.205 0 0);
108133
--secondary: oklch(0.269 0 0);
109134
--secondary-foreground: oklch(0.985 0 0);
110135
--muted: oklch(0.269 0 0);
111136
--muted-foreground: oklch(0.708 0 0);
112-
--accent: oklch(0.269 0 0);
137+
--accent: oklch(0.371 0 0);
113138
--accent-foreground: oklch(0.985 0 0);
114139
--destructive: oklch(0.704 0.191 22.216);
140+
--brand: #2563eb;
141+
--brand-foreground: #ffffff;
142+
--success: #16a34a;
143+
--success-foreground: #ffffff;
144+
--warning: #f97316;
145+
--warning-foreground: #ffffff;
146+
--info: #06b6d4;
147+
--info-foreground: #ffffff;
115148
--border: oklch(1 0 0 / 10%);
116149
--input: oklch(1 0 0 / 15%);
117150
--ring: oklch(0.556 0 0);
118-
--chart-1: oklch(0.488 0.243 264.376);
119-
--chart-2: oklch(0.696 0.17 162.48);
120-
--chart-3: oklch(0.769 0.188 70.08);
121-
--chart-4: oklch(0.627 0.265 303.9);
122-
--chart-5: oklch(0.645 0.246 16.439);
151+
--chart-1: oklch(0.809 0.105 251.813);
152+
--chart-2: oklch(0.623 0.214 259.815);
153+
--chart-3: oklch(0.546 0.245 262.881);
154+
--chart-4: oklch(0.488 0.243 264.376);
155+
--chart-5: oklch(0.424 0.199 265.638);
123156
--sidebar: oklch(0.205 0 0);
124157
--sidebar-foreground: oklch(0.985 0 0);
125158
--sidebar-primary: oklch(0.488 0.243 264.376);
@@ -134,7 +167,8 @@
134167
* {
135168
@apply border-border outline-ring/50;
136169
}
170+
137171
body {
138172
@apply bg-background text-foreground;
139173
}
140-
}
174+
}

app/layout.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Metadata } from "next";
22
import { ThemeProvider } from "next-themes";
3-
import { Geist, Geist_Mono } from "next/font/google";
3+
import { Geist, Geist_Mono, Inter } from "next/font/google";
44
import Script from "next/script";
55

66
import { SITE_CONFIG, SITE_METADATA } from '@/app.config';
@@ -11,6 +11,8 @@ import FixedLanguageBanner from '@/components/business/fixed-language-banner';
1111
import BackgroundGrid from '@/components/ui/background-grid';
1212
import "./globals.css";
1313

14+
const inter = Inter({subsets:['latin'],variable:'--font-sans'});
15+
1416
const geistSans = Geist({
1517
variable: "--font-geist-sans",
1618
subsets: ["latin"],
@@ -39,7 +41,7 @@ export default async function RootLayout({
3941
children: React.ReactNode;
4042
}>) {
4143
return (
42-
<html suppressHydrationWarning lang="en">
44+
<html suppressHydrationWarning lang="en" className={inter.variable}>
4345
<head>
4446
<meta
4547
key="twitter:card"

app/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import ContactForm from "@/components/business/contact-form";
12
import GetStartedToday from "@/components/business/get-started-today";
23
import HomeBlog from "@/components/business/home-blog";
34
import HomeDifferents from "@/components/business/home-differents";
@@ -6,7 +7,6 @@ import HomeHero from "@/components/business/home-hero";
67
import HomeMultiClouds from "@/components/business/home-multi-clouds";
78
import HomeStats from "@/components/business/home-stats";
89
import SoftwareLogos from "@/components/business/software-logos";
9-
import ContactForm from "@/components/business/contact-form";
1010
import { getDockerPulls } from "@/lib/docker";
1111
import { getGitHubMetrics } from "@/lib/github";
1212
import type { Metadata } from "next";

components.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://ui.shadcn.com/schema.json",
3-
"style": "new-york",
3+
"style": "radix-lyra",
44
"rsc": true,
55
"tsx": true,
66
"tailwind": {
@@ -10,15 +10,16 @@
1010
"cssVariables": true,
1111
"prefix": ""
1212
},
13-
"iconLibrary": "lucide",
13+
"iconLibrary": "remixicon",
14+
"rtl": false,
1415
"aliases": {
1516
"components": "@/components",
1617
"utils": "@/lib/utils",
1718
"ui": "@/components/ui",
1819
"lib": "@/lib",
1920
"hooks": "@/hooks"
2021
},
21-
"registries": {
22-
"@magicui": "https://magicui.design/r/{name}.json"
23-
}
22+
"menuColor": "default",
23+
"menuAccent": "subtle",
24+
"registries": {}
2425
}

components/business/app-header.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export default function AppHeader() {
9090
<Popover>
9191
<Popover.Button className="relative z-10 flex h-8 w-8 items-center justify-center focus:not-data-focus:outline-hidden" aria-label="Toggle Navigation">
9292
{({ open }) => (
93-
<svg aria-hidden="true" className="h-3.5 w-3.5 overflow-visible stroke-slate-700 dark:stroke-slate-300" fill="none" strokeWidth="2" strokeLinecap="round">
93+
<svg aria-hidden="true" className="h-3.5 w-3.5 overflow-visible stroke-foreground/70" fill="none" strokeWidth="2" strokeLinecap="round">
9494
<path d="M0 1H14M0 7H14M0 13H14" className={`origin-center transition ${open ? 'scale-90 opacity-0' : ''}`} />
9595
<path d="M2 2L12 12M12 2L2 12" className={`origin-center transition ${open ? '' : 'scale-90 opacity-0'}`} />
9696
</svg>
@@ -107,10 +107,10 @@ export default function AppHeader() {
107107
>
108108
<Popover.Panel
109109
focus
110-
className="absolute inset-x-0 top-full mt-4 flex origin-top flex-col rounded-2xl bg-white p-4 text-lg tracking-tight text-slate-900 shadow-xl ring-1 ring-slate-900/5 dark:bg-slate-800 dark:text-slate-200 dark:ring-slate-700"
110+
className="absolute inset-x-0 top-full mt-4 flex origin-top flex-col rounded-2xl bg-popover p-4 text-lg tracking-tight text-popover-foreground shadow-xl ring-1 ring-border/60"
111111
>
112112
{navs.map((item, index) => (
113-
<a key={index} className="block w-full p-2 rounded hover:bg-slate-100/50 dark:hover:bg-slate-700/50" href={item.url}>{item.label}</a>
113+
<a key={index} className="block w-full p-2 rounded hover:bg-muted/50" href={item.url}>{item.label}</a>
114114
))}
115115
</Popover.Panel>
116116
</Transition>

components/business/buttons/fixed-contact-button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { MessageCircleIcon } from "lucide-react"
33
export default function FixedContactButton() {
44
return (
55
<div className="fixed bottom-10 right-10 z-50 flex items-end justify-end">
6-
<a href="https://rustfs.com/contact/" className="relative right-0 inline-flex items-center justify-center gap-2 rounded-full h-12 w-12 bg-blue-600 hover:bg-blue-500 text-white" target="_blank">
6+
<a href="https://rustfs.com/contact/" className="relative right-0 inline-flex items-center justify-center gap-2 rounded-full h-12 w-12 bg-brand text-brand-foreground hover:bg-brand/90" target="_blank">
77
<MessageCircleIcon />
88
</a>
99
</div>

0 commit comments

Comments
 (0)