Skip to content

Commit 2fb796e

Browse files
committed
docs: refresh guides Getting Started cards
1 parent 95f1875 commit 2fb796e

File tree

2 files changed

+116
-21
lines changed

2 files changed

+116
-21
lines changed

src/components/DocsOverview/index.tsx

Lines changed: 75 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ import {
4545
} from "databend-logos";
4646
import Link from "@docusaurus/Link";
4747
import clsx from "clsx";
48+
import { useHistory } from "@docusaurus/router";
4849
const colLayout = { xl: 8, xxl: 8, lg: 8, md: 8, sm: 12, xs: 12 };
4950
const colLayout2 = { xl: 12, xxl: 12, lg: 24, md: 24, sm: 24, xs: 24 };
5051
const colLayout3 = { xl: 8, xxl: 8, lg: 8, md: 8, sm: 12, xs: 24 };
@@ -55,6 +56,7 @@ const DocsOverview: FC = (): ReactElement => {
5556
customFields: { homeLink, isChina },
5657
},
5758
} = useDocusaurusContext();
59+
const history = useHistory();
5860
return (
5961
<div className={styles.outWrap}>
6062

@@ -129,15 +131,26 @@ const DocsOverview: FC = (): ReactElement => {
129131
<ContentCardWrap
130132
className={clsx(styles.commomCard, styles.gettingStart)}
131133
title={$t("Getting Started")}
134+
description={$t(
135+
"Choose Cloud (managed) or Enterprise (self-hosted)."
136+
)}
132137
>
133138
<div style={{ width: "100%" }}>
134139
<Row gutter={[20, 20]}>
135140
<Col {...colLayout2}>
136141
<Card padding={[24, 24]} className={clsx(styles.cardActiveOut, styles.productCard)}>
137-
<Link
138-
title={$t("Databend Cloud")}
139-
to={"/guides/cloud/"}
140-
className={styles.productCardLink}
142+
<div
143+
className={styles.productCardContainer}
144+
role="link"
145+
tabIndex={0}
146+
aria-label={$t("Databend Cloud")}
147+
onClick={() => history.push("/guides/cloud/")}
148+
onKeyDown={(e) => {
149+
if (e.key === "Enter" || e.key === " ") {
150+
e.preventDefault();
151+
history.push("/guides/cloud/");
152+
}
153+
}}
141154
>
142155
<div className={styles.productCardHeader}>
143156
<LightDatabendCloudSingleSvg width={120} />
@@ -155,40 +168,81 @@ const DocsOverview: FC = (): ReactElement => {
155168
<span className={styles.metricLabel}>{$t("Cold Start")}</span>
156169
</div>
157170
<div className={styles.metric}>
158-
<span className={styles.metricValue}>&gt;50%</span>
159-
<span className={styles.metricLabel}>{$t("Cost Savings")}</span>
171+
<span className={styles.metricValue}>$200</span>
172+
<span className={styles.metricLabel}>{$t("Free Credits")}</span>
160173
</div>
161174
<div className={styles.metric}>
162-
<span className={styles.metricValue}>99.95%</span>
163-
<span className={styles.metricLabel}>SLA</span>
175+
<span className={styles.metricValue}>SOC 2</span>
176+
<span className={styles.metricLabel}>{$t("Type II")}</span>
164177
</div>
165178
</div>
166-
</Link>
179+
<div className={styles.productCardCtas}>
180+
<Link
181+
className={styles.productCardCtaPrimary}
182+
to="https://app.databend.com"
183+
target="_blank"
184+
rel="noopener noreferrer"
185+
onClick={(e) => e.stopPropagation()}
186+
onKeyDown={(e) => e.stopPropagation()}
187+
>
188+
{$t("Start Free")}
189+
</Link>
190+
</div>
191+
</div>
167192
</Card>
168193
</Col>
169194
<Col {...colLayout2}>
170195
<Card padding={[24, 24]} className={clsx(styles.cardActiveOut, styles.productCard)}>
171-
<Link
172-
title={$t("Self-Hosted")}
173-
to={"/guides/self-hosted/"}
174-
className={styles.productCardLink}
196+
<div
197+
className={styles.productCardContainer}
198+
role="link"
199+
tabIndex={0}
200+
aria-label={$t("Databend Enterprise")}
201+
onClick={() => history.push("/guides/self-hosted/editions/enterprise/")}
202+
onKeyDown={(e) => {
203+
if (e.key === "Enter" || e.key === " ") {
204+
e.preventDefault();
205+
history.push("/guides/self-hosted/editions/enterprise/");
206+
}
207+
}}
175208
>
176209
<div className={styles.productCardHeader}>
177210
<LightDatabendSingleSvg width={120} />
178211
<div className={styles.productCardTitle}>
179-
<h5>Databend Self-Hosted</h5>
180-
<span className={styles.productCardBadgeAlt}>{$t("Open Source")}</span>
212+
<h5>Databend Enterprise</h5>
213+
<span className={styles.productCardBadgeAlt}>{$t("Enterprise")}</span>
181214
</div>
182215
</div>
183216
<p className={styles.productCardDesc}>
184-
{$t("Deploy on your infrastructure. Full control over data and environment.")}
217+
{$t("Self-hosted on the open-source core, with enterprise support.")}
185218
</p>
186-
<div className={styles.productCardTags}>
187-
<span className={styles.tag}>🦀 Rust</span>
188-
<span className={styles.tag}>Apache 2.0</span>
189-
<span className={styles.tag}>☁️ Cloud-Native</span>
219+
<div className={styles.productCardMetrics}>
220+
<div className={styles.metric}>
221+
<span className={styles.metricValue}>{$t("Deploy")}</span>
222+
<span className={styles.metricLabel}>{$t("Your Infra")}</span>
223+
</div>
224+
<div className={styles.metric}>
225+
<span className={styles.metricValue}>{$t("Control")}</span>
226+
<span className={styles.metricLabel}>{$t("Your Data")}</span>
227+
</div>
228+
<div className={styles.metric}>
229+
<span className={styles.metricValue}>{$t("Support")}</span>
230+
<span className={styles.metricLabel}>{$t("Enterprise")}</span>
231+
</div>
232+
</div>
233+
<div className={styles.productCardCtas}>
234+
<Link
235+
className={styles.productCardCtaSecondary}
236+
to="https://www.databend.com/contact-us/"
237+
target="_blank"
238+
rel="noopener noreferrer"
239+
onClick={(e) => e.stopPropagation()}
240+
onKeyDown={(e) => e.stopPropagation()}
241+
>
242+
{$t("Contact Sales")}
243+
</Link>
190244
</div>
191-
</Link>
245+
</div>
192246
</Card>
193247
</Col>
194248
</Row>

src/components/DocsOverview/styles.module.scss

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,18 @@
127127
color: inherit !important;
128128
}
129129

130+
.productCardContainer {
131+
display: block;
132+
height: 100%;
133+
cursor: pointer;
134+
}
135+
136+
.productCardContainer:focus-visible {
137+
outline: 2px solid #0070f3;
138+
outline-offset: 4px;
139+
border-radius: 8px;
140+
}
141+
130142
.productCardHeader {
131143
display: flex;
132144
align-items: center;
@@ -182,6 +194,35 @@
182194
border-top: 1px solid var(--color-border);
183195
}
184196

197+
.productCardCtas {
198+
margin-top: 16px;
199+
display: flex;
200+
justify-content: center;
201+
}
202+
203+
.productCardCtaPrimary {
204+
display: inline-block;
205+
padding: 10px 16px;
206+
border-radius: 8px;
207+
font-size: 14px;
208+
font-weight: 600;
209+
color: #fff !important;
210+
background: linear-gradient(135deg, #0070f3, #00a8ff);
211+
text-decoration: none !important;
212+
}
213+
214+
.productCardCtaSecondary {
215+
display: inline-block;
216+
padding: 10px 16px;
217+
border-radius: 8px;
218+
font-size: 14px;
219+
font-weight: 600;
220+
color: hsl(var(--foreground)) !important;
221+
background: var(--color-fill-0);
222+
border: 1px solid var(--color-border);
223+
text-decoration: none !important;
224+
}
225+
185226
.metric {
186227
display: flex;
187228
flex-direction: column;

0 commit comments

Comments
 (0)