| 1 |
import { PageCanvas } from '@auto-launch/templates/PageCanvas'; |
| 2 |
|
| 3 |
// The heading centers itself for the stacked layout, so a column undoes it. |
| 4 |
const LEFT_ALIGN = '[&_h2]:lg:text-left [&_p]:lg:text-left'; |
| 5 |
|
| 6 |
// Direction is lg-only: below it the columns stack whatever the token says. |
| 7 |
const COLUMNS = [ |
| 8 |
'm-auto flex w-full max-w-5xl flex-col items-center', |
| 9 |
'lg:[flex-direction:var(--ext-tpl-split-direction,row)]', |
| 10 |
'[gap:var(--ext-tpl-split-gap,48px)]', |
| 11 |
].join(' '); |
| 12 |
|
| 13 |
// align-self, so moving the text does not move the form with it. |
| 14 |
const TEXT_COLUMN = [ |
| 15 |
'flex flex-col items-center gap-ui lg:items-start', |
| 16 |
'lg:[flex:0_1_var(--ext-tpl-split-text-width,420px)]', |
| 17 |
'lg:[align-self:var(--ext-tpl-split-text-align,flex-start)]', |
| 18 |
LEFT_ALIGN, |
| 19 |
].join(' '); |
| 20 |
|
| 21 |
export const Page = ({ parts, has }) => ( |
| 22 |
<PageCanvas> |
| 23 |
<div className={COLUMNS}> |
| 24 |
<div className={TEXT_COLUMN}> |
| 25 |
{parts.logo} |
| 26 |
{has.heading && parts.heading} |
| 27 |
</div> |
| 28 |
<div className="relative z-10 w-full lg:flex-1">{parts.content}</div> |
| 29 |
</div> |
| 30 |
{has.footer && <div className="w-full pt-8 shrink-0">{parts.footer}</div>} |
| 31 |
</PageCanvas> |
| 32 |
); |
| 33 |
|