-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GIVCAMP-201 | Blurry poster options and responsive (#124)
* Blurry poster tab WIP * keep tweaking * centered container stuff * More tab padding update * I think we're almost there * More finetuning * Clean up
- Loading branch information
1 parent
f40532a
commit 840edbb
Showing
7 changed files
with
134 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,38 @@ | ||
import { cnb } from 'cnbuilder'; | ||
|
||
export const root = 'relative bg-no-repeat bg-cover bg-center overflow-hidden'; | ||
export const root = 'relative bg-no-repeat bg-cover bg-center overflow-hidden break-words'; | ||
export const blurWrapper = 'w-full h-full backdrop-blur-md'; | ||
|
||
export const heading = (imageOnLeft: boolean) => cnb('lg:rs-mt-7 rs-mb-5 lg:w-[140%]', { | ||
'lg:ml-[-40%]': imageOnLeft, | ||
export const grid = 'w-full rs-py-8'; | ||
|
||
export const contentWrapper = (imageOnLeft: boolean) => cnb('relative z-10', { | ||
'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('pl-10 pr-20 sm:pl-30 sm:pr-20 md:pl-30 md:pr-50', { | ||
'border-l-[1rem] md:border-l-[2rem] lg:border-l-0 lg:border-r-[3rem] xl:border-r-[4rem] lg:pl-0 lg:pr-50 xl:pr-60': imageOnLeft, | ||
'border-l-[1rem] md:border-l-[2rem] 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, | ||
'md:fluid-type-8 lg:fluid-type-7 3xl:fluid-type-8 4xl:text-[17.1rem]': isSmallHeading, | ||
'md:fluid-type-9': !isSmallHeading, | ||
}); | ||
|
||
export const contentWrapper = (imageOnLeft: boolean) => cnb('z-10', { | ||
'order-last lg:rs-pl-4': imageOnLeft, | ||
'order-first lg:rs-pr-2': !imageOnLeft, | ||
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 imageWrapper = (imageOnLeft: boolean) => cnb('', { | ||
'order-first': 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 image = 'h-full w-full object-cover object-center hidden lg:block'; | ||
export const imageMobile = 'h-full w-full object-cover object-center lg:hidden'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/** | ||
* Half centered container. | ||
*/ | ||
module.exports = function () { | ||
return function ({ addComponents, theme }) { | ||
// Find and set the padding based on the screen margins | ||
const screens = theme('screens'); | ||
const paddingLeft = {}; | ||
const paddingRight = {}; | ||
|
||
// Create padding for each screen size which equals to the screen margin setting. | ||
const keys = Object.keys(screens); | ||
keys.forEach((key) => { | ||
paddingLeft[`@screen ${key}`] = { | ||
paddingLeft: theme(`decanter.screenMargins.${key}`), | ||
}; | ||
}); | ||
keys.forEach((key) => { | ||
paddingRight[`@screen ${key}`] = { | ||
paddingRight: theme(`decanter.screenMargins.${key}`), | ||
}; | ||
}); | ||
|
||
const components = { | ||
'.cc-left': { | ||
paddingLeft: theme('decanter.screenMargins.xs'), | ||
marginLeft: 0, | ||
...paddingLeft, | ||
'@media only screen and (min-width: 1700px)': { | ||
paddingLeft: 'calc(100% - 750px)', | ||
}, | ||
}, | ||
'.cc-right': { | ||
paddingRight: theme('decanter.screenMargins.xs'), | ||
marginRight: 0, | ||
...paddingRight, | ||
'@media only screen and (min-width: 1700px)': { | ||
paddingRight: 'calc(100% - 750px)', | ||
}, | ||
}, | ||
}; | ||
|
||
addComponents(components); | ||
}; | ||
}; |