Skip to content

Commit 353999c

Browse files
Restore code block animation on mobile (#246)
1 parent e0c6618 commit 353999c

File tree

4 files changed

+11
-16
lines changed

4 files changed

+11
-16
lines changed

docs/app/(home)/components/intro/intro.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export const Intro = async () => {
129129
code={workflowCode}
130130
lang="ts"
131131
codeblock={{
132-
className: `shadow-none !bg-background ${codeBlockClassname}`,
132+
className: `shadow-none overflow-visible !bg-background border-b-0! ${codeBlockClassname}`,
133133
}}
134134
/>
135135
);
@@ -138,7 +138,7 @@ export const Intro = async () => {
138138
code={nonWorkflowCode}
139139
lang="ts"
140140
codeblock={{
141-
className: `shadow-none !bg-background ${codeBlockClassname} max-h-[310px] overflow-y-auto`,
141+
className: `shadow-none overflow-visible !bg-background border-b-0! ${codeBlockClassname} max-h-[310px]`,
142142
}}
143143
/>
144144
);
@@ -149,7 +149,7 @@ export const Intro = async () => {
149149
<h2 className="font-semibold text-xl tracking-tight sm:text-2xl md:text-3xl lg:text-[40px]">
150150
Reliability-as-code
151151
</h2>
152-
<p className=" text-lg text-muted-foreground md:mt-4">
152+
<p className="text-lg text-muted-foreground md:mt-4">
153153
Move from hand-rolled queues and custom retries to durable, resumable
154154
code with simple directives.
155155
</p>

docs/app/(home)/components/intro/non-workflow.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ export const NonWorkflowExample = ({
100100

101101
return (
102102
<div className="relative isolate max-w-3xl mx-auto">
103-
<div className="bg-background border rounded-md overflow-hidden">
103+
<div className="bg-background border rounded-md overflow-x-auto pb-[52px]">
104104
<div className="relative">
105-
<div className="hidden md:flex absolute z-10 flex-col left-[18px] top-[69px] pointer-events-none select-none">
105+
<div className="flex absolute z-10 flex-col left-[18px] top-[69px] pointer-events-none select-none">
106106
{renderIndicator(lineStates[0])}
107107
<div className="h-[5px]" />
108108
{renderIndicator(lineStates[1])}
@@ -111,10 +111,7 @@ export const NonWorkflowExample = ({
111111
</div>
112112
{codeBlock}
113113
</div>
114-
<WorkflowLogs
115-
logs={logs}
116-
className="p-4 font-mono text-sm text-muted-foreground"
117-
/>
114+
<WorkflowLogs logs={logs} />
118115
</div>
119116
</div>
120117
);

docs/app/(home)/components/intro/workflow-logs.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ export function WorkflowLogs({
7171
return (
7272
<div
7373
className={cn(
74-
'relative inline-block whitespace-nowrap w-full',
74+
'relative inline-block whitespace-nowrap w-full border-t',
75+
'overflow-x-auto p-4 font-mono text-sm text-muted-foreground absolute bottom-0 right-0 left-0',
7576
hasError && 'bg-destructive/10',
7677
className
7778
)}

docs/app/(home)/components/intro/workflow.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,9 @@ export const WorkflowExample = ({
158158

159159
return (
160160
<div className="relative isolate max-w-3xl mx-auto">
161-
<div className="bg-background border rounded-md overflow-hidden">
161+
<div className="bg-background border rounded-md overflow-x-auto pb-[52px]">
162162
<div className="relative">
163-
<div className="hidden md:flex absolute z-10 flex-col left-[18px] top-[69px] pointer-events-none select-none">
163+
<div className="flex absolute z-10 flex-col left-[18px] top-[69px] pointer-events-none select-none">
164164
{renderIndicator(lineStates[0])}
165165
<div className="h-[5px]" />
166166
{renderIndicator(lineStates[1])}
@@ -169,10 +169,7 @@ export const WorkflowExample = ({
169169
</div>
170170
{codeBlock}
171171
</div>
172-
<WorkflowLogs
173-
logs={logs}
174-
className="p-4 font-mono text-sm text-muted-foreground"
175-
/>
172+
<WorkflowLogs logs={logs} />
176173
</div>
177174
</div>
178175
);

0 commit comments

Comments
 (0)