Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create components for the page sections #549

Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
e0240d3
Add container component to the homepage
Oct 28, 2024
9277b95
Add container component to the pricing page sections
Oct 28, 2024
b2125c6
Add container component to the product page sections
Oct 28, 2024
133f9ea
Add container component to the comparison template page sections and …
Oct 28, 2024
9132fda
Rename the section components of the etl-tools page
Oct 28, 2024
637e44d
Add container component to the etl-tools page sections
Oct 28, 2024
d3c003e
Add some tweaks to the deployment options page
Oct 28, 2024
00a9c2f
Add container component to the sections of the connector template page
Oct 28, 2024
a08dcc1
Add container component to the sections of the blog post template page
Oct 28, 2024
299c6f2
Create HeroSectionDetails component and use it on the homepage hero s…
Oct 29, 2024
f1a3942
Use the HeroSectionDetails component on the hero section of the prici…
Oct 29, 2024
4a3beac
Use the HeroSectionDetails component on the hero section of the produ…
Oct 29, 2024
900f495
Use the HeroSectionDetails component on the hero section of the deplo…
Oct 29, 2024
9ce7de4
Use the HeroSectionDetails component on the hero section of the compa…
Oct 29, 2024
c654407
Use the HeroSectionDetails component on the hero section of the etl-t…
Oct 29, 2024
92ad6e8
Use the HeroSectionDetails component on the hero section of the conne…
Oct 29, 2024
20a3e84
Use the HeroSectionDetails component on the hero section of the blog …
Oct 29, 2024
4ac6825
Fix backgroundColor prop not being recognized
Oct 29, 2024
e316461
Consider SVG format for the customer logos in the homepage marquee
Oct 29, 2024
d1e057e
Remove unused width from query of the tutorial page /why
Oct 29, 2024
5aa1f70
Apply review changes
Oct 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/components/Advantages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Advantage from './Advantage';
import {
AdvantagesList,
ButtonWrapper,
Container,
Wrapper,
IconWrapper,
LeftColumn,
RightColumn,
Expand Down Expand Up @@ -40,7 +40,7 @@ const Advantages = ({
isImageOnTheLeft = false,
}: AdvantagesProps) => {
return (
<Container $isImageOnTheLeft={isImageOnTheLeft}>
<Wrapper $isImageOnTheLeft={isImageOnTheLeft}>
<LeftColumn>
<IconWrapper $isDarkTheme={isDarkTheme}>{icon}</IconWrapper>
<Title $isDarkTheme={isDarkTheme}>{title}</Title>
Expand All @@ -67,7 +67,7 @@ const Advantages = ({
) : null}
</LeftColumn>
{image ? <RightColumn>{image}</RightColumn> : null}
</Container>
</Wrapper>
);
};

Expand Down
10 changes: 2 additions & 8 deletions src/components/Advantages/styles.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
import styled from 'styled-components';
import { globalMaxWidth } from '../../globalStyles';
import Container from '../Container';

type Theme = {
$isDarkTheme: boolean;
};

export const Container = styled.section<{ $isImageOnTheLeft: boolean }>`
${globalMaxWidth}

display: flex;
align-items: center;
justify-content: space-between;
gap: 60px;
export const Wrapper = styled(Container)<{ $isImageOnTheLeft: boolean }>`
flex-direction: ${(props) =>
props.$isImageOnTheLeft ? 'row-reverse' : 'row'};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';
import clsx from 'clsx';
import { StaticImage } from 'gatsby-plugin-image';
import { backgroundImage, fullHeight } from './styles.module.less';
import { backgroundColors } from './shared';
import { darkImgStyle } from './shared';
import BackgroundWrapper from './BackgroundWrapper';

const DarkSwoopingLinesLeftDirectionBackground = ({
Expand All @@ -18,7 +18,7 @@ const DarkSwoopingLinesLeftDirectionBackground = ({
className={clsx(backgroundImage, fullHeight)}
placeholder="blurred"
quality={100}
backgroundColor={backgroundColors.dark}
imgStyle={darkImgStyle}
/>
<div className={className}>{children}</div>
</BackgroundWrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { StaticImage } from 'gatsby-plugin-image';
import clsx from 'clsx';
import { backgroundImage, fullHeight } from './styles.module.less';
import { backgroundColors } from './shared';
import { lightImgStyle } from './shared';
import BackgroundWrapper from './BackgroundWrapper';

const LightSwoopingLinesRightDirectionBackground = ({
Expand All @@ -17,7 +17,7 @@ const LightSwoopingLinesRightDirectionBackground = ({
className={clsx(backgroundImage, fullHeight)}
placeholder="blurred"
quality={100}
backgroundColor={backgroundColors.light}
imgStyle={lightImgStyle}
/>
<div className={className}>{children}</div>
</BackgroundWrapper>
Expand Down
4 changes: 2 additions & 2 deletions src/components/BackgroundImages/StraightLinesBackground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import clsx from 'clsx';
import { StaticImage } from 'gatsby-plugin-image';
import { backgroundImage, fullHeight } from './styles.module.less';
import { backgroundColors } from './shared';
import { darkImgStyle } from './shared';
import BackgroundWrapper from './BackgroundWrapper';

const StraightLinesBackground = ({
Expand All @@ -17,7 +17,7 @@ const StraightLinesBackground = ({
className={clsx(backgroundImage, fullHeight)}
placeholder="blurred"
quality={100}
backgroundColor={backgroundColors.dark}
imgStyle={darkImgStyle}
/>
<div className={className}>{children}</div>
</BackgroundWrapper>
Expand Down
4 changes: 0 additions & 4 deletions src/components/BackgroundImages/WhyPageStepsBackground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const WhyPageStepsBackground = ({
placeholder: BLURRED
formats: [AUTO, WEBP, AVIF]
layout: FULL_WIDTH
width: 1180
)
}
}
Expand All @@ -34,7 +33,6 @@ const WhyPageStepsBackground = ({
placeholder: BLURRED
formats: [AUTO, WEBP, AVIF]
layout: FULL_WIDTH
width: 1180
)
}
}
Expand All @@ -45,7 +43,6 @@ const WhyPageStepsBackground = ({
placeholder: BLURRED
formats: [AUTO, WEBP, AVIF]
layout: FULL_WIDTH
width: 1180
)
}
}
Expand All @@ -56,7 +53,6 @@ const WhyPageStepsBackground = ({
placeholder: BLURRED
formats: [AUTO, WEBP, AVIF]
layout: FULL_WIDTH
width: 1180
)
}
}
Expand Down
6 changes: 2 additions & 4 deletions src/components/BackgroundImages/shared.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
export const backgroundColors = {
dark: '#04192b',
light: '#f9fafc',
};
export const darkImgStyle = { backgroundColor: '#04192b' };
export const lightImgStyle = { backgroundColor: '#f9fafc' };
2 changes: 1 addition & 1 deletion src/components/Connectors/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ export const Connectors = ({
>
<FlowLogo className={connectorBottomFlow} />
<StaticImage
src="../images/connectors-bottom.png"
src="../../images/connectors-bottom.png"
alt={
bottomTitle ??
'Connectors logos background image'
Expand Down
78 changes: 44 additions & 34 deletions src/components/Connectors/styles.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -80,37 +80,37 @@
display: flex;

@media (max-width: 810px) {
background-size: 60%;
background-size: 60%;

& h2 {
font-size: 1.5rem;
font-weight: 500;
}
& h2 {
font-size: 1.5rem;
font-weight: 500;
}

& p {
font-size: var(--fontSize-0);
margin: 12px 40px;
}
& p {
font-size: var(--fontSize-0);
margin: 12px 40px;
}
}
}

.connectorCards {
display: grid;

@media (min-width: 1px) {
grid-template-columns: repeat(1, minmax(0, 1fr));
grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 810px) {
grid-template-columns: repeat(2, minmax(0, 1fr));
grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 1180px) {
grid-template-columns: repeat(3, minmax(0, 1fr));
grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (min-width: 1600px) {
grid-template-columns: repeat(4, minmax(0, 1fr));
grid-template-columns: repeat(4, minmax(0, 1fr));
}

grid-column-gap: 24px;
Expand All @@ -126,10 +126,20 @@
border-radius: 4px;
padding: 1rem;
display: flex;
flex-direction: row;
flex-wrap: wrap;
gap: 1rem;
justify-content: space-between;

div:last-of-type {
max-width: 500px;
}

@media (max-width: 960px) {
flex-direction: column;

div:last-of-type {
max-width: 100%;
}
}
}

.connectorCardTop {
Expand Down Expand Up @@ -170,30 +180,30 @@
transition: var(--default-transition);

&:hover {
border: 1px solid #5072eb;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
border: 1px solid #5072eb;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
}

&>p {
font-weight: 400;
font-size: 17px;
line-height: 30px;
align-items: center;
color: #47506d;
margin-top: 0;
font-weight: 400;
font-size: 17px;
line-height: 30px;
align-items: center;
color: #47506d;
margin-top: 0;
}

&>p {
font-weight: 400;
font-size: 17px;
line-height: 30px;
align-items: center;
color: #47506d;
margin-top: 0;
font-weight: 400;
font-size: 17px;
line-height: 30px;
align-items: center;
color: #47506d;
margin-top: 0;
}

& img {
padding: 5px;
padding: 5px;
}
}

Expand All @@ -214,8 +224,8 @@
margin-top: 40px;

@media (max-width: 810px) {
width: 167px;
height: 44px;
font-size: var(--fontSize-0);
width: 167px;
height: 44px;
font-size: var(--fontSize-0);
}
}
}
17 changes: 14 additions & 3 deletions src/components/Container/index.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
import React, { ReactNode } from 'react';
import clsx from 'clsx';
import { container, vertical } from './styles.module.less';
import { container, vertical, reverse } from './styles.module.less';

interface ContainerProps {
children: ReactNode;
className?: string;
isVertical?: boolean;
isReverseColumnOnMobile?: boolean;
}

const Container = ({ children, className, isVertical }: ContainerProps) => {
const Container = ({
children,
className,
isVertical,
isReverseColumnOnMobile,
}: ContainerProps) => {
return (
<div
className={clsx(container, className, isVertical ? vertical : null)}
className={clsx(
container,
className,
isVertical ? vertical : null,
isReverseColumnOnMobile ? reverse : null
)}
>
{children}
</div>
Expand Down
6 changes: 6 additions & 0 deletions src/components/Container/styles.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,9 @@
max-width: 100%;
}
}

.reverse {
@media (max-width: 1024px) {
flex-direction: column;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
}

@media(max-width: 768px) {
gap: 40px;

h2 {
font-size: 2rem;
}
Expand Down
33 changes: 7 additions & 26 deletions src/components/DeploymentOptionsPage/Hero/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@ import React from 'react';
import { StaticImage } from 'gatsby-plugin-image';
import clsx from 'clsx';
import { defaultWrapperDarkBlue } from '../../../globalStyles/wrappers.module.less';
import { OutboundLinkFilled } from '../../OutboundLink';
import { LinkOutlined } from '../../../globalStyles';
import { dashboardRegisterUrl } from '../../../../shared';
import CustomerCloudIcon from '../../../svgs/customer-cloud-icon.svg';
import PublicDeploymentsIcon from '../../../svgs/public-deployments-icon.svg';
import PrivateDeploymentsIcon from '../../../svgs/private-deployments-icon.svg';
import Container from '../../Container';
import HeroSectionDetails from '../../HeroSectionDetails';
import {
container,
leftColumn,
rightColumn,
solidBorderBox,
dashedBorderBox,
Expand All @@ -22,31 +19,15 @@ const Hero = () => {
return (
<section className={defaultWrapperDarkBlue}>
<Container className={container}>
<div className={leftColumn}>
<h1>ESTUARY FLOW DEPLOYMENT OPTIONS</h1>
<p>
Estuary Flow offers three main deployment options to
<HeroSectionDetails
title="ESTUARY FLOW DEPLOYMENT OPTIONS"
description="Estuary Flow offers three main deployment options to
cater to various organizational needs and security
requirements. This section provides a high-level
overview and comparison of Public Deployment, Private
Deployment, and BYOC options.
</p>
<div>
<OutboundLinkFilled
target="_blank"
href={dashboardRegisterUrl}
>
Build a pipeline
</OutboundLinkFilled>
<LinkOutlined
href="/contact-us"
target="_blank"
theme="dark"
>
Contact Us
</LinkOutlined>
</div>
</div>
Deployment, and BYOC options."
hasCtaButtons
/>
<div className={rightColumn}>
<StaticImage
src="../../../images/deployment-options-page/deployment-options-page-hero-background-image.png"
Expand Down
Loading
Loading