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 customers page #594

Merged
merged 21 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
2 changes: 1 addition & 1 deletion gatsby-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const companyUpdatesPostTemplate = path.resolve(
);
const blogTemplate = path.resolve('./src/templates/blog/index.tsx');

const caseStudyTemplate = path.resolve('./src/layouts/CaseStudy/index.tsx');
const caseStudyTemplate = path.resolve('./src/templates/case-study/index.tsx');

const connectorTemplate = path.resolve('./src/templates/connector/index.tsx');
const connectionTemplate = path.resolve('./src/templates/connection.tsx');
Expand Down
122 changes: 0 additions & 122 deletions src/components/AuthorBlogPostCard/index.tsx

This file was deleted.

12 changes: 5 additions & 7 deletions src/components/BlogPopularArticles/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { graphql, useStaticQuery } from 'gatsby';
import * as React from 'react';
import AuthorBlogPostCard from '../AuthorBlogPostCard';
import { container } from './styles.module.less';
import Card from '../Grid/Card';
import Grid from '../Grid';

export const PopularArticles = () => {
const { popularArticles } = useStaticQuery(graphql`
Expand Down Expand Up @@ -67,12 +67,10 @@ export const PopularArticles = () => {
`);

return (
<ul className={container}>
<Grid>
{popularArticles?.nodes?.map((article: any) => (
<li key={article.id}>
<AuthorBlogPostCard data={article} />
</li>
<Card key={article.id} data={article} footerTag="Article" />
))}
</ul>
</Grid>
);
};
1 change: 1 addition & 0 deletions src/components/BlogPostCard/styles.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
text-align: center;
font-size: 16pt;
font-weight: 600;
margin-bottom: auto;
}

.blogsPostCard {
Expand Down
12 changes: 9 additions & 3 deletions src/components/BlogPostProcessor/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import clsx from 'clsx';
import * as React from 'react';

export const ProcessedPost = ({ body }: { body: string }) => {
// return (JSON.stringify(body,null,4))
export const ProcessedPost = ({
body,
className,
}: {
body: string;
className?: string;
}) => {
return (
<div
className="dynamic-html"
className={clsx('dynamic-html', className)}
dangerouslySetInnerHTML={{ __html: body }}
/>
);
Expand Down
4 changes: 0 additions & 4 deletions src/components/Breadcrumbs/styles.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
padding-top: 40px;
padding-bottom: 40px;

@media (max-width: 809px) {
padding: 40px 0 20px;
}

@media (max-width: 768px) {
display: none;
}
Expand Down
76 changes: 76 additions & 0 deletions src/components/CustomersPage/CaseStudies/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import React, { useState } from 'react';
import { graphql, useStaticQuery } from 'gatsby';
import { defaultWrapperGrey } from '../../../globalStyles/wrappers.module.less';
import Container from '../../Container';
import Grid from '../../Grid';
import Card from '../../Grid/Card';
import ButtonFilled from '../../LinksAndButtons/ButtonFilled';
import { sectionTitle } from '../styles.module.less';

const CaseStudies = () => {
const {
allStrapiCaseStudy: { nodes: caseStudies },
} = useStaticQuery(graphql`
query GetCaseStudies {
allStrapiCaseStudy {
nodes {
title: Title
description: Description
slug: Slug
id
hero: Logo {
alternativeText
localFile {
childImageSharp {
gatsbyImageData(
quality: 100
placeholder: BLURRED
height: 172
layout: FULL_WIDTH
)
}
}
}
}
}
}
`);

const caseStudiesWithPrefixedSlugs = caseStudies.map((post) => ({
...post,
slug: `customers/${post.slug}/`,
}));

const [visiblePosts, setVisiblePosts] = useState(9);

const handleShowMore = () => {
setVisiblePosts((prevVisiblePosts) => prevVisiblePosts + 9);
};

return (
<section className={defaultWrapperGrey}>
<Container isVertical>
<h2 className={sectionTitle}>CASE STUDIES</h2>
<Grid>
{caseStudiesWithPrefixedSlugs
.slice(0, visiblePosts)
.map((caseStudy) => (
<Card
key={caseStudy.id}
data={caseStudy}
footerTag="Case study"
hasImgBackground
/>
))}
</Grid>
{visiblePosts < caseStudiesWithPrefixedSlugs.length ? (
<ButtonFilled onClick={handleShowMore}>
Show more
</ButtonFilled>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m considering using a ‘Show more’ button, similar to what we have on the author page, since there are currently only a few case studies. Implementing pagination with multiple pages at this stage would unnecessarily duplicate content across sections. Once we have a larger number of case studies, I’d consider adding proper pagination with ‘Previous’ and ‘Next’ buttons, like we do on the blog page. If you have any objection to this, please let me know.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree we should not worry about this right now as we don't have too many. We could also just not use pagination and list them all the time like Connectors page does.

) : null}
</Container>
</section>
);
};

export default CaseStudies;
110 changes: 110 additions & 0 deletions src/components/CustomersPage/Hero/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
import React from 'react';
import { StaticImage } from 'gatsby-plugin-image';
import { IStaticImageProps } from 'gatsby-plugin-image/dist/src/components/static-image.server';
import Container from '../../Container';
import HeroSectionDetails from '../../HeroSectionDetails';
import ContactUsCta from '../../HeroSectionActions/ContactUsCta';
import { wrapper } from './styles.module.less';

const commonProps: Partial<IStaticImageProps> = {
placeholder: 'blurred',
loading: 'eager',
};

const Hero = () => (
<section className={wrapper}>
<Container>
<HeroSectionDetails
title={
<>
ESTUARY FLOW <span>POWERS ORGANIZATIONS WORLDWIDE</span>
</>
}
description="See how our customers build with Estuary Flow to solve their challanges."
ctaButtons={<ContactUsCta linkVariant="filled" />}
/>
<StaticImage
src="../../../images/customers-page/hero-image.png"
alt="Estuary - ETL tool"
quality={100}
placeholder="blurred"
loading="eager"
/>
</Container>
<h2>FEATURED CUSTOMERS</h2>
<ul>
<li key="coalesce">
<StaticImage
src="../../../images/customer-logos/coalesce.png"
alt="Coalesce logo"
{...commonProps}
/>
</li>
<li key="flashpack">
<StaticImage
src="../../../images/customer-logos/flashpack.svg"
alt="Flash Pack logo"
{...commonProps}
/>
</li>
<li key="shp">
<StaticImage
src="../../../images/customer-logos/shp.svg"
alt="SHP logo"
{...commonProps}
/>
</li>
<li key="fenestra">
<StaticImage
src="../../../images/customer-logos/fenestra.png"
alt="Fenestra logo"
{...commonProps}
/>
</li>
<li key="deep-sync">
<StaticImage
src="../../../images/customer-logos/deep-sync.png"
alt="Deep Sync logo"
{...commonProps}
/>
</li>
<li key="excess-telecom">
<StaticImage
src="../../../images/customer-logos/excess-telecom.png"
alt="Excess Telecom logo"
{...commonProps}
/>
</li>
<li key="flock-freight">
<StaticImage
src="../../../images/customer-logos/flock-freight.png"
alt="Flock Freight logo"
{...commonProps}
/>
</li>
<li key="launch-metrics">
<StaticImage
src="../../../images/customer-logos/launch-metrics.png"
alt="Launch Metrics logo"
{...commonProps}
/>
</li>
<li key="chili-piper">
<StaticImage
src="../../../images/customer-logos/chili-piper.png"
alt="Chili Piper logo"
{...commonProps}
/>
</li>
<li key="revunit">
<StaticImage
src="../../../images/customer-logos/revunit.png"
alt="Revunit logo"
{...commonProps}
/>
</li>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's repeating because, as we know, the StaticImage does not accept dynamic values. Creating a component would pass the src as prop and it would not work - so just explaining.

</ul>
</section>
);

export default Hero;
Loading
Loading