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

feat: add cloud main page #11017

Merged
merged 22 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 6 additions & 0 deletions docs-website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ module.exports = {
label: "Docs",
position: "right",
},
{
to: "/cloud",
activeBasePath: "cloud",
label: "Cloud",
position: "right",
},
{
to: "/learn",
activeBasePath: "learn",
Expand Down
88 changes: 88 additions & 0 deletions docs-website/src/pages/cloud/CompanyLogos/customersData.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
"customers": [
{
"link": {
"href": "https://robinhood.com",
"blank": true
},
"logo": {
"asset": {
"_ref": "/img/logos/scrollingCompanies/acertus.webp"
},
"alt": "Robinhood"
}
},
{
"link": {
"href": "https://www.dpgmediagroup.com/",
"blank": true
},
"logo": {
"asset": {
"_ref": "/img/logos/scrollingCompanies/autoscout24.webp"
},
"alt": "DPG Media"
}
},
{
"link": {
"href": "https://www.twilio.com",
"blank": true
},
"logo": {
"asset": {
"_ref": "/img/logos/scrollingCompanies/betterup.webp"
},
"alt": "Twilio"
}
},
{
"link": {
"href": "https://myob.com",
"blank": true
},
"logo": {
"asset": {
"_ref": "/img/logos/scrollingCompanies/depop.webp"
},
"alt": "Myob"
}
},
{
"link": {
"href": "https://regeneron.com",
"blank": true
},
"logo": {
"asset": {
"_ref": "/img/logos/scrollingCompanies/dpg_media.webp"
},
"alt": "Regeneron"
}
},
{
"link": {
"href": "https://riskified.com",
"blank": true
},
"logo": {
"asset": {
"_ref": "/img/logos/scrollingCompanies/myob.webp"
},
"alt": "Riskified"
}
},
{
"link": {
"href": "https://xero.com",
"blank": true
},
"logo": {
"asset": {
"_ref": "/img/logos/scrollingCompanies/notion.webp"
},
"alt": "Xero"
}
}
]
}
49 changes: 49 additions & 0 deletions docs-website/src/pages/cloud/CompanyLogos/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import React, { useEffect, useRef } from 'react';
import Link from '@docusaurus/Link';
import styles from './logos.module.scss';
import customersData from './customersData.json';
import clsx from 'clsx';

const ScrollingCustomers = ({ noOverlay = true, spacing, ...rest }) => {
const customers = customersData.customers;
const duplicatedLogos = [...customers, ...customers, ...customers];
const scrollingRef = useRef(null);

useEffect(() => {
if (scrollingRef.current) {
scrollingRef.current.style.setProperty('--customers-length', customers.length);
}
}, [customers.length]);

return (
<div
className={clsx(styles.scrollingCustomers, {
[styles.noOverlay]: noOverlay,
})}
{...rest}
>
<div
className={clsx(styles.animateScrollingCustomers, styles.scrollingCustomers__inner)}
ref={scrollingRef}
>
{duplicatedLogos.map((customer, index) => (
<Link
key={`item-${index}`}
to={customer.link.href}
target={customer.link.blank ? '_blank' : '_self'}
rel={customer.link.blank ? 'noopener noreferrer' : ''}
style={{ minWidth: 'max-content', padding: '0 3.25rem' }}
>
<img
src={customer.logo.asset._ref}
alt={customer.logo.alt}
className={styles.logoItem}
/>
</Link>
))}
</div>
</div>
);
};

export default ScrollingCustomers;
56 changes: 56 additions & 0 deletions docs-website/src/pages/cloud/CompanyLogos/logos.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
@keyframes scrollingCustomerAnimate {
0% {
transform: translateX(0);
}
100% {
transform: translateX(calc(var(--customers-length) * -220px));
}
}

@media (max-width: 767px) {
@keyframes scrollingCustomerAnimate {
0% {
transform: translateX(0);
}
100% {
transform: translateX(calc(var(--customers-length) * -166px));
}
}
}

.scrollingCustomers {
position: relative;
overflow: hidden;
}


.scrollingCustomers__inner {
display: flex;
padding: 1.25rem 0;
position: relative;
align-items: center;
animation: scrollingCustomerAnimate 15s linear infinite;
}

.scrollingCustomers__inner img {
max-width: 100px!important;
min-width: unset;
filter: invert(1) brightness(0) contrast(100); // make image black
}

@media (max-width: 767px) {
.scrollingCustomers__inner img {
width: 126px !important;
}
}

.animateScrollingCustomers {
display: flex;
animation: scrollingCustomerAnimate 15s linear infinite;
}

@media (max-width: 767px) {
.animateScrollingCustomers {
width: calc(var(--customers-length) * 126px);
}
}
48 changes: 48 additions & 0 deletions docs-website/src/pages/cloud/Enterprise/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import React from "react";
import clsx from "clsx";
import Link from "@docusaurus/Link";
import styles from "./styles.module.scss";


const featuresContent = [
{
title: "99.5% Uptime SLA",
description: "We’ll focus on keeping DataHub running, so you can focus on the things that really matter."
},
{
title: "In-VPC Ingestion and<br/>Data Quality evaluation",
description: "So your actual data never leaves your network."
},
{
title: "SOC-2 Compliant",
description: "An incredibly high level of security you can trust."
},
];
Comment on lines +7 to +20
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider using CSS for line breaks instead of <br/> tags.

Using CSS for line breaks can improve readability and maintainability.

-    title: "In-VPC Ingestion and<br/>Data Quality evaluation",
+    title: "In-VPC Ingestion and Data Quality evaluation",

Adjust the CSS to handle line breaks.

/* styles.module.scss */
.featureTitle {
  white-space: pre-line;
}

Apply the class to the title element.

-    <h2 dangerouslySetInnerHTML={{ __html: title }}></h2>
+    <h2 className={styles.featureTitle}>{title}</h2>


const Feature = ({ title, description }) => {
return (
<div className={clsx(styles.feature, "col col--4")}>
<h2 dangerouslySetInnerHTML={{ __html: title }}></h2>
<p>{description}</p>
</div>
);
};
Comment on lines +22 to +29
Copy link
Contributor

Choose a reason for hiding this comment

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

Avoid using dangerouslySetInnerHTML.

Using dangerouslySetInnerHTML can expose the application to XSS attacks. Use regular JSX rendering instead.

-    <h2 dangerouslySetInnerHTML={{ __html: title }}></h2>
+    <h2>{title}</h2>
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const Feature = ({ title, description }) => {
return (
<div className={clsx(styles.feature, "col col--4")}>
<h2 dangerouslySetInnerHTML={{ __html: title }}></h2>
<p>{description}</p>
</div>
);
};
const Feature = ({ title, description }) => {
return (
<div className={clsx(styles.feature, "col col--4")}>
<h2>{title}</h2>
<p>{description}</p>
</div>
);
};
Tools
Biome

[error] 25-25: Avoid passing content using the dangerouslySetInnerHTML prop.

Setting content using code can expose users to cross-site scripting (XSS) attacks

(lint/security/noDangerouslySetInnerHtml)


const Features = () =>
featuresContent?.length > 0 ? (
<div className={clsx(styles.container)}>
<div className={clsx(styles.wrapper)}>
<div className={clsx(styles.title)}>Enterprise Ready</div>
<div className="row">
{featuresContent.map((props, idx) => (
<Feature key={idx} {...props} />
))}
</div>
<a href="http://localhost:3000/docs/managed-datahub/managed-datahub-overview#enterprise-grade" target="_blank" className={clsx(styles.moreBenefits)}>
+4 benefits
</a>
</div>
</div>
) : null;
Comment on lines +31 to +46
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider making the URL configurable.

Hardcoding URLs can lead to maintenance issues. Consider using a configuration file or environment variable.

-    <a href="http://localhost:3000/docs/managed-datahub/managed-datahub-overview#enterprise-grade" target="_blank" className={clsx(styles.moreBenefits)}>
+    <a href={process.env.REACT_APP_ENTERPRISE_GRADE_URL} target="_blank" className={clsx(styles.moreBenefits)}>

Ensure the environment variable is set correctly.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const Features = () =>
featuresContent?.length > 0 ? (
<div className={clsx(styles.container)}>
<div className={clsx(styles.wrapper)}>
<div className={clsx(styles.title)}>Enterprise Ready</div>
<div className="row">
{featuresContent.map((props, idx) => (
<Feature key={idx} {...props} />
))}
</div>
<a href="http://localhost:3000/docs/managed-datahub/managed-datahub-overview#enterprise-grade" target="_blank" className={clsx(styles.moreBenefits)}>
+4 benefits
</a>
</div>
</div>
) : null;
const Features = () =>
featuresContent?.length > 0 ? (
<div className={clsx(styles.container)}>
<div className={clsx(styles.wrapper)}>
<div className={clsx(styles.title)}>Enterprise Ready</div>
<div className="row">
{featuresContent.map((props, idx) => (
<Feature key={idx} {...props} />
))}
</div>
<a href={process.env.REACT_APP_ENTERPRISE_GRADE_URL} target="_blank" className={clsx(styles.moreBenefits)}>
+4 benefits
</a>
</div>
</div>
) : null;


export default Features;
40 changes: 40 additions & 0 deletions docs-website/src/pages/cloud/Enterprise/styles.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

.container {
padding: 2vh 6vh;
padding-bottom: 8vh;
display: flex;
justify-content: center;
align-items: center;
}
.wrapper {
display: flex;
justify-content: center;
flex-direction: column;
width: 90%;
max-width: 1200px;

}

.title {
font-size: 2.8rem;
font-weight: 600;
margin-bottom: 2rem;
}

.moreBenefits {
font-weight: 400;
color: var(--ifm-color-primary);

&:hover {
text-decoration: none;
opacity: 0.8;
}

}

@media (max-width: 767px) {

.container {
padding: 0px 36px;
}
}
Loading
Loading