add responsive mobile tablet laptop and desktop

This commit is contained in:
2026-04-16 16:49:32 +07:00
parent d0480df31a
commit 82c1da9951
9 changed files with 195 additions and 118 deletions
+41 -42
View File
@@ -17,27 +17,26 @@ export default async function HomePage() {
<div className="relative min-h-screen bg-neutral-50">
{/* ========== HERO ========== */}
<section className="relative overflow-hidden bg-neutral-900">
{/* Gradient overlay */}
<div className="absolute inset-0 bg-linear-to-br from-primary-900/90 via-neutral-900/80 to-secondary-900/70" />
<div className="relative mx-auto max-w-4xl px-4 pb-16 pt-14 text-center">
{/* Brand */}
<div className="mb-6 inline-flex items-center gap-2 rounded-full border border-primary-400/30 bg-primary-600/20 px-4 py-1.5">
<span className="text-sm">🏔</span>
<span className="text-sm font-medium text-primary-300">
<div className="relative mx-auto max-w-4xl px-4 pb-10 pt-8 text-center sm:pb-14 sm:pt-12 lg:pb-16 lg:pt-14">
{/* Brand badge */}
<div className="mb-4 inline-flex items-center gap-1.5 rounded-full border border-primary-400/30 bg-primary-600/20 px-3 py-1 sm:mb-6 sm:gap-2 sm:px-4 sm:py-1.5">
<span className="text-xs sm:text-sm">🏔</span>
<span className="text-xs font-medium text-primary-300 sm:text-sm">
Open Trip Pendakian Gunung
</span>
</div>
<h1 className="mb-4 text-4xl font-extrabold leading-tight tracking-tight text-white sm:text-5xl">
<h1 className="mb-3 text-3xl font-extrabold leading-tight tracking-tight text-white sm:mb-4 sm:text-4xl lg:text-5xl">
Se<span className="text-primary-400">Trip</span>
</h1>
<p className="mx-auto mb-3 max-w-lg text-lg font-medium text-neutral-300">
<p className="mx-auto mb-2 max-w-sm text-base font-medium text-neutral-300 sm:mb-3 sm:max-w-lg sm:text-lg">
Masa cowok sejati, cewek seimut nggak{" "}
<span className="text-primary-400">SeTrip</span> bareng?
</p>
<p className="mx-auto mb-8 max-w-md text-neutral-400">
<p className="mx-auto mb-6 max-w-xs text-sm text-neutral-400 sm:mb-8 sm:max-w-md sm:text-base">
Yuk mulai dari sini. Cari open trip pendakian, gabung bareng, nikmati
petualangan ke gunung-gunung Jawa Barat.
</p>
@@ -45,41 +44,41 @@ export default async function HomePage() {
<SearchBar />
{/* Stats */}
<div className="mt-10 flex justify-center gap-8 sm:gap-12">
<div className="mt-8 flex justify-center gap-6 sm:mt-10 sm:gap-10 lg:gap-12">
<div>
<p className="text-2xl font-bold text-primary-400">
<p className="text-xl font-bold text-primary-400 sm:text-2xl">
{trips.length}
</p>
<p className="text-xs text-neutral-400">Trip Tersedia</p>
<p className="text-[11px] text-neutral-400 sm:text-xs">Trip Tersedia</p>
</div>
<div className="h-10 w-px bg-neutral-700" />
<div className="h-8 w-px bg-neutral-700 sm:h-10" />
<div>
<p className="text-2xl font-bold text-secondary-400">8</p>
<p className="text-xs text-neutral-400">Gunung Jabar</p>
<p className="text-xl font-bold text-secondary-400 sm:text-2xl">8</p>
<p className="text-[11px] text-neutral-400 sm:text-xs">Gunung Jabar</p>
</div>
<div className="h-10 w-px bg-neutral-700" />
<div className="h-8 w-px bg-neutral-700 sm:h-10" />
<div>
<p className="text-2xl font-bold text-white">100%</p>
<p className="text-xs text-neutral-400">Seru</p>
<p className="text-xl font-bold text-white sm:text-2xl">100%</p>
<p className="text-[11px] text-neutral-400 sm:text-xs">Seru</p>
</div>
</div>
</div>
</section>
{/* ========== CONTENT ========== */}
<div className="mx-auto max-w-6xl px-4 py-10 space-y-12">
<div className="mx-auto max-w-6xl px-4 py-6 space-y-8 sm:py-8 sm:space-y-10 lg:py-10 lg:space-y-12">
{/* Trip Terdekat */}
{upcomingTrips.length > 0 && (
<section>
<div className="mb-5 flex items-center gap-3">
<div className="flex h-9 w-9 items-center justify-center rounded-lg bg-primary-100 text-lg">
<div className="mb-4 flex items-center gap-3 sm:mb-5">
<div className="flex h-8 w-8 items-center justify-center rounded-lg bg-primary-100 text-base sm:h-9 sm:w-9 sm:text-lg">
🔥
</div>
<div>
<h2 className="text-lg font-bold text-neutral-800">
<h2 className="text-base font-bold text-neutral-800 sm:text-lg">
Trip Terdekat
</h2>
<p className="text-xs text-neutral-500">
<p className="text-[11px] text-neutral-500 sm:text-xs">
Berangkat dalam 7 hari ke depan
</p>
</div>
@@ -108,42 +107,42 @@ export default async function HomePage() {
{/* Open Trip */}
<section>
<div className="mb-5 flex items-center justify-between">
<div className="mb-4 flex items-center justify-between sm:mb-5">
<div className="flex items-center gap-3">
<div className="flex h-9 w-9 items-center justify-center rounded-lg bg-secondary-100 text-lg">
<div className="flex h-8 w-8 items-center justify-center rounded-lg bg-secondary-100 text-base sm:h-9 sm:w-9 sm:text-lg">
🏔
</div>
<div>
<h2 className="text-lg font-bold text-neutral-800">
<h2 className="text-base font-bold text-neutral-800 sm:text-lg">
Open Trip
</h2>
<p className="text-xs text-neutral-500">
<p className="hidden text-xs text-neutral-500 sm:block">
Pendakian gunung bareng teman baru
</p>
</div>
</div>
<Link
href="/trips"
className="rounded-lg bg-secondary-50 px-3 py-1.5 text-sm font-medium text-secondary-600 hover:bg-secondary-100"
className="rounded-lg bg-secondary-50 px-2.5 py-1 text-xs font-medium text-secondary-600 hover:bg-secondary-100 sm:px-3 sm:py-1.5 sm:text-sm"
>
Lihat semua
</Link>
</div>
{latestTrips.length === 0 ? (
<div className="rounded-2xl border-2 border-dashed border-neutral-200 bg-white p-14 text-center">
<div className="mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-primary-50 text-3xl">
<div className="rounded-2xl border-2 border-dashed border-neutral-200 bg-white p-8 text-center sm:p-14">
<div className="mx-auto mb-4 flex h-14 w-14 items-center justify-center rounded-full bg-primary-50 text-2xl sm:h-16 sm:w-16 sm:text-3xl">
🏕
</div>
<p className="mb-1 text-lg font-bold text-neutral-800">
<p className="mb-1 text-base font-bold text-neutral-800 sm:text-lg">
Belum ada trip tersedia
</p>
<p className="mb-6 text-sm text-neutral-500">
<p className="mb-5 text-sm text-neutral-500 sm:mb-6">
Jadilah yang pertama buat open trip pendakian!
</p>
<Link
href="/create-trip"
className="inline-block rounded-xl bg-primary-600 px-6 py-2.5 text-sm font-semibold text-white shadow-lg shadow-primary-600/25 hover:bg-primary-700"
className="inline-block rounded-xl bg-primary-600 px-5 py-2.5 text-sm font-semibold text-white shadow-lg shadow-primary-600/25 hover:bg-primary-700"
>
+ Buat Trip Baru
</Link>
@@ -173,15 +172,15 @@ export default async function HomePage() {
{/* Budget Friendly */}
{budgetTrips.length > 0 && (
<section>
<div className="mb-5 flex items-center gap-3">
<div className="flex h-9 w-9 items-center justify-center rounded-lg bg-primary-100 text-lg">
<div className="mb-4 flex items-center gap-3 sm:mb-5">
<div className="flex h-8 w-8 items-center justify-center rounded-lg bg-primary-100 text-base sm:h-9 sm:w-9 sm:text-lg">
💸
</div>
<div>
<h2 className="text-lg font-bold text-neutral-800">
<h2 className="text-base font-bold text-neutral-800 sm:text-lg">
Budget Friendly
</h2>
<p className="text-xs text-neutral-500">
<p className="text-[11px] text-neutral-500 sm:text-xs">
Trip di bawah Rp 300.000
</p>
</div>
@@ -208,15 +207,15 @@ export default async function HomePage() {
)}
{/* CTA Bottom */}
<section className="overflow-hidden rounded-2xl bg-neutral-800 p-8 text-center sm:p-12">
<h2 className="mb-2 text-2xl font-bold text-white">
<section className="overflow-hidden rounded-2xl bg-neutral-800 p-6 text-center sm:p-8 lg:p-12">
<h2 className="mb-2 text-xl font-bold text-white sm:text-2xl">
Siap naik gunung?
</h2>
<p className="mx-auto mb-6 max-w-sm text-neutral-400">
<p className="mx-auto mb-5 max-w-xs text-sm text-neutral-400 sm:mb-6 sm:max-w-sm sm:text-base">
Buat trip sendiri atau gabung trip yang sudah ada. Seru bareng teman
baru!
</p>
<div className="flex justify-center gap-3">
<div className="flex flex-col justify-center gap-2 sm:flex-row sm:gap-3">
<Link
href="/create-trip"
className="rounded-xl bg-primary-600 px-6 py-2.5 text-sm font-semibold text-white shadow-lg shadow-primary-600/25 hover:bg-primary-500"
@@ -236,7 +235,7 @@ export default async function HomePage() {
{/* ========== FAB ========== */}
<Link
href="/create-trip"
className="fixed bottom-6 right-6 z-50 flex h-14 w-14 items-center justify-center rounded-full bg-primary-600 text-2xl font-bold text-white shadow-xl shadow-primary-600/30 transition-all hover:scale-110 hover:bg-primary-500 active:scale-95"
className="fixed bottom-4 right-4 z-50 flex h-12 w-12 items-center justify-center rounded-full bg-primary-600 text-xl font-bold text-white shadow-xl shadow-primary-600/30 transition-all hover:scale-110 hover:bg-primary-500 active:scale-95 sm:bottom-6 sm:right-6 sm:h-14 sm:w-14 sm:text-2xl"
title="Buat Trip"
>
+