Skip to content

Commit 62f6dd0

Browse files
committed
Updated formatting
1 parent 0ca67b8 commit 62f6dd0

File tree

6 files changed

+89
-51
lines changed

6 files changed

+89
-51
lines changed

app/globals.css

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,19 @@
11
@import "tailwindcss";
22

33
:root {
4-
--background: #ffffff;
5-
--foreground: #171717;
6-
}
7-
8-
@theme inline {
9-
--color-background: var(--background);
10-
--color-foreground: var(--foreground);
11-
--font-sans: var(--font-geist-sans);
12-
--font-mono: var(--font-geist-mono);
4+
--background:#ffffff;
5+
--foreground:#171717;
136
}
147

158
@media (prefers-color-scheme: dark) {
16-
:root {
17-
--background: #0a0a0a;
18-
--foreground: #ededed;
19-
}
9+
:root { --background:#0a0a0a; --foreground:#ededed; }
2010
}
2111

22-
body {
23-
background: var(--background);
24-
color: var(--foreground);
25-
font-family: Arial, Helvetica, sans-serif;
12+
body{
13+
background:var(--background);
14+
color:var(--foreground);
15+
font-family:var(--font-sans);
2616
}
17+
.font-mono {
18+
font-family: var(--font-mono);
19+
}

app/layout.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1-
import "./globals.css";
1+
import './globals.css';
2+
import { Inter, JetBrains_Mono } from 'next/font/google';
3+
4+
const inter = Inter({ subsets: ['latin'], variable: '--font-sans', display: 'swap' });
5+
const jetbrains = JetBrains_Mono({ subsets: ['latin'], variable: '--font-mono', display: 'swap' });
6+
27
export default function RootLayout({
38
children,
49
}: Readonly<{
510
children: React.ReactNode;
611
}>) {
712
return (
8-
<html lang="en">
13+
<html lang="en" className={`${inter.variable} ${jetbrains.variable}`}>
914
<body>
1015
{children}
1116
</body>

app/ui/maplist.tsx

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,49 @@
11
type MapLink = { name: string; url: string };
22

33
export default function MapList({ maps }: { maps?: MapLink[] }) {
4-
if (!maps?.length) return null;
4+
if (!maps?.length)
5+
return (
6+
<p className="italic text-neutral-500">No maps featuring this skybox yet.</p>
7+
);
8+
59
return (
6-
<div>
7-
<h3 className="font-semibold mb-1">Maps featuring this skybox</h3>
8-
<ul className="list-disc list-inside space-y-0.5 text-sm">
10+
<section>
11+
<h4 className="mb-2 text-sm font-bold uppercase tracking-wider">
12+
Community Maps
13+
</h4>
14+
15+
<ul className="grid gap-3 sm:grid-cols-2">
916
{maps.map((m) => (
1017
<li key={m.url}>
11-
<a href={m.url} target="_blank" className="underline text-blue-300">
12-
{m.name}
18+
<a
19+
href={m.url}
20+
target="_blank"
21+
className="
22+
group flex items-center justify-between
23+
rounded-md px-3 py-2
24+
bg-neutral-800 hover:bg-neutral-700
25+
transition
26+
"
27+
>
28+
<span className="text-sm text-neutral-100">{m.name}</span>
29+
30+
{/* external-link arrow */}
31+
<svg
32+
viewBox="0 0 24 24"
33+
aria-hidden="true"
34+
className="
35+
w-4 h-4 shrink-0
36+
fill-neutral-400 group-hover:fill-neutral-200
37+
transition
38+
"
39+
>
40+
<path d="M14 3h7v7h-2V6.41l-9.29 9.3-1.42-1.42 9.3-9.29H14V3Z" />
41+
<path d="M5 5h5V3H3v7h2V5Zm14 14h-5v2h7v-7h-2v5ZM5 19v-5H3v7h7v-2H5Z" />
42+
</svg>
1343
</a>
1444
</li>
1545
))}
1646
</ul>
17-
</div>
47+
</section>
1848
);
1949
}

app/ui/modal.tsx

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,23 +49,31 @@ export default function Modal({ slug, onClose }: { slug: string; onClose: () =>
4949
<div onClick={onClose} className="fixed inset-0 z-50 bg-black/75 backdrop-blur-sm flex items-center justify-center p-4">
5050
<article onClick={e=>e.stopPropagation()} className="w-full max-w-[90vw] sm:max-w-xl md:max-w-2xl lg:max-w-3xl xl:max-w-4xl max-h-[70vh] overflow-y-auto overscroll-contain bg-neutral-900 rounded-lg shadow-xl ring-1 ring-neutral-700/60">
5151
{/* Header */}
52-
<div className="flex items-center justify-between p-4">
53-
54-
{/* Title */}
52+
<div
53+
className="
54+
flex flex-wrap
55+
gap-4
56+
sm:flex-nowrap
57+
items-start sm:items-center
58+
justify-between
59+
p-4
60+
"
61+
>
62+
{/* Title + author */}
5563
<div className="flex flex-col">
56-
<h2 className="text-2xl font-bold">{slug}</h2>
57-
{/* Author */}
58-
<span className="text-sm text-neutral-400">By {meta?.author}</span>
64+
<h2 className="text-2xl font-bold leading-tight">{slug}</h2>
65+
{meta?.author && (
66+
<span className="text-sm text-neutral-400">By {meta.author}</span>
67+
)}
5968
</div>
6069

61-
{/* Download Button */}
62-
<div className="flex">
63-
<DownloadButton
64-
href={`/Source_Skyboxes_NextJS/skyboxes/${slug}/download/${slug}.7z`}
65-
download
66-
size={meta?.fileSize}
67-
/>
68-
</div>
70+
{/* Download (never shrink) */}
71+
<DownloadButton
72+
href={`/Source_Skyboxes_NextJS/skyboxes/${slug}/download/${slug}.7z`}
73+
download
74+
size={meta?.fileSize}
75+
className="flex-shrink-0" /* ⬅️ keeps the button’s width */
76+
/>
6977
</div>
7078

7179
{/* Preview */}
@@ -92,8 +100,11 @@ export default function Modal({ slug, onClose }: { slug: string; onClose: () =>
92100
</div>
93101
),
94102
},
95-
{ value: 'community-maps', label: 'Community Maps', content: <MapList maps={meta?.steamMaps} /> },
96-
]} />
103+
{ value: 'community-maps',
104+
label: 'Community Maps',
105+
content: <MapList maps={meta?.steamMaps} /> },
106+
]}
107+
/>
97108
</div>
98109

99110
</article>

app/ui/parametersections.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ export function ParamSection({
2121

2222
<dl
2323
className="
24-
grid grid-cols-[8rem_1fr]
24+
grid grid grid-cols-[9.5rem_1fr]
2525
gap-y-2 gap-x-4
26-
text-[clamp(0.85rem,0.9vw,0.95rem)]
26+
text-sm
27+
font-sans
2728
"
2829
>
2930
{children}
@@ -38,14 +39,14 @@ export function ParamRow({
3839
children,
3940
}: {
4041
label: string;
41-
children?: ReactNode; /* ⬅️ now optional */
42+
children?: ReactNode;
4243
}) {
4344
return (
4445
<>
45-
<dt className="text-neutral-400 font-medium">{label}</dt>
46-
<dd className="text-neutral-100">
46+
<dt className="text-neutral-400">{label}</dt>
47+
<dd >
4748
{children ?? (
48-
<span className="italic text-neutral-500">N/A</span>
49+
<span className="italic text-neutral-400">N/A</span>
4950
)}
5051
</dd>
5152
</>

app/ui/swatch.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ export function Swatch({ rgb }: SwatchProps) {
99
<span
1010
className="
1111
inline-flex overflow-hidden rounded-md ring-1 ring-neutral-700/40
12-
text-sm font-mono
1312
"
1413
title={color}
1514
>
@@ -21,8 +20,7 @@ export function Swatch({ rgb }: SwatchProps) {
2120
<span
2221
className="
2322
px-2 flex items-center
24-
bg-neutral-800/60 backdrop-blur-[2px]
25-
text-neutral-100
23+
bg-neutral-800
2624
"
2725
>
2826
{values}

0 commit comments

Comments
 (0)