Skip to content

Commit 0ab6cf2

Browse files
committed
Formatting
1 parent da1f55d commit 0ab6cf2

5 files changed

+115
-115
lines changed

src/components/home/build-anything-section.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default function BuildAnythingSection() {
2424
<div className="relative max-w-full">
2525
<div
2626
aria-hidden="true"
27-
className="max-w-screen h-6 items-end whitespace-pre px-2 font-mono text-xs/6 text-black/20 max-sm:px-4 2xl:flex dark:text-white/25"
27+
className="h-6 max-w-screen items-end px-2 font-mono text-xs/6 whitespace-pre text-black/20 max-sm:px-4 2xl:flex dark:text-white/25"
2828
>
2929
text-4xl <span className="inline dark:hidden">text-gray-950</span>
3030
<span className="hidden dark:inline">text-white</span> tracking-tighter
@@ -35,12 +35,12 @@ export default function BuildAnythingSection() {
3535
</GridContainer>
3636

3737
<GridContainer>
38-
<h2 className="max-w-lg text-balance px-2 text-[2.5rem]/10 font-medium tracking-tighter max-sm:px-4">
38+
<h2 className="max-w-lg px-2 text-[2.5rem]/10 font-medium tracking-tighter text-balance max-sm:px-4">
3939
Build whatever you want, without touching your CSS file.
4040
</h2>
4141
</GridContainer>
4242

43-
<div className="flex h-6 items-end whitespace-pre px-2 font-mono text-xs/6 text-black/20 max-sm:px-4 sm:h-10 dark:text-white/25">
43+
<div className="flex h-6 items-end px-2 font-mono text-xs/6 whitespace-pre text-black/20 max-sm:px-4 sm:h-10 dark:text-white/25">
4444
text-base <span className="inline dark:hidden">text-gray-950</span>
4545
<span className="hidden dark:inline">text-white</span>
4646
</div>
@@ -54,7 +54,7 @@ export default function BuildAnythingSection() {
5454

5555
<GridContainer className="mt-18">
5656
<div className="h-auto bg-gray-950/5 p-2 dark:bg-white/10">
57-
<BentoItem className="p-0! flex h-full flex-row overflow-hidden">
57+
<BentoItem className="flex h-full flex-row overflow-hidden p-0!">
5858
<div className="hidden flex-col gap-2 lg:flex">
5959
<a
6060
href="https://openai.com/"
@@ -209,7 +209,7 @@ export default function BuildAnythingSection() {
209209

210210
function ExternalLinkLabel({ children }: { children: React.ReactNode }) {
211211
return (
212-
<div className="inset-ring inset-ring-white/10 absolute left-1/2 top-1/2 z-10 hidden -translate-x-1/2 -translate-y-1/2 transform flex-row items-center gap-[calc(1rem/16*7)] rounded-full border border-gray-950 bg-gray-950/90 py-0.5 pb-1 pl-3 pr-2 text-center font-mono text-sm/6 font-medium text-white opacity-0 transition-opacity group-hover:flex group-hover:opacity-100">
212+
<div className="absolute top-1/2 left-1/2 z-10 hidden -translate-x-1/2 -translate-y-1/2 transform flex-row items-center gap-[calc(1rem/16*7)] rounded-full border border-gray-950 bg-gray-950/90 py-0.5 pr-2 pb-1 pl-3 text-center font-mono text-sm/6 font-medium text-white opacity-0 inset-ring inset-ring-white/10 transition-opacity group-hover:flex group-hover:opacity-100">
213213
{children}
214214
<svg viewBox="0 0 16 16" fill="currentColor" className="size-4">
215215
<path

src/components/home/explainer-section.tsx

+14-14
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export default function ExplainerSection() {
104104
<div className="relative max-w-full">
105105
<div
106106
aria-hidden="true"
107-
className="hidden h-4 items-end whitespace-pre px-2 font-mono text-xs/6 text-black/20 max-sm:px-4 2xl:visible 2xl:flex dark:text-white/25"
107+
className="hidden h-4 items-end px-2 font-mono text-xs/6 whitespace-pre text-black/20 max-sm:px-4 2xl:visible 2xl:flex dark:text-white/25"
108108
>
109109
text-4xl <span className="inline dark:hidden">text-gray-950</span>
110110
<span className="hidden dark:inline">text-white</span> tracking-tighter text-balance
@@ -120,7 +120,7 @@ export default function ExplainerSection() {
120120
</h2>
121121
</GridContainer>
122122

123-
<div className="flex h-6 items-end whitespace-pre px-2 font-mono text-xs/6 text-black/20 max-sm:px-4 sm:h-10 dark:text-white/25">
123+
<div className="flex h-6 items-end px-2 font-mono text-xs/6 whitespace-pre text-black/20 max-sm:px-4 sm:h-10 dark:text-white/25">
124124
text-base <span className="inline dark:hidden">text-gray-950</span>
125125
<span className="hidden dark:inline">text-white</span>
126126
</div>
@@ -136,10 +136,10 @@ export default function ExplainerSection() {
136136
<GridContainer className="mt-16">
137137
<div className="w-full bg-gray-950/5 p-2 dark:bg-white/10">
138138
<div className="not-prose">
139-
<div className="@container in-[figure]:-mx-1 in-[figure]:-mb-1 rounded-xl bg-gray-950">
139+
<div className="@container rounded-xl bg-gray-950 in-[figure]:-mx-1 in-[figure]:-mb-1">
140140
<div
141141
className={clsx(
142-
"scheme-dark dark:inset-ring dark:inset-ring-white/10 rounded-xl p-1 text-sm dark:bg-white/5",
142+
"rounded-xl p-1 text-sm scheme-dark dark:bg-white/5 dark:inset-ring dark:inset-ring-white/10",
143143
)}
144144
>
145145
<EditorAnimation timeline={timeline}>
@@ -149,16 +149,16 @@ export default function ExplainerSection() {
149149
className={clsx(
150150
"inline-flex size-1.5 items-center justify-center rounded-full bg-white/20",
151151
"transition-opacity duration-300 ease-in",
152-
"group-data-modified:opacity-100 group-data-modified:duration-100 group-data-modified:ease-linear opacity-0",
152+
"opacity-0 group-data-modified:opacity-100 group-data-modified:duration-100 group-data-modified:ease-linear",
153153
)}
154154
></span>
155155
</span>
156156
<span className="size-3 rounded-full bg-white/20"></span>
157157
<span className="size-3 rounded-full bg-white/20"></span>
158158
</div>
159-
<div className="lg:h-132.5 flex w-full flex-col gap-1 lg:flex-row">
160-
<div className="xl:w-5/8 flex flex-col gap-1 lg:w-1/2">
161-
<Panel className="max-lg:max-h-76 min-h-0 flex-1" aria-label="panel, HTML editor, animated">
159+
<div className="flex w-full flex-col gap-1 lg:h-132.5 lg:flex-row">
160+
<div className="flex flex-col gap-1 lg:w-1/2 xl:w-5/8">
161+
<Panel className="min-h-0 flex-1 max-lg:max-h-76" aria-label="panel, HTML editor, animated">
162162
<Tabs>
163163
<Tab selected className="group-data-modified:italic">
164164
index.html
@@ -168,14 +168,14 @@ export default function ExplainerSection() {
168168
</Tabs>
169169
<HtmlFile className="with-line-numbers" />
170170
</Panel>
171-
<Panel className="lg:h-46 h-32 shrink-0" aria-label="panel, terminal, animated">
171+
<Panel className="h-32 shrink-0 lg:h-46" aria-label="panel, terminal, animated">
172172
<Tabs>
173173
<Tab selected>Terminal</Tab>
174174
</Tabs>
175175
<Terminal />
176176
</Panel>
177177
</div>
178-
<div className="h-66 xl:w-3/8 flex flex-col gap-2.5 lg:h-auto lg:w-1/2">
178+
<div className="flex h-66 flex-col gap-2.5 lg:h-auto lg:w-1/2 xl:w-3/8">
179179
<Panel className="h-full" aria-label="panel, built CSS, animated">
180180
<Tabs>
181181
<Tab selected>build.css</Tab>
@@ -227,7 +227,7 @@ function HtmlFile({ className }: { className?: string }) {
227227
<span {...props}>
228228
{'"'}
229229
<TypingAnimation />
230-
<span className="group-data-finished:opacity-0 transition-opacity duration-300 after:absolute after:mt-1.5 after:inline-block after:h-[1.2em] after:w-px after:border-r-2 after:border-sky-400 after:bg-transparent after:content-['']"></span>
230+
<span className="transition-opacity duration-300 group-data-finished:opacity-0 after:absolute after:mt-1.5 after:inline-block after:h-[1.2em] after:w-px after:border-r-2 after:border-sky-400 after:bg-transparent after:content-['']"></span>
231231
{'"'}
232232
</span>
233233
);
@@ -267,7 +267,7 @@ async function BuiltCss({ className, timeline }: { className?: string; timeline:
267267
<HighlightedCode
268268
aria-label="editor, readonly, built CSS"
269269
className={clsx(
270-
"group-data-finished:opacity-100 group-data-running:opacity-100 opacity-0",
270+
"opacity-0 group-data-finished:opacity-100 group-data-running:opacity-100",
271271
"*:flex *:*:max-w-none *:*:shrink-0 *:*:grow *:rounded-lg *:px-4 *:py-2",
272272
"**:[.line]:isolate **:[.line]:block **:[.line]:not-last:min-h-[1lh]",
273273
"**:[code]:pr-4",
@@ -425,7 +425,7 @@ function Panel({
425425
function Tabs({ children }: { children: React.ReactNode }) {
426426
return (
427427
<div
428-
className="bg-white/2.5 sticky left-0 top-0 z-10 col-start-1 row-start-1 mb-px flex items-center gap-2 border-b border-b-white/5 bg-clip-padding p-1 text-white backdrop-blur-lg"
428+
className="sticky top-0 left-0 z-10 col-start-1 row-start-1 mb-px flex items-center gap-2 border-b border-b-white/5 bg-white/2.5 bg-clip-padding p-1 text-white backdrop-blur-lg"
429429
role="presentation"
430430
aria-label="Tab Bar"
431431
>
@@ -438,7 +438,7 @@ function Tab({ className, selected, children }: { className?: string; selected?:
438438
return (
439439
<button
440440
className={clsx(
441-
"inset-ring-white/5 aria-selected:inset-ring isolate rounded-sm px-2 py-1 text-xs/5 text-white hover:bg-white/10 aria-selected:bg-white/10",
441+
"isolate rounded-sm px-2 py-1 text-xs/5 text-white inset-ring-white/5 hover:bg-white/10 aria-selected:bg-white/10 aria-selected:inset-ring",
442442
className,
443443
)}
444444
role="presentation"

src/components/home/hero.tsx

+13-13
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const Hero: React.FC = () => {
5151
<div>
5252
<div
5353
aria-hidden="true"
54-
className="flex h-16 items-end whitespace-pre px-2 font-mono text-xs/6 text-black/20 max-sm:px-4 sm:h-24 dark:text-white/25"
54+
className="flex h-16 items-end px-2 font-mono text-xs/6 whitespace-pre text-black/20 max-sm:px-4 sm:h-24 dark:text-white/25"
5555
>
5656
<span className="hidden max-sm:inline">text-4xl </span>
5757
<span className="hidden sm:max-md:inline">text-5xl </span>
@@ -62,13 +62,13 @@ const Hero: React.FC = () => {
6262
<span className="max-sm:hidden">text-balance</span>
6363
</div>
6464
<GridContainer>
65-
<h1 className="text-balance px-2 text-4xl tracking-tighter max-lg:font-medium max-sm:px-4 sm:text-5xl lg:text-6xl xl:text-8xl">
65+
<h1 className="px-2 text-4xl tracking-tighter text-balance max-lg:font-medium max-sm:px-4 sm:text-5xl lg:text-6xl xl:text-8xl">
6666
Rapidly build modern websites without ever leaving your HTML.
6767
</h1>
6868
</GridContainer>
6969
<div
7070
aria-hidden="true"
71-
className="flex h-6 items-end whitespace-pre px-2 font-mono text-xs/6 text-black/20 max-sm:px-4 sm:h-10 dark:text-white/25"
71+
className="flex h-6 items-end px-2 font-mono text-xs/6 whitespace-pre text-black/20 max-sm:px-4 sm:h-10 dark:text-white/25"
7272
>
7373
text-lg <span className="inline dark:hidden">text-gray-950</span>
7474
<span className="hidden dark:inline">text-white</span> font-medium
@@ -109,7 +109,7 @@ const Hero: React.FC = () => {
109109
<kbd className="hidden font-sans text-xs/4 text-gray-500 dark:text-gray-400 [.os-macos_&]:block">
110110
<span className="opacity-60"></span>K
111111
</kbd>
112-
<kbd className="not-[.os-macos_&]:block hidden font-sans text-xs/4 text-gray-500 dark:text-gray-400">
112+
<kbd className="hidden font-sans text-xs/4 text-gray-500 not-[.os-macos_&]:block dark:text-gray-400">
113113
<span className="opacity-60">Ctrl</span>&nbsp;K
114114
</kbd>
115115
</SearchButton>
@@ -121,7 +121,7 @@ const Hero: React.FC = () => {
121121
<Editor>
122122
<div
123123
className={clsx(
124-
"*:bg-white/10! dark:*:bg-white/5! *:flex *:*:max-w-none *:*:shrink-0 *:*:grow *:overflow-auto *:rounded-lg *:p-5",
124+
"*:flex *:*:max-w-none *:*:shrink-0 *:*:grow *:overflow-auto *:rounded-lg *:bg-white/10! *:p-5 dark:*:bg-white/5!",
125125
"**:[.line]:isolate **:[.line]:block **:[.line]:not-last:min-h-[1lh]",
126126
"*:inset-ring *:inset-ring-white/10 dark:*:inset-ring-white/5",
127127
)}
@@ -353,7 +353,7 @@ const Hero: React.FC = () => {
353353
</div>
354354
</Editor>
355355
</div>
356-
<div className="border-(--pattern-fg) [--pattern-fg:var(--color-black)]/5 max-lg:h-66 dark:[--pattern-fg:var(--color-white)]/10 relative bg-[image:repeating-linear-gradient(315deg,_var(--pattern-fg)_0,_var(--pattern-fg)_1px,_transparent_0,_transparent_50%)] bg-[size:10px_10px] bg-fixed max-lg:border-t lg:border-l">
356+
<div className="relative border-(--pattern-fg) bg-[image:repeating-linear-gradient(315deg,_var(--pattern-fg)_0,_var(--pattern-fg)_1px,_transparent_0,_transparent_50%)] bg-[size:10px_10px] bg-fixed [--pattern-fg:var(--color-black)]/5 max-lg:h-66 max-lg:border-t lg:border-l dark:[--pattern-fg:var(--color-white)]/10">
357357
<div className="absolute right-1/2 max-lg:bottom-8 max-md:translate-x-1/2 md:right-16 lg:top-1/2 lg:-translate-y-1/2 2xl:right-1/2 2xl:translate-x-[calc(50%-3rem)]">
358358
<Example step={step} />
359359
</div>
@@ -395,7 +395,7 @@ function Example({ step }: { step: number }) {
395395
key={step}
396396
layout={true}
397397
className={clsx(
398-
"z-1 pointer-events-none absolute left-0 right-auto top-1/2 -ml-4 -mt-4 mr-0 rounded-full text-black",
398+
"pointer-events-none absolute top-1/2 right-auto left-0 z-1 -mt-4 mr-0 -ml-4 rounded-full text-black",
399399
)}
400400
initial={{ opacity: 0 }}
401401
animate={{ opacity: [0, 1, 0] }}
@@ -419,7 +419,7 @@ function Example({ step }: { step: number }) {
419419
layout="position"
420420
transition={TRANSITION}
421421
className={clsx(
422-
"duration-350 size-48 shadow-xl transition-[border-radius] dark:outline-1 dark:-outline-offset-1 dark:outline-white/10",
422+
"size-48 shadow-xl transition-[border-radius] duration-350 dark:outline-1 dark:-outline-offset-1 dark:outline-white/10",
423423
step > 1 ? "rounded-md" : null,
424424
)}
425425
src={cover.src}
@@ -435,7 +435,7 @@ function Example({ step }: { step: number }) {
435435
layout="position"
436436
transition={TRANSITION}
437437
className={clsx(
438-
"duration-350 text-gray-950 transition-[font-size] dark:text-white",
438+
"text-gray-950 transition-[font-size] duration-350 dark:text-white",
439439
step > 2 ? "text-2xl font-medium" : null,
440440
)}
441441
>
@@ -445,8 +445,8 @@ function Example({ step }: { step: number }) {
445445
transition={TRANSITION}
446446
layout="position"
447447
className={clsx(
448-
"duration-350 text-gray-950 transition-colors dark:text-white",
449-
step > 3 ? "text-sky-500! font-medium" : null,
448+
"text-gray-950 transition-colors duration-350 dark:text-white",
449+
step > 3 ? "font-medium text-sky-500!" : null,
450450
)}
451451
>
452452
The Anti-Patterns
@@ -455,8 +455,8 @@ function Example({ step }: { step: number }) {
455455
layout="position"
456456
transition={TRANSITION}
457457
className={clsx(
458-
"duration-350 flex text-gray-950 transition-colors dark:text-white",
459-
step > 4 ? "text-gray-600! dark:text-gray-400! gap-2 font-medium" : null,
458+
"flex text-gray-950 transition-colors duration-350 dark:text-white",
459+
step > 4 ? "gap-2 font-medium text-gray-600! dark:text-gray-400!" : null,
460460
)}
461461
>
462462
<motion.span layout="position" transition={TRANSITION}>

0 commit comments

Comments
 (0)