diff --git a/components/BlurryPoster/BlurryPoster.tsx b/components/BlurryPoster/BlurryPoster.tsx index 4b29d716..e05936d8 100644 --- a/components/BlurryPoster/BlurryPoster.tsx +++ b/components/BlurryPoster/BlurryPoster.tsx @@ -51,7 +51,7 @@ export const BlurryPoster = ({ const date = publishedDate && new Date(publishedDate); const formattedDate = date && date.toLocaleDateString('en-US', { month: 'long', - day: '2-digit', + day: 'numeric', year: 'numeric', }); diff --git a/components/Hero/StoryHero.tsx b/components/Hero/StoryHero.tsx index 88da0ad2..af438ac2 100644 --- a/components/Hero/StoryHero.tsx +++ b/components/Hero/StoryHero.tsx @@ -54,7 +54,7 @@ export const StoryHero = ({ const formattedDate = date && date.toLocaleDateString('en-US', { weekday: 'long', month: 'long', - day: '2-digit', + day: 'numeric', year: 'numeric', }); diff --git a/components/Storyblok/SbVerticalPoster.tsx b/components/Storyblok/SbVerticalPoster.tsx index 32125a3e..e51dfd59 100644 --- a/components/Storyblok/SbVerticalPoster.tsx +++ b/components/Storyblok/SbVerticalPoster.tsx @@ -11,6 +11,7 @@ type SbVerticalPosterProps = { customHeading?: SbTypographyProps[]; headingLevel?: HeadingType; isSmallHeading?: boolean; + subheading?: string; imageOnLeft?: boolean; body: string; byline?: string; @@ -27,6 +28,7 @@ export const SbVerticalPoster = ({ customHeading, headingLevel, isSmallHeading, + subheading, imageOnLeft, body, byline, @@ -46,6 +48,7 @@ export const SbVerticalPoster = ({ customHeading={customHeading} headingLevel={headingLevel} isSmallHeading={isSmallHeading} + subheading={subheading} imageOnLeft={imageOnLeft} body={body} byline={byline} diff --git a/components/VerticalPoster/VerticalPoster.styles.ts b/components/VerticalPoster/VerticalPoster.styles.ts index a66b5109..e5f30a06 100644 --- a/components/VerticalPoster/VerticalPoster.styles.ts +++ b/components/VerticalPoster/VerticalPoster.styles.ts @@ -1,31 +1,22 @@ import { cnb } from 'cnbuilder'; -export const root = 'relative bg-no-repeat bg-cover bg-center overflow-hidden break-words'; +export const root = 'relative overflow-hidden break-words'; export const blurWrapper = 'w-full h-full backdrop-blur-md'; -export const grid = 'w-full rs-py-8'; +export const grid = 'w-full'; -export const contentWrapper = (imageOnLeft: boolean) => cnb('relative z-10', { +export const contentWrapper = (imageOnLeft: boolean) => cnb('relative px-[6vw] py-[8vw]', { 'lg:order-last': imageOnLeft, 'lg:order-first': !imageOnLeft, }); -export const headingWrapper = (imageOnLeft: boolean) => cnb('lg:rs-mt-7 rs-mb-5', { - 'lg:w-[120%] lg:-ml-[20%] 3xl:w-auto 3xl:-ml-200 lg:mr-0' : imageOnLeft, -}); -export const headingInnerWrapper = (imageOnLeft: boolean) => cnb('w-full border-l-[1rem] sm:border-l-[1.4rem] md:border-l-[2rem] pl-10 pr-20 sm:pl-16 sm:pr-30 md:pl-30 md:pr-50', { - 'lg:border-l-0 lg:border-r-[3rem] xl:border-r-[4rem] lg:pl-0 lg:pr-50 xl:pr-60': imageOnLeft, - 'lg:border-l-[3rem] xl:border-l-[4rem] lg:pl-50 xl:pl-60 lg:pr-0 3xl:pl-[calc(100%-750px-40px)] lg:w-[140%] xl:w-[120%]': !imageOnLeft, -}); -export const heading = (imageOnLeft: boolean, isSmallHeading: boolean) => cnb('mb-0 -mt-01em fluid-type-7', { - '3xl:pl-[calc(100%-750px-40px)] lg:w-[140%] xl:w-[130%]': !imageOnLeft, +export const headingWrapper = '-mt-1em rs-mb-5'; +export const heading = (isSmallHeading: boolean) => cnb('mb-0 fluid-type-7', { 'mt-01em md:fluid-type-8 lg:fluid-type-7 3xl:fluid-type-8 4xl:text-[17.1rem]': isSmallHeading, 'mt-01em md:fluid-type-9': !isSmallHeading, }); -export const customHeading = (imageOnLeft: boolean) => cnb('flex flex-wrap gap-x-[1em] items-center mb-0 -mt-05em lg:-mt-08em children:inline-block', { - '3xl:pl-[calc(100%-750px-40px)] lg:w-[140%] xl:w-[130%]': !imageOnLeft, -}); +export const customHeading = 'flex flex-col mb-0 children:block'; export const customHeadingText = (font: 'druk' | 'serif', isSmallHeading: boolean) => cnb('hyphens-auto first:ml-0 last:mr-0', { 'fluid-type-7': font === 'druk', 'md:fluid-type-9' : font === 'druk' && !isSmallHeading, @@ -34,17 +25,12 @@ export const customHeadingText = (font: 'druk' | 'serif', isSmallHeading: boolea 'md:type-4 3xl:fluid-type-5' : font === 'serif' && isSmallHeading, }); -export const bodyWrapper = (imageOnLeft: boolean) => cnb('cc w-full', { - '3xl:pr-[calc(100%-750px)] lg:pl-60': imageOnLeft, - '3xl:pl-[calc(100%-750px)] lg:pr-60': !imageOnLeft, -}); - export const cta = 'rs-mt-4'; -export const imageWrapper = (imageOnLeft: boolean) => cnb('w-full mt-30 md:mt-50 lg:mt-0 shrink-0 cc', { - 'lg:order-first 3xl:pl-[calc(100%-750px)] lg:pr-0': imageOnLeft, - ' 3xl:pr-[calc(100%-750px)] lg:pl-0': !imageOnLeft, +export const imageWrapper = (imageOnLeft: boolean) => cnb('w-full bg-gc-black bg-no-repeat bg-cover bg-center px-[6vw] py-[8vw] mt-30 md:mt-50 lg:mt-0 shrink-0', { + 'lg:order-first': imageOnLeft, + '': !imageOnLeft, }); export const imageInnerWrapper = 'h-full w-full'; -export const image = 'h-full w-full object-cover object-center hidden lg:block'; +export const image = 'h-full w-full max-h-[100rem] object-cover object-center hidden lg:block'; export const imageMobile = 'h-full w-full object-cover object-center lg:hidden'; diff --git a/components/VerticalPoster/VerticalPoster.tsx b/components/VerticalPoster/VerticalPoster.tsx index 7d392e4d..cca965a3 100644 --- a/components/VerticalPoster/VerticalPoster.tsx +++ b/components/VerticalPoster/VerticalPoster.tsx @@ -17,6 +17,7 @@ type VerticalPosterProps = HTMLAttributes & { imageOnLeft?: boolean; headingLevel?: HeadingType; heading?: string; + subheading?: string; customHeading?: SbTypographyProps[]; isSmallHeading?: boolean; body?: string; @@ -35,6 +36,7 @@ export const VerticalPoster = ({ customHeading, headingLevel = 'h2', isSmallHeading, + subheading, body, byline, publishedDate, @@ -48,34 +50,31 @@ export const VerticalPoster = ({ const date = publishedDate && new Date(publishedDate); const formattedDate = date && date.toLocaleDateString('en-US', { month: 'long', - day: '2-digit', + day: 'numeric', year: 'numeric', }); return ( - +
-
- - + + + {/* Render all Druk font heading if custom heading is not entered */} {heading && !customHeading && ( {heading} )} {/* Render custom mixed typography heading if entered */} {customHeading && ( - + {customHeading.map(({text, font, italic}) => ( -
- {body && ( - {body} - )} - {byline && ( - {byline} - )} - {date && ( - - )} - {cta && ( -
- {cta} -
- )} -
-
-
+ {subheading && ( + + {subheading} + + )} + {body && ( + + {body} + + )} + {byline && ( + {byline} + )} + {date && ( + + )} + {cta && ( +
+ {cta} +
+ )} + +
{imageSrc && (