From 326d0bc2bef3a4dedb3b17da3ebbdb25b0b3be4f Mon Sep 17 00:00:00 2001 From: Jonathan Summers-Muir Date: Sun, 14 Aug 2022 23:58:17 -0500 Subject: [PATCH] fix: sections now looking good on mobile and tablet --- .../LaunchWeek/LaunchSection/index.tsx | 150 ++++++++++-------- 1 file changed, 84 insertions(+), 66 deletions(-) diff --git a/apps/www/components/LaunchWeek/LaunchSection/index.tsx b/apps/www/components/LaunchWeek/LaunchSection/index.tsx index 001b58d79b4..1ddcc2321ea 100644 --- a/apps/www/components/LaunchWeek/LaunchSection/index.tsx +++ b/apps/www/components/LaunchWeek/LaunchSection/index.tsx @@ -15,10 +15,78 @@ export const LaunchSection = (props: WeekDayProps) => { const nextDayNotShipped = props.shipped && !days[props.index + 1]?.shipped const [videoVisible, setVideoVisible] = useState(false) + interface ClassNameComponent { + className?: string + } + + const Header = ({ className }: ClassNameComponent) => ( +
+ {/* START timeline dot */} +
+ {/* END timeline dot */} +
+ {props.date} + {props.shipped ? ( + +
+
+ +
{' '} + Shipped +
+
+ ) : ( + Not shipped yet + )} +
+

+ {props.shipped ? props.title : props.dd + ' 08:00 PT | 11:00 ET'} +

+ + {/* {props.shipped && props.announcements && ( +
+ {props.announcements.map((announcement: Announcement) => ( + + ))} +
+ )} */} + {props.shipped &&

{props.description}

} +
+ ) + + const TimelineLine = ({ className }: ClassNameComponent) => { + return ( + <> + {/* START timeline line */} + {props.index !== days.length - 1 && ( +
+ )} + {/* END timeline line */} + + ) + } + return ( -
+
+ {props.shippingHasStarted && ( -
+
+
{!props.shipped ? (
{
setVideoVisible(true)} className=" - absolute - top-0 - left-0 - flex - h-full - w-full - items-center - justify-center - " + absolute + top-0 + left-0 + flex + h-full + w-full + items-center + justify-center + " > { header={
{props.title} - setVideoVisible(false)} @@ -91,66 +158,17 @@ export const LaunchSection = (props: WeekDayProps) => { className={[ `relative col-span-12 flex flex-col gap-8 + pl-4 + md:pl-8 lg:pl-8 `, props.shipped ? 'border-brand-900' : 'border-purple-700', props.shippingHasStarted && 'lg:col-span-6', - !lastIndex && 'pb-16', + !lastIndex && 'pb-8 lg:pb-16', ].join(' ')} > - {/* START timeline line */} - {props.index !== days.length - 1 && ( -
- )} - {/* END timeline line */} - -
- {/* START timeline dot */} -
- {/* END timeline dot */} - -
- {props.date} - {props.shipped ? ( - -
-
- -
{' '} - Shipped -
-
- ) : ( - Not shipped yet - )} -
-

- {props.shipped ? props.title : props.dd + ' 08:00 PT | 11:00 ET'} -

- - {/* {props.shipped && props.announcements && ( -
- {props.announcements.map((announcement: Announcement) => ( - - ))} -
- )} */} - {props.shipped &&

{props.description}

} -
+ +
{props.shipped && (
{props.articles &&