Skip to content

Commit a983e16

Browse files
committed
SWSWEB-37 | test three column and background image wrapper
1 parent 8f6d395 commit a983e16

File tree

5 files changed

+74
-19
lines changed

5 files changed

+74
-19
lines changed

app/globals.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
@utility grid-cols-2-1 {
2323
grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
2424
}
25+
@utility grid-cols-2-3 {
26+
grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
27+
}
2528
@utility grid-cols-3-1 {
2629
grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
2730
}

app/page.tsx

Lines changed: 51 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
import { H1, H2 } from "@components/elements/headers";
2-
import { Text } from "@components/elements/text";
3-
import GlobalPage from "@components/layouts/global-page";
4-
import { BgImageWrapper } from "@components/paragraphs/bg-image-section";
5-
import TwoColumn from "@components/paragraphs/rows/two-column";
6-
import Image from "next/image";
1+
import ActionLink from '@components/elements/action-link';
2+
import { H1, H2 } from '@components/elements/headers';
3+
import { Text } from '@components/elements/text';
4+
import GlobalPage from '@components/layouts/global-page';
5+
import { BgImageWrapper } from '@components/paragraphs/bg-image-section';
6+
import ThreeColumn from '@components/paragraphs/rows/three-column';
7+
import TwoColumn from '@components/paragraphs/rows/two-column';
8+
import Image from 'next/image';
79

810
export default function Home() {
911
return (
@@ -21,7 +23,7 @@ export default function Home() {
2123
bgColor="bg-black"
2224
>
2325
<TwoColumn
24-
column_widths="33-67"
26+
column_widths="40-60"
2527
left={
2628
<div className="text-white">
2729
<Text variant="card" className="rs-mb-8">
@@ -48,6 +50,48 @@ export default function Home() {
4850
</div>
4951
}
5052
/>
53+
<div className="mx-auto w-fit">
54+
<ActionLink
55+
href="/"
56+
className="transition-all ease-in-out duration-500 underline underline-offset-2 decoration-2 text-white decoration-digital-red-light hocus:text-black hocus:bg-white/80 hocus:decoration-black"
57+
>
58+
Learn more about our work
59+
</ActionLink>
60+
</div>
61+
</BgImageWrapper>
62+
<BgImageWrapper bgColor="bg-sandstone-light">
63+
<div className="w-full cc xl:mx-0 xl:p-0 xl:max-w-[1000px]">
64+
<Text size={4} font="serif">
65+
Vestibulum massa nibh, fermentum ut orci iaculis, placerat viverra
66+
augue. In mauris sapien, vulputate non eros ac, malesuada.
67+
</Text>
68+
</div>
69+
<ThreeColumn
70+
left={
71+
<Text>
72+
Mauris vel nunc rutrum, semper neque a, venenatis metus. Nulla
73+
egestas, enim ut blandit pulvinar, lorem tellus pulvinar ex, a
74+
eleifend ante arcu et nulla. Fusce et cursus libero. Nullam vitae
75+
lacus quis augue semper luctus nec non ex. 
76+
</Text>
77+
}
78+
main={
79+
<Text>
80+
Mauris vel nunc rutrum, semper neque a, venenatis metus. Nulla
81+
egestas, enim ut blandit pulvinar, lorem tellus pulvinar ex, a
82+
eleifend ante arcu et nulla. Fusce et cursus libero. Nullam vitae
83+
lacus quis augue semper luctus nec non ex. 
84+
</Text>
85+
}
86+
right={
87+
<Text>
88+
Mauris vel nunc rutrum, semper neque a, venenatis metus. Nulla
89+
egestas, enim ut blandit pulvinar, lorem tellus pulvinar ex, a
90+
eleifend ante arcu et nulla. Fusce et cursus libero. Nullam vitae
91+
lacus quis augue semper luctus nec non ex. 
92+
</Text>
93+
}
94+
/>
5195
</BgImageWrapper>
5296
</GlobalPage>
5397
);

src/components/elements/action-link.tsx

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,28 @@
1-
import {ChevronRightIcon} from "@heroicons/react/20/solid";
2-
import {HtmlHTMLAttributes} from "react";
1+
import { ChevronRightIcon } from "@heroicons/react/20/solid";
2+
import { HtmlHTMLAttributes } from "react";
33
import twMerge from "@lib/utils/twMerge";
44
import Link from "next/link";
5-
import {getLinkHref} from "@components/elements/link";
5+
import { getLinkHref } from "@components/elements/link";
66

77
type Props = HtmlHTMLAttributes<HTMLAnchorElement> & {
88
/**
99
* Link url.
1010
*/
11-
href: string
12-
}
11+
href: string;
12+
};
1313

14-
const ActionLink = ({href, children, ...props}: Props) => {
14+
const ActionLink = ({ href, children, ...props }: Props) => {
1515
return (
16-
<Link {...props} href={getLinkHref(href)} className={twMerge("group relative pr-[25px]", props.className)}>
16+
<Link
17+
{...props}
18+
href={getLinkHref(href)}
19+
className={twMerge("group relative", props.className)}
20+
>
1721
{children}
18-
<ChevronRightIcon height={25} className="ml-2 inline-block transition-all group-hocus-visible:translate-x-1" />
22+
<ChevronRightIcon
23+
height={25}
24+
className="ml-2 inline-block transition-all group-hocus-visible:translate-x-1"
25+
/>
1926
</Link>
2027
);
2128
};

src/components/paragraphs/rows/three-column.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const ThreeColumn = ({
2626
return (
2727
<div
2828
className={twMerge(
29-
clsx("mb-32", {
29+
clsx("mb-32 @container", {
3030
"px-5 pb-20 pt-20": !!bg_color,
3131
"pt-0": top_padding === "none",
3232
"pt-40": top_padding === "more",
@@ -43,7 +43,7 @@ const ThreeColumn = ({
4343
)}
4444
data-columns="3"
4545
>
46-
<div className="centered grid gap-10 @4xl:grid-cols-2 @6xl:gap-20 @9xl:grid-cols-3">
46+
<div className="centered grid gap-10 @4xl:grid-cols-2 @6xl:gap-38 @6xl:grid-cols-3">
4747
<OneColumn
4848
top_padding="none"
4949
bottom_margin="none"

src/components/paragraphs/rows/two-column.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {clsx} from "clsx";
44
import {ReactNode} from "react";
55

66
export interface TwoColumnProps extends LayoutProps {
7-
column_widths?: "33-67" | "67-33"
7+
column_widths?: "33-67" | "67-33" | "40-60"
88
vertical_dividers?: boolean
99
}
1010

@@ -46,9 +46,10 @@ const TwoColumn = ({
4646
>
4747
<div
4848
className={twMerge(
49-
"centered grid gap-10 @6xl:gap-20",
49+
"centered grid gap-10 @6xl:gap-38",
5050
clsx({
5151
"@6xl:grid-cols-2": !column_widths,
52+
"@6xl:grid-cols-2-3": column_widths === "40-60",
5253
"@6xl:grid-cols-1-2": column_widths === "33-67",
5354
"@6xl:grid-cols-2-1": column_widths === "67-33",
5455
}),

0 commit comments

Comments
 (0)