Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
yvonnetangsu committed Oct 7, 2023
1 parent 55c3c48 commit 0f0333b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions components/BlurryPoster/BlurryPoster.styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export const headingWrapper = (
headingFont?: 'druk' | 'serif',
isTwoCol?: boolean,
) => cnb('lg:rs-mt-7 rs-mb-5', {
'' : imageOnLeft,
'lg:mr-0 lg:w-[120%] lg:-ml-[20%] 3xl:w-auto 3xl:-ml-200': imageOnLeft && headingFont === 'druk' && isTwoCol,
});
export const headingInnerWrapper = (
Expand Down Expand Up @@ -73,9 +72,11 @@ export const bodyWrapper = (imageOnLeft?: boolean, isTwoCol?: boolean) => cnb('c

export const cta = 'rs-mt-4';

export const imageWrapper = (imageOnLeft?: boolean, isTwoCol?: boolean) => cnb('w-full mt-30 md:mt-50 lg:mt-0 shrink-0 cc', {
export const imageWrapper = (imageOnLeft?: boolean, isTwoCol?: boolean, hasImage?: boolean) => cnb('w-full cc', {
'lg:order-first 3xl:pl-[calc(100%-750px)] lg:pr-0': imageOnLeft && isTwoCol,
' 3xl:pr-[calc(100%-750px)] lg:pl-0': !imageOnLeft,
'3xl:pr-[calc(100%-750px)] lg:pl-0': !imageOnLeft && isTwoCol,
'lg:mt-0' : isTwoCol,
'rs-mt-6' : hasImage,
});
export const imageInnerWrapper = 'h-full w-full';
export const image = 'h-full w-full object-cover object-center hidden lg:block';
Expand Down
8 changes: 4 additions & 4 deletions components/BlurryPoster/BlurryPoster.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,22 +141,22 @@ export const BlurryPoster = ({
)}
</div>
</div>
<div className={styles.imageWrapper(imageOnLeft)}>
<Container width={isTwoCol ? 'full' : 'site'} className={styles.imageWrapper(imageOnLeft, isTwoCol, !!imageSrc)}>
{imageSrc && (
<AnimateInView animation="zoomSharpen" duration={1} className={styles.imageInnerWrapper}>
<img
src={getProcessedImage(imageSrc, type === 'hero' ? '900x1600' : '900x1200', imageFocus)}
src={getProcessedImage(imageSrc, type === 'hero' && !isTwoCol ? '1800x900' : '900x1200', imageFocus)}
alt=""
className={styles.image}
/>
<img
src={getProcessedImage(imageSrc, '800x400', imageFocus)}
src={getProcessedImage(imageSrc, type === 'hero' ? '1000x1000' : '1000x500', imageFocus)}
alt=""
className={styles.imageMobile}
/>
</AnimateInView>
)}
</div>
</Container>
</Grid>
</div>
</Container>
Expand Down

0 comments on commit 0f0333b

Please sign in to comment.