Reduce double-stacked padding on draft board page from 64px to 32px on mobile by using responsive p-2/px-2 md:p-4/md:px-4 classes. Replace dashboard CSS grid with flex layout so My Leagues and Create League stack naturally at the top without being stretched apart by the row-span-2 events column. Mobile order preserved: My Leagues, Events, Create League.
This commit is contained in:
parent
22726550a6
commit
02fa285585
3 changed files with 15 additions and 14 deletions
|
|
@ -65,7 +65,7 @@ export function DraftGrid({
|
||||||
const totalTeams = draftSlots.length;
|
const totalTeams = draftSlots.length;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="p-4">
|
<div className="p-2 md:p-4">
|
||||||
{title && <h2 className="text-xl font-semibold mb-4">{title}</h2>}
|
{title && <h2 className="text-xl font-semibold mb-4">{title}</h2>}
|
||||||
<div className="w-full overflow-x-auto">
|
<div className="w-full overflow-x-auto">
|
||||||
<div className="min-w-max">
|
<div className="min-w-max">
|
||||||
|
|
|
||||||
|
|
@ -215,17 +215,13 @@ export default function Home({ loaderData }: Route.ComponentProps) {
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto py-8 px-4">
|
<div className="container mx-auto py-8 px-4">
|
||||||
{/*
|
{/*
|
||||||
lg+: 3-col grid, left column (My Leagues + Create) spans 2, right (Events) spans 1.
|
lg+: flex row, left column (My Leagues + Create) takes 2/3, right (Events) takes 1/3.
|
||||||
mobile/tablet: single column stacked in order: My Leagues, Upcoming Events, Create League.
|
mobile/tablet: single column stacked in order: My Leagues, Upcoming Events, Create League.
|
||||||
*/}
|
*/}
|
||||||
<div className="grid grid-cols-1 gap-6 lg:grid-cols-3">
|
<div className="flex flex-col gap-6 lg:flex-row">
|
||||||
{/* My Leagues — order 1 on mobile, col-span-2 on desktop */}
|
<div className="flex flex-col gap-6 lg:w-2/3">
|
||||||
<div className="order-1 lg:col-span-2">
|
|
||||||
<MyLeaguesCard leagues={leagueRows} />
|
<MyLeaguesCard leagues={leagueRows} />
|
||||||
</div>
|
<div className="lg:hidden">
|
||||||
|
|
||||||
{/* Upcoming Events — order 2 on mobile, right column on desktop spanning both rows */}
|
|
||||||
<div className="order-2 lg:col-span-1 lg:row-span-2">
|
|
||||||
<UpcomingEventsCard
|
<UpcomingEventsCard
|
||||||
events={upcomingCalendarEvents}
|
events={upcomingCalendarEvents}
|
||||||
limit={8}
|
limit={8}
|
||||||
|
|
@ -233,11 +229,16 @@ export default function Home({ loaderData }: Route.ComponentProps) {
|
||||||
showLeagueAvatar={leagueRows.length > 1}
|
showLeagueAvatar={leagueRows.length > 1}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Create a League — order 3 on mobile, below My Leagues on desktop */}
|
|
||||||
<div className="order-3 lg:col-span-2">
|
|
||||||
<CreateLeagueCard />
|
<CreateLeagueCard />
|
||||||
</div>
|
</div>
|
||||||
|
<div className="hidden lg:block lg:w-1/3">
|
||||||
|
<UpcomingEventsCard
|
||||||
|
events={upcomingCalendarEvents}
|
||||||
|
limit={8}
|
||||||
|
viewAllUrl="/upcoming-events"
|
||||||
|
showLeagueAvatar={leagueRows.length > 1}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -260,7 +260,7 @@ export default function DraftBoard() {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Draft Grid */}
|
{/* Draft Grid */}
|
||||||
<div className="w-full px-4 py-4">
|
<div className="w-full py-4 px-2 md:px-4">
|
||||||
<DraftGrid
|
<DraftGrid
|
||||||
draftSlots={draftSlots}
|
draftSlots={draftSlots}
|
||||||
draftGrid={draftGrid}
|
draftGrid={draftGrid}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue