Skip to content

Commit 2bfc04d

Browse files
bidahclaude
andcommitted
Fix mobile layout for cloud/self-hosted/run-locally toggle and content sections
Toggle buttons are now smaller on mobile. Content sections no longer use negative top offset on mobile, preventing text from hiding behind the toggle. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 66414c7 commit 2bfc04d

4 files changed

Lines changed: 16 additions & 16 deletions

File tree

‎apps/web/components/landing-features-toggle.tsx‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,49 +15,49 @@ export function LandingFeaturesToggle() {
1515
return (
1616
<div className="w-full">
1717
{/* Toggle Group - positioned to overlap with hero section */}
18-
<div className="flex justify-center mt-16 md:-mt-24 mb-8 md:mb-0 relative z-10">
19-
<div className="inline-flex items-center bg-background/80 backdrop-blur-sm rounded-full p-1.5 border border-border shadow-lg absolute -top-[30px] md:-top-[240px]">
18+
<div className="flex justify-center mt-8 md:-mt-24 mb-8 md:mb-0 relative z-10">
19+
<div className="inline-flex items-center bg-background/80 backdrop-blur-sm rounded-full p-1 md:p-1.5 border border-border shadow-lg absolute -top-[30px] md:-top-[240px]">
2020
<button
2121
onClick={() => setViewMode('cloud')}
2222
className={cn(
23-
"flex items-center gap-2 px-5 py-2.5 rounded-full text-sm font-medium transition-all duration-200",
23+
"flex items-center gap-1.5 md:gap-2 px-3 md:px-5 py-2 md:py-2.5 rounded-full text-xs md:text-sm font-medium transition-all duration-200",
2424
viewMode === 'cloud'
2525
? "bg-foreground text-background shadow-sm"
2626
: "text-muted-foreground hover:text-foreground"
2727
)}
2828
>
29-
<Cloud className="w-4 h-4" />
29+
<Cloud className="w-3.5 h-3.5 md:w-4 md:h-4" />
3030
Cloud
3131
</button>
3232
<button
3333
onClick={() => setViewMode('self-hosted')}
3434
className={cn(
35-
"flex items-center gap-2 px-5 py-2.5 rounded-full text-sm font-medium transition-all duration-200",
35+
"flex items-center gap-1.5 md:gap-2 px-3 md:px-5 py-2 md:py-2.5 rounded-full text-xs md:text-sm font-medium transition-all duration-200",
3636
viewMode === 'self-hosted'
3737
? "bg-foreground text-background shadow-sm"
3838
: "text-muted-foreground hover:text-foreground"
3939
)}
4040
>
41-
<Server className="w-4 h-4" />
41+
<Server className="w-3.5 h-3.5 md:w-4 md:h-4" />
4242
Self Hosted
4343
</button>
4444
<button
4545
onClick={() => setViewMode('run-locally')}
4646
className={cn(
47-
"flex items-center gap-2 px-5 py-2.5 rounded-full text-sm font-medium transition-all duration-200",
47+
"flex items-center gap-1.5 md:gap-2 px-3 md:px-5 py-2 md:py-2.5 rounded-full text-xs md:text-sm font-medium transition-all duration-200",
4848
viewMode === 'run-locally'
4949
? "bg-foreground text-background shadow-sm"
5050
: "text-muted-foreground hover:text-foreground"
5151
)}
5252
>
53-
<Terminal className="w-4 h-4" />
53+
<Terminal className="w-3.5 h-3.5 md:w-4 md:h-4" />
5454
Run Locally
5555
</button>
5656
</div>
5757
</div>
5858

5959
{/* Content based on view mode */}
60-
<div className="transition-all duration-300 mt-20">
60+
<div className="transition-all duration-300 mt-12 md:mt-20">
6161
{viewMode === 'cloud' ? (
6262
<LandingFeatures />
6363
) : viewMode === 'self-hosted' ? (

‎apps/web/components/landing-features.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const INTEGRATION_ICONS_ROW2 = [
2727

2828
export function LandingFeatures() {
2929
return (
30-
<section className="w-full bg-background py-20 md:py-32 md:pt-0 -top-240px] md:-top-[240px] relative">
30+
<section className="w-full bg-background py-20 md:py-32 md:pt-0 md:-top-[240px] md:relative">
3131
<div className="max-w-6xl mx-auto px-4 md:px-8">
3232
{/* Hero Headline */}
3333
<div className="text-center mb-2 md:mb-4 max-w-4xl m-auto">

‎apps/web/components/run-locally.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export function RunLocally() {
1414
}
1515

1616
return (
17-
<section className="w-full bg-background py-20 md:py-32 md:pt-0 -top-[240px] relative">
17+
<section className="w-full bg-background py-20 md:py-32 md:pt-0 md:-top-[240px] md:relative">
1818
<div className="max-w-6xl mx-auto px-4 md:px-8">
1919
{/* Headline */}
2020
<div className="text-center mb-8 md:mb-12 max-w-4xl m-auto">

‎apps/web/components/self-hosted-packages.tsx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ const packages: PackageInfo[] = [
5353
docsPath: 'https://github.com/react-native-vibe-code/react-native-vibe-code-sdk/tree/main/packages/sandbox',
5454
},
5555
{
56-
id: 'starter-kit',
57-
name: 'starter-kit',
58-
shortDescription: 'Complete Expo template with 67+ packages for AI-powered mobile development',
59-
icon: <Sparkles className="w-5 h-5" />,
56+
id: 'create-rnvibecode',
57+
name: 'create-rnvibecode',
58+
shortDescription: 'CLI to scaffold Expo projects with 67+ packages and Claude Code system prompt',
59+
icon: <Terminal className="w-5 h-5" />,
6060
color: 'emerald',
6161
docsPath: 'https://github.com/react-native-vibe-code/react-native-vibe-code-sdk/tree/main/packages/starter-kit',
6262
},
@@ -217,7 +217,7 @@ const colorClasses: Record<string, { bg: string; text: string; border: string }>
217217

218218
export function SelfHostedPackages() {
219219
return (
220-
<section className="w-full bg-background py-20 md:py-32 md:pt-0 -top-[240px] relative">
220+
<section className="w-full bg-background py-20 md:py-32 md:pt-0 md:-top-[240px] md:relative">
221221
<div className="max-w-6xl mx-auto px-4 md:px-8">
222222
{/* Hero Headline */}
223223
<div className="text-center mb-8 md:mb-12 max-w-4xl m-auto">

0 commit comments

Comments
 (0)