Skip to content

armgit / mapcn

Public Imported from GitHub
0

Beautiful map components. 100% Free, Zero config, one command setup.

TypeScript

Mobile layout fix

Anmoldeep Singhfde301b3e3c2
diff --git a/src/app/(home)/_components/examples.tsx b/src/app/(home)/_components/examples.tsx
index 9ee060d..95c810f 100644
--- a/src/app/(home)/_components/examples.tsx
+++ b/src/app/(home)/_components/examples.tsx
@@ -60,11 +60,11 @@ export function Examples() {
} | null>(null);
return (
- <div className="grid grid-cols-2 lg:grid-cols-4 gap-3 mt-8 animate-fade-in delay-400">
+ <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3 mt-8 animate-fade-in delay-400">
{/* Widget 1: Analytics - spans 2 cols, 2 rows */}
<ExampleCard
label=""
- className="col-span-2 row-span-2 h-[300px] lg:h-[412px]"
+ className="col-span-1 sm:col-span-2 sm:row-span-2 h-[300px] lg:h-[412px]"
delay="delay-400"
>
{/* Stats Panel */}
diff --git a/src/app/(home)/_components/hero.tsx b/src/app/(home)/_components/hero.tsx
index 5cb96fc..920e950 100644
--- a/src/app/(home)/_components/hero.tsx
+++ b/src/app/(home)/_components/hero.tsx
@@ -42,22 +42,22 @@ export function Hero() {
</p>
</div>
- <div className="flex justify-center animate-fade-up delay-200">
- <div className="inline-flex items-center gap-3 bg-secondary/50 border border-border/50 rounded-full px-5 py-2.5 font-mono text-sm">
- <span className="text-muted-foreground">$</span>
+ <div className="flex justify-center animate-fade-up delay-200 w-full px-4">
+ <div className="inline-flex items-center gap-3 bg-secondary/50 border border-border/50 rounded-full px-5 py-2.5 font-mono text-sm max-w-full overflow-x-auto">
+ <span className="text-muted-foreground shrink-0">$</span>
<code>{installCommand}</code>
<CopyButton text={installCommand} />
</div>
</div>
- <div className="flex justify-center items-center gap-3 animate-fade-up delay-300">
+ <div className="flex flex-wrap justify-center items-center gap-3 animate-fade-up delay-300">
<Button asChild>
<Link href="/docs">
Get Started <ArrowRight className="size-4" />
</Link>
</Button>
- <Button size="lg" variant="outline" asChild>
- <Link href="/docs/basic-map">View Examples </Link>
+ <Button variant="outline" size="lg" asChild>
+ <Link href="/docs/basic-map">View Examples</Link>
</Button>
</div>
</div>
diff --git a/src/app/(home)/page.tsx b/src/app/(home)/page.tsx
index eeba7a4..0c3cc93 100644
--- a/src/app/(home)/page.tsx
+++ b/src/app/(home)/page.tsx
@@ -5,11 +5,11 @@ import { Footer } from "./_components/footer";
export default function Page() {
return (
- <div className="min-h-screen bg-background flex flex-col">
- <Header className="max-w-5xl mx-auto" />
+ <div className="min-h-screen bg-background flex flex-col overflow-x-hidden">
+ <Header className="max-w-5xl mx-auto w-full" />
- <main className="flex-1 px-6 py-16 mx-auto">
- <section className="max-w-5xl w-full space-y-12">
+ <main className="flex-1 px-6 py-16 mx-auto w-full">
+ <section className="max-w-5xl w-full mx-auto space-y-12">
<Hero />
<Examples />
</section>