Skip to content

Commit ce73c20

Browse files
good
1 parent 4afcb85 commit ce73c20

File tree

5 files changed

+49
-30
lines changed

5 files changed

+49
-30
lines changed

app/filetypes/!bt/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
import FileTypeDetail from '../FileTypeDetail';
44

5-
export default function !btPage() {
5+
export default function ExclamationBtPage() {
66
return <FileTypeDetail slug="!bt" />;
77
}

app/filetypes/1tm/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
import FileTypeDetail from '../FileTypeDetail';
44

5-
export default function 1tmPage() {
5+
export default function OneTmPage() {
66
return <FileTypeDetail slug="1tm" />;
77
}

app/filetypes/bt!/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
import FileTypeDetail from '../FileTypeDetail';
44

5-
export default function BtPage() {
5+
export default function BtExclamationPage() {
66
return <FileTypeDetail slug="bt!" />;
77
}

app/filetypes/page.tsx

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,10 @@ export default function FileTypesPage() {
158158
<div className="flex items-start justify-between">
159159
<div className="flex-1">
160160
<CardTitle className="text-lg">
161-
.{fileType.slug.toUpperCase()}
161+
{fileType.name}
162162
</CardTitle>
163163
<CardDescription className="mt-1">
164-
{fileType.name}
164+
{formatCategory(fileType.category)}
165165
</CardDescription>
166166
</div>
167167
{fileType.popularity && (
@@ -172,20 +172,15 @@ export default function FileTypesPage() {
172172
)}
173173
</div>
174174
</CardHeader>
175-
<CardContent>
176-
<div className="flex flex-col gap-2">
177-
<Badge variant="outline" className="w-fit">
178-
{formatCategory(fileType.category)}
179-
</Badge>
180-
{fileType.developer_org && (
181-
<p className="text-sm text-muted-foreground">
182-
by {fileType.developer_org.split('-').map(w =>
183-
w.charAt(0).toUpperCase() + w.slice(1)
184-
).join(' ')}
185-
</p>
186-
)}
187-
</div>
188-
</CardContent>
175+
{fileType.developer_org && (
176+
<CardContent className="pt-2">
177+
<p className="text-sm text-muted-foreground">
178+
by {fileType.developer_org.split('-').map(w =>
179+
w.charAt(0).toUpperCase() + w.slice(1)
180+
).join(' ')}
181+
</p>
182+
</CardContent>
183+
)}
189184
</Card>
190185
</Link>
191186
))}

components/HeroConverter.tsx

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,23 @@ export default function HeroConverter({
2525
const [busy, setBusy] = useState(false);
2626
const [hint, setHint] = useState("or drop files here");
2727
const [dropEffect, setDropEffect] = useState<string>("");
28+
const [randomColor] = useState(() => {
29+
const colors = [
30+
"#ef4444", // red-500
31+
"#f59e0b", // amber-500
32+
"#22c55e", // green-500
33+
"#3b82f6", // blue-500
34+
"#a855f7", // purple-500
35+
"#ec4899", // pink-500
36+
"#14b8a6", // teal-500
37+
"#f97316", // orange-500
38+
"#6366f1", // indigo-500
39+
"#f43f5e", // rose-500
40+
"#0ea5e9", // sky-500
41+
"#84cc16", // lime-500
42+
];
43+
return colors[Math.floor(Math.random() * colors.length)];
44+
});
2845

2946
function ensureWorker() {
3047
if (!workerRef.current) {
@@ -111,27 +128,31 @@ export default function HeroConverter({
111128
: `.${from}`);
112129

113130
return (
114-
<section className="min-h-[60vh] w-full bg-white">
115-
<div className="mx-auto max-w-4xl px-6 pt-12 pb-8 text-center">
116-
<h1 className="text-3xl sm:text-4xl font-extrabold tracking-tight">{title}</h1>
117-
<p className="mt-3 text-muted-foreground">{subtitle}</p>
118-
131+
<section className="w-full bg-white">
132+
<div className="mx-auto max-w-7xl px-6 py-8 text-center">
119133
<div
120134
ref={dropRef}
121135
onDragEnter={onDrag}
122136
onDragOver={onDrag}
123137
onDragLeave={onDrag}
124138
onDrop={onDrop}
125-
className={`mt-8 mx-auto max-w-2xl border-2 border-dashed border-gray-300 rounded-2xl p-12 hover:border-gray-400 transition-colors cursor-pointer bg-gray-50/50 ${
139+
className={`mt-8 mx-auto max-w-6xl border-2 border-dashed rounded-2xl p-12 hover:border-opacity-80 transition-colors cursor-pointer ${
126140
dropEffect ? `animate-${dropEffect}` : ""
127141
}`}
142+
style={{
143+
backgroundColor: randomColor + "15", // 15 is ~8% opacity
144+
borderColor: randomColor,
145+
}}
128146
onClick={onPick}
129147
>
130148
<div className="flex flex-col items-center space-y-6">
149+
<h1 className="text-3xl sm:text-4xl font-extrabold tracking-tight">{title}</h1>
150+
131151
<svg
132-
className="w-16 h-16 text-gray-400"
152+
className="w-12 h-12"
133153
fill="none"
134154
stroke="currentColor"
155+
style={{ color: randomColor }}
135156
viewBox="0 0 24 24"
136157
>
137158
<path
@@ -144,19 +165,22 @@ export default function HeroConverter({
144165

145166
<Button
146167
size="lg"
147-
className="h-14 px-8 rounded-xl bg-blue-600 hover:bg-blue-700 text-white shadow-lg"
168+
className="h-12 px-8 rounded-xl text-white shadow-lg"
169+
style={{
170+
backgroundColor: randomColor,
171+
borderColor: randomColor,
172+
}}
148173
onClick={(e) => {
149174
e.stopPropagation();
150175
onPick();
151176
}}
152177
disabled={busy}
153178
>
154-
{busy ? "Working…" : `Select ${from.toUpperCase()} files`}
179+
{busy ? "Working…" : `CHOOSE FILES`}
155180
</Button>
156181

157-
<div className="text-sm text-muted-foreground">
182+
<div className="text-sm" style={{ color: randomColor }}>
158183
<p className="font-medium">{hint}</p>
159-
<p className="mt-1 text-xs">or click anywhere in this box</p>
160184
</div>
161185
</div>
162186

0 commit comments

Comments
 (0)