Builds the markers, data block and stand-in host for the CMS host injection
The pages carry the CMS markers (data block, list regions, JSON-LD price, inline price); PackagesProvider reads the host's data block after hydration and asks the API only when there is none; the site address comes from the block. A stand-in for the host (config/hostInjector.ts, --cms-data in the preview server) and browser tests check the behaviour with different data. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -28,6 +28,87 @@ const config = defineConfig({
|
||||
'[tabindex="-1"]:focus': {
|
||||
outline: 'none',
|
||||
},
|
||||
// The plain HTML between the CMS markers (components/CmsRegion): what
|
||||
// the CMS host writes, shown until the styled cards take over after
|
||||
// hydration. Looks like the cards (white, hairline border, centred),
|
||||
// rows of three from lg (62em), one column below.
|
||||
'.cms-offerings': {
|
||||
listStyle: 'none',
|
||||
margin: '0 auto',
|
||||
padding: 0,
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
gap: '{spacing.gridGap}',
|
||||
maxWidth: '460px',
|
||||
'@media (min-width: 62em)': {
|
||||
flexDirection: 'row',
|
||||
flexWrap: 'wrap',
|
||||
justifyContent: 'center',
|
||||
maxWidth: 'none',
|
||||
},
|
||||
},
|
||||
'.cms-offering': {
|
||||
background: 'white',
|
||||
border: '1px solid {colors.line}',
|
||||
padding: '2.5rem 1.5rem',
|
||||
textAlign: 'center',
|
||||
'@media (min-width: 62em)': {
|
||||
width: 'calc((100% - 2 * {spacing.gridGap}) / 3)',
|
||||
},
|
||||
'&[data-featured]': {
|
||||
borderColor: '{colors.accent}',
|
||||
boxShadow: 'inset 0 3px 0 {colors.accent}',
|
||||
},
|
||||
},
|
||||
'.cms-offering h3': {
|
||||
fontFamily: '{fonts.heading}',
|
||||
fontWeight: 'normal',
|
||||
fontSize: '1.5rem',
|
||||
margin: '0 0 0.75rem',
|
||||
},
|
||||
'.cms-price': {
|
||||
fontFamily: '{fonts.heading}',
|
||||
fontSize: '2.25rem',
|
||||
lineHeight: 1,
|
||||
color: '{colors.accent.deep}',
|
||||
margin: '0 0 1.5rem',
|
||||
},
|
||||
'.cms-features': {
|
||||
listStyle: 'none',
|
||||
margin: '0 0 2rem',
|
||||
padding: '1.5rem 0',
|
||||
borderBlock: '1px solid {colors.line}',
|
||||
color: '{colors.ink.soft}',
|
||||
fontSize: '0.875rem',
|
||||
},
|
||||
'.cms-features li + li': { marginTop: '0.75rem' },
|
||||
'.cms-offering a': {
|
||||
color: '{colors.accent.deep}',
|
||||
textDecoration: 'underline',
|
||||
textUnderlineOffset: '3px',
|
||||
},
|
||||
'.cms-banner': {
|
||||
display: 'block',
|
||||
background: 'white',
|
||||
border: '1px solid {colors.line}',
|
||||
borderTop: '3px solid {colors.accent}',
|
||||
padding: '1rem 1.5rem',
|
||||
marginBlock: '{spacing.gridGap}',
|
||||
textAlign: 'center',
|
||||
color: '{colors.ink.soft}',
|
||||
},
|
||||
'.cms-banner strong': {
|
||||
fontFamily: '{fonts.heading}',
|
||||
fontWeight: 'normal',
|
||||
letterSpacing: '0.14em',
|
||||
textTransform: 'uppercase',
|
||||
color: '{colors.ink}',
|
||||
},
|
||||
'.cms-banner a': {
|
||||
color: '{colors.accent.deep}',
|
||||
textDecoration: 'underline',
|
||||
textUnderlineOffset: '3px',
|
||||
},
|
||||
},
|
||||
theme: {
|
||||
// Use default breakpoints from Chakra UI when breakpoints are commented out. Uncomment the breakpoints below for custom breakpoints.
|
||||
|
||||
Reference in New Issue
Block a user