Skip to content

Commit

Permalink
Add solution pages specific components
Browse files Browse the repository at this point in the history
  • Loading branch information
gg-1414 committed Nov 13, 2024
1 parent 2b65a5a commit 60d867a
Show file tree
Hide file tree
Showing 59 changed files with 7,843 additions and 0 deletions.
37 changes: 37 additions & 0 deletions src/components/solutions/BasicCallout.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import classNames from "classnames";
import { Trans } from "next-i18next";

import { AnimatedText } from "@/components/shared/Text";

import styles from "./BasicCallout.module.scss";

const BasicCallout = ({ titleContent, subtitleKey, className, id }) => {
return (
<div
className={classNames(styles.BasicCallout, "page-width", className)}
id={id}
>
<div className={classNames(styles.Container)}>
<div className={styles.ContentWrapper}>
{titleContent && (
<AnimatedText element="h2" as="heading" className={styles.Title}>
{titleContent}
</AnimatedText>
)}

{subtitleKey && (
<AnimatedText
element="p"
as="paragraph"
className={styles.Subtitle}
>
<Trans i18nKey={subtitleKey} />
</AnimatedText>
)}
</div>
</div>
</div>
);
};

export default BasicCallout;
94 changes: 94 additions & 0 deletions src/components/solutions/BasicCallout.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
@import "../../scss/solutions/variables";

.BasicCallout {
padding: 64px 24px;

* {
margin: 0;
padding: 0;
}
}

.MediaBlock {
position: relative;
aspect-ratio: 7 / 9;
margin-top: 40px;

img {
object-fit: contain;
}
}

.Title {
font-size: 40px;
font-weight: 700;
line-height: 1.04;
letter-spacing: -0.01em;
text-align: center;
color: var(--white);
}

.Subtitle {
font-size: 20px;
font-weight: 700;
line-height: 1.12;
letter-spacing: -0.02em;
text-align: center;
color: var(--grey-250);
margin: 24px auto 0;
}

@include breakpoint(md) {
.Title {
font-size: 56px;
}

.WithImage {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 40px;
align-items: center;

h2,
p {
text-align: left;
}
}

.MediaBlock {
margin-top: 0;
}
}

@include breakpoint(lg) {
.BasicCallout {
padding: 128px;
}

.Title {
font-size: 72px;
line-height: 1.08;
letter-spacing: -0.03em;
margin-bottom: 24px;
}

.Subtitle {
font-size: 24px;
font-weight: 500;
line-height: 1.25;
text-align: center;
max-width: 800px;
}

.ButtonWrapper {
margin-top: 40px;
}

.WithImage {
p {
font-size: 32px;
line-height: 1.15;
letter-spacing: -0.64px;
}
}
}
98 changes: 98 additions & 0 deletions src/components/solutions/Button.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
@import "../../scss/solutions/_variables.scss";

.Button {
padding: 12px 24px;
border-radius: 8px;
color: var(--white);
text-align: center;
font-size: 18px;
font-weight: 700;
line-height: 1.32;
position: relative;
cursor: pointer;
display: flex;
justify-content: center;
transition:
transform 0.3s $easeInOutQuart,
box-shadow 0.5s ease-out;
overflow: hidden;
box-shadow: 0 0 0 rgba(#80ecff, 0);

span {
position: relative;
z-index: 2;
transition: color 0.15s ease-in-out;
}

/* These are the two backgrounds (before/after hover tied to before/after pseudo elements) */
&.primary,
&.secondary {
&:before,
&:after {
content: "";
display: block;
position: absolute;
left: 0;
top: 0;
bottom: 0;
right: 0;
z-index: 1;
border-radius: 8px;
}
}

// Primary & secondary buttons start with different background colors
&.primary {
&:before {
background: var(--purple);
}
}

&.secondary {
&:before {
background: var(--grey-450);
}
}

// Default hide :after and show on hover
&:after {
opacity: 0;
background: var(--purple);
background: var(--gradient-3);

// animation styling
transition:
opacity 0.3s ease-in-out,
transform 0.2s $easeInOutQuart,
filter 0.35s $easeDefault;
transform: translate(0, 60%) scale(1.2, 1);
filter: blur(15px);
}

/* On hover, fade in the :after to show the new background. */
&:hover {
transform: translate(0, -2px);
box-shadow: 0px 2px 12px rgba(#80ecff, 0.5);
&:after {
opacity: 1;
transform: translate(0, 0) scale(1.2, 1);
filter: blur(0);
border-radius: 8px;
}

span {
color: var(--black);
}
}

&:active {
transition: transform 0.2s $easeInOutQuart;
transform: translate(0, 0);
box-shadow: 0 1px 6px rgba(#80ecff, 0.35);

&:after {
transition: opacity 0.15s;
opacity: 0.5;
}
}
}
31 changes: 31 additions & 0 deletions src/components/solutions/Button.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { AnchorHTMLAttributes } from "react";
import Link from "next/link";
import classNames from "classnames";
import styles from "./Button.module.scss";

export interface ButtonProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
text: string;
url?: string;
theme?: "primary" | "secondary";
classes?: string;
}

const Button = ({
text,
url,
theme = "primary",
classes,
...props
}: ButtonProps) => {
return (
<Link
href={url}
className={classNames(styles.Button, styles[theme], classes)}
{...props}
>
<span>{text}</span>
</Link>
);
};

export default Button;
108 changes: 108 additions & 0 deletions src/components/solutions/DetailsSection.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
@import "../../scss/solutions/_variables.scss";

.Content {
* {
padding: 0;
margin: 0;
}
}

.DetailsSection {
display: grid;
grid-template-columns: 1fr;
grid-gap: 40px;
padding: 0 24px 64px;

a {
svg {
transition: transform 0.25s $easeInOutQuart;
}

&:hover svg {
transform: translate(4px, 0);
}
}
}

.Detail {
text-align: center;

h3,
p {
font-size: 18px;
font-weight: 700;
line-height: 1.16;
color: var(--white);
margin-top: 0;
margin-bottom: 0;
}

h3 {
display: flex;
justify-content: center;
align-items: center;
gap: 4px;

svg {
box-sizing: content-box;
width: 22px;
}
}

p {
color: var(--grey-300);

a {
color: var(--grey-300);
text-decoration: underline;
}
}
}

@include breakpoint(md) {
.DetailsSection {
grid-template-columns: 1fr 1fr;
grid-row-gap: 40px;
grid-column-gap: 112px;
padding: 64px 40px;
}

.Detail {
text-align: left;

h3,
p {
font-size: 20px;
margin-left: 0;
max-width: 100%;
}

h3 {
justify-content: flex-start;

svg {
width: 24px;
}
}
}
}

@include breakpoint(xl) {
.Content {
padding: 0 0 128px;
}

.DetailsSection {
grid-row-gap: 80px;
grid-column-gap: 224px;
}

.Detail {
h3,
p {
font-size: 20px;
line-height: 1.12;
letter-spacing: -0.02em;
}
}
}
Loading

0 comments on commit 60d867a

Please sign in to comment.