mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 16:31:12 -05:00
Refactor: Improve desktop layout
This commit is contained in:
@@ -290,8 +290,8 @@ export default function RideDetail() {
|
||||
</div>
|
||||
|
||||
{/* Quick Stats */}
|
||||
<div className="max-w-7xl mx-auto mb-8">
|
||||
<div className="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 gap-4">
|
||||
<div className="max-w-5xl mx-auto mb-8">
|
||||
<div className="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-3 md:gap-4">
|
||||
{ride.max_speed_kmh && (
|
||||
<Card>
|
||||
<CardContent className="p-4 text-center">
|
||||
@@ -393,11 +393,12 @@ export default function RideDetail() {
|
||||
</TabsList>
|
||||
|
||||
<TabsContent value="overview" className="mt-6">
|
||||
<div className="grid lg:grid-cols-2 gap-6">
|
||||
<div className="space-y-6">
|
||||
<div className="grid lg:grid-cols-[1fr,1fr,340px] xl:grid-cols-[1fr,1fr,380px] gap-6">
|
||||
{/* Main content - spans 2 columns on desktop */}
|
||||
<div className="lg:col-span-2 space-y-6">
|
||||
{/* Description */}
|
||||
{ride.description && (
|
||||
<Card>
|
||||
<Card className="max-w-prose mx-auto lg:mx-0">
|
||||
<CardHeader>
|
||||
<CardTitle>About {ride.name}</CardTitle>
|
||||
</CardHeader>
|
||||
@@ -412,21 +413,10 @@ export default function RideDetail() {
|
||||
{ride.name_history && ride.name_history.length > 0 && (
|
||||
<FormerNames nameHistory={ride.name_history} currentName={ride.name} />
|
||||
)}
|
||||
|
||||
<SimilarRides
|
||||
currentRideId={ride.id}
|
||||
parkId={(ride as any).currentParkId}
|
||||
parkSlug={parkSlug || ''}
|
||||
category={ride.category}
|
||||
/>
|
||||
|
||||
<RecentPhotosPreview
|
||||
rideId={ride.id}
|
||||
onViewAll={() => setActiveTab("photos")}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="space-y-6">
|
||||
{/* Sidebar - single column on desktop */}
|
||||
<div className="space-y-6 lg:row-span-2">
|
||||
<RatingDistribution
|
||||
rideId={ride.id}
|
||||
totalReviews={ride.review_count}
|
||||
@@ -540,6 +530,21 @@ export default function RideDetail() {
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
|
||||
{/* Full-width sections below */}
|
||||
<div className="lg:col-span-3 space-y-6">
|
||||
<SimilarRides
|
||||
currentRideId={ride.id}
|
||||
parkId={(ride as any).currentParkId}
|
||||
parkSlug={parkSlug || ''}
|
||||
category={ride.category}
|
||||
/>
|
||||
|
||||
<RecentPhotosPreview
|
||||
rideId={ride.id}
|
||||
onViewAll={() => setActiveTab("photos")}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</TabsContent>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user