Skip to content

Commit e856a58

Browse files
authored
feat: adjust a link title and contact infos (#2719)
1 parent 816798f commit e856a58

File tree

8 files changed

+149
-70
lines changed

8 files changed

+149
-70
lines changed

src/components/BaseComponents/Card/index.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ interface IProps extends ICommonProps {
1010
isDownload?: boolean;
1111
padding?: number[];
1212
onClick?: () => void;
13+
title?: string;
1314
}
1415
const Card: FC<IProps> = ({
1516
children,
@@ -19,6 +20,7 @@ const Card: FC<IProps> = ({
1920
isDownload = false,
2021
style,
2122
onClick,
23+
title,
2224
}): ReactElement => {
2325
const p = padding || [28, 24];
2426
const props = {
@@ -28,7 +30,13 @@ const Card: FC<IProps> = ({
2830
return (
2931
<>
3032
{href ? (
31-
<Link onClick={onClick} download={isDownload} to={href} {...props}>
33+
<Link
34+
title={title}
35+
onClick={onClick}
36+
download={isDownload}
37+
to={href}
38+
{...props}
39+
>
3240
{children}
3341
</Link>
3442
) : (

src/components/DocsOverview/index.tsx

Lines changed: 46 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,11 @@ const DocsOverview: FC = (): ReactElement => {
6767
<div style={{ height: "100%", width: "100%" }}>
6868
<Row gutter={[12, 12]} className={styles.topCard}>
6969
<Col {...colLayout3}>
70-
<Card href="/guides/products/dc/" padding={[16, 16]}>
70+
<Card
71+
title={$t("Databend Cloud")}
72+
href="/guides/products/dc/"
73+
padding={[16, 16]}
74+
>
7175
<h3>
7276
<span>{$t("Databend Cloud")}</span>
7377
</h3>
@@ -77,17 +81,25 @@ const DocsOverview: FC = (): ReactElement => {
7781
</Card>
7882
</Col>
7983
<Col {...colLayout3}>
80-
<Card href="/guides/products/dee/" padding={[16, 16]}>
84+
<Card
85+
title={$t("Databend Enterprise")}
86+
href="/guides/products/dee/"
87+
padding={[16, 16]}
88+
>
8189
<h3>
82-
<span> {$t("Databend Enterprise")}</span>
90+
<span>{$t("Databend Enterprise")}</span>
8391
</h3>
8492
<div>
8593
{$t("Self-hosted with enterprise features and support.")}
8694
</div>
8795
</Card>
8896
</Col>
8997
<Col {...colLayout3}>
90-
<Card href="/guides/products/dce/" padding={[16, 16]}>
98+
<Card
99+
title={$t("Databend Community")}
100+
href="/guides/products/dce/"
101+
padding={[16, 16]}
102+
>
91103
<h3>
92104
<span>{$t("Databend Community")}</span>
93105
</h3>
@@ -189,6 +201,7 @@ const DocsOverview: FC = (): ReactElement => {
189201
<Col {...colLayout2}>
190202
<Card padding={[20, 0]} className={styles.cardActiveOut}>
191203
<Link
204+
title={$t("Start with Databend Cloud")}
192205
to={"/guides/cloud/new-account/"}
193206
className={"global-overview-card"}
194207
>
@@ -206,17 +219,26 @@ const DocsOverview: FC = (): ReactElement => {
206219
<div>{$t("What you need to know:")}</div>
207220
<ul>
208221
<li>
209-
<Link to={"/guides/products/dc/editions/"}>
222+
<Link
223+
title={$t("Choose Your Edition")}
224+
to={"/guides/products/dc/editions/"}
225+
>
210226
{$t("Choose Your Edition")}
211227
</Link>
212228
</li>
213229
<li>
214-
<Link to={"/guides/products/dc/pricing/"}>
230+
<Link
231+
title={$t("Pricing & Plans")}
232+
to={"/guides/products/dc/pricing/"}
233+
>
215234
{$t("Pricing & Plans")}
216235
</Link>
217236
</li>
218237
<li>
219-
<Link to={"/guides/cloud/using-databend-cloud/"}>
238+
<Link
239+
title={$t("Using Databend Cloud")}
240+
to={"/guides/cloud/using-databend-cloud/"}
241+
>
220242
{$t("Using Databend Cloud")}
221243
</Link>
222244
</li>
@@ -226,7 +248,11 @@ const DocsOverview: FC = (): ReactElement => {
226248
</Col>
227249
<Col {...colLayout2}>
228250
<Card padding={[20, 0]} className={styles.cardActiveOut}>
229-
<Link to={"/guides/deploy/"} className={"global-overview-card"}>
251+
<Link
252+
title={$t("Deploy Your Own Instance")}
253+
to={"/guides/deploy/"}
254+
className={"global-overview-card"}
255+
>
230256
<LightDatabendSingleSvg width={150} />
231257
<div>
232258
<h5>{$t("Deploy Your Own Instance")}</h5>
@@ -241,17 +267,26 @@ const DocsOverview: FC = (): ReactElement => {
241267
<div>{$t("What you need to know:")}</div>
242268
<ul>
243269
<li>
244-
<Link to={"/guides/deploy/QuickStart/"}>
270+
<Link
271+
title={$t("5-Minute Quick Start")}
272+
to={"/guides/deploy/QuickStart/"}
273+
>
245274
{$t("5-Minute Quick Start")}
246275
</Link>
247276
</li>
248277
<li>
249-
<Link to={"/guides/deploy/deploy/download/"}>
278+
<Link
279+
title={$t("Download & Install")}
280+
to={"/guides/deploy/deploy/download/"}
281+
>
250282
{$t("Download & Install")}
251283
</Link>
252284
</li>
253285
<li>
254-
<Link to={"/guides/products/dee/license/"}>
286+
<Link
287+
title={$t("Enterprise Features & Licensing")}
288+
to={"/guides/products/dee/license/"}
289+
>
255290
{$t("Enterprise Features & Licensing")}
256291
</Link>
257292
</li>

src/components/DocsOverview/small-card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ interface IProps {
1212
const SmallCard: FC<IProps> = ({ icon, text, to }): ReactElement => {
1313
return (
1414
<div>
15-
<Link to={to} className={styles.smallCard}>
15+
<Link title={text} to={to} className={styles.smallCard}>
1616
<ButtonWithIcon>{icon}</ButtonWithIcon>
1717
<span>{text}</span>
1818
</Link>

src/components/DocsOverview/title.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ const Title: FC<IProps> = ({
3939

4040
{link?.text && (
4141
<Link
42+
title={link?.text}
4243
style={{ marginTop: "12px", display: "inline-block" }}
4344
to={link?.to}
4445
>

src/components/JoinCommunity/index.tsx

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import Bili from "@site/static/icons/bili.svg";
1616
import GongzhonghaoImg from "@site/static/img/databend-gongzhonghao.jpeg";
1717
import SalesImg from "@site/static/img/sales.jpeg";
1818
import { Tooltip } from "antd";
19+
import Contact from "@site/static/icons/contact.svg";
1920
interface TProps {
2021
titleAlign?:
2122
| "start"
@@ -118,7 +119,7 @@ const JoinCommunity: FC<TProps> = ({
118119
>
119120
{community.map((item, index) => {
120121
return (
121-
<Link to={item.link} key={index}>
122+
<Link title={item.title} to={item.link} key={index}>
122123
<div className={clsx("community-item", styles.communityItem)}>
123124
<div className={clsx("icon", styles.Icon)}>{item.icon}</div>
124125
<h6>{item.title}</h6>
@@ -133,7 +134,7 @@ const JoinCommunity: FC<TProps> = ({
133134
</Link>
134135
);
135136
})}
136-
{isChina && (
137+
{isChina ? (
137138
<div>
138139
<h6 style={{ marginBottom: "8px", textAlign: titleAlign }}>微信</h6>
139140
<div className={clsx("community-group", styles.CommunityGroup)}>
@@ -167,6 +168,36 @@ const JoinCommunity: FC<TProps> = ({
167168
185 1688 8139
168169
</div>
169170
</div>
171+
) : (
172+
<div>
173+
<h6 style={{ textAlign: titleAlign, marginBottom: "24px" }}>
174+
Or simply contact us directly
175+
</h6>
176+
<div className={clsx("community-group", styles.CommunityGroup)}>
177+
<Link
178+
title="Contact Us"
179+
to="https://www.databend.com/contact-us/"
180+
target="_blank"
181+
>
182+
<div className={clsx("community-item", styles.communityItem)}>
183+
<div className={clsx("icon", styles.Icon)}>
184+
<Contact></Contact>
185+
</div>
186+
<h6>Contact Us</h6>
187+
</div>
188+
</Link>
189+
<Link
190+
title="Explore Databend Cloud"
191+
to="https://www.databend.com/apply/"
192+
target="_blank"
193+
>
194+
<div className={clsx("community-item", styles.communityItem)}>
195+
<div className={clsx("icon", styles.Icon)}>🚀</div>
196+
<h6>Explore Databend Cloud</h6>
197+
</div>
198+
</Link>
199+
</div>
200+
</div>
170201
)}
171202
</div>
172203
</div>
Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,57 @@
1-
.Community{
1+
.Community {
22
display: flex;
33
gap: 24px;
44
flex-direction: column;
55
padding-top: 32px;
6-
h6{
6+
h6 {
77
text-align: center;
88
margin: 0;
99
font-weight: 400;
1010
color: var(--color-text-1);
1111
}
12-
.CommunityGroup{
13-
display: flex;
14-
gap: 24px;
15-
flex-direction: row;
16-
flex-wrap: wrap;
17-
.communityItem{
18-
padding: 12px;
12+
.CommunityGroup {
1913
display: flex;
20-
gap: 8px;
21-
align-items: center;
22-
background-color: var(--color-fill-0);
23-
border-radius: 6px;
24-
border: 1px solid var(--color-border);
25-
min-width: 340px;
26-
width: 100%;
27-
h6{
28-
margin: 0;
29-
color:var(--color-text-0);
30-
font-weight: 700;
31-
}
32-
.Icon{
33-
padding: 6px;
14+
gap: 24px;
15+
flex-direction: row;
16+
flex-wrap: wrap;
17+
.communityItem {
18+
padding: 12px;
3419
display: flex;
35-
color:var(--color-text-0)
36-
}
37-
&:hover{
38-
background-color: var(--color-primary-light-default);
39-
border-color: var(--color-primary);
40-
.Icon{
41-
color: var(--color-primary)!important;
20+
gap: 8px;
21+
align-items: center;
22+
background-color: var(--color-fill-0);
23+
border-radius: 6px;
24+
border: 1px solid var(--color-border);
25+
min-width: 340px;
26+
width: 100%;
27+
h6 {
28+
margin: 0;
29+
color: var(--color-text-0);
30+
font-weight: 700;
4231
}
43-
h6{
44-
text-decoration: none!important;
45-
color: var(--color-primary);
32+
.Icon {
33+
padding: 6px;
34+
display: flex;
35+
color: var(--color-text-0);
36+
}
37+
&:hover {
38+
background-color: var(--color-primary-light-default);
39+
border-color: var(--color-primary);
40+
.Icon {
41+
color: var(--color-primary) !important;
42+
}
43+
h6 {
44+
text-decoration: none !important;
45+
color: var(--color-primary);
46+
}
47+
}
48+
.tag {
49+
font-size: 14px;
50+
color: var(--color-text-1);
51+
background-color: var(--color-fill-1);
52+
padding: 0 4px;
53+
border-radius: 3px;
4654
}
4755
}
48-
.tag{
49-
font-size: 14px;
50-
color: var(--color-text-1);
51-
background-color: var(--color-fill-1);
52-
padding: 0 4px;
53-
border-radius: 3px;
54-
}
55-
}
5656
}
57-
}
57+
}

src/theme/Footer/index.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,7 @@ function Footer() {
163163
})}
164164
</div>
165165
<div className={styles.footerCopyright}>
166-
<p>
167-
Copyright © {year} The Databend Community. Apache, Apache OpenDAL and
168-
OpenDAL are either registered trademarks or trademarks of the Apache
169-
Software Foundation.
170-
</p>
166+
<p>Copyright © {year} The Databend Community. All rights reserved.</p>
171167
</div>
172168
</footer>
173169
);

src/theme/MDXComponents/A.js

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,34 @@ function hasProtocolPrefix(str) {
77
return str.startsWith("http://") || str.startsWith("https://");
88
}
99
export default function MDXA(props) {
10-
if (
11-
props?.href?.includes("https://github.com/databendlabs/databend/pull/") ||
12-
props?.href?.includes("https://github.com/databendlabs/databend/pull/")
13-
) {
14-
return <Link {...props} />;
10+
let title = props?.children;
11+
if (typeof title !== "string") {
12+
title = "";
13+
}
14+
if (props?.href?.includes("https://github.com/databendlabs/databend/pull/")) {
15+
return <Link title={title} {...props} />;
1516
}
1617
if (hasProtocolPrefix(props?.href)) {
1718
return (
1819
<Tooltip
1920
destroyTooltipOnHide
20-
overlayClassName={styles.tooltip}
21+
classNames={{
22+
root: styles.tooltip,
23+
}}
2124
title="Open in the new tab"
2225
>
2326
<span className={styles.linkWrap}>
24-
<a {...props} target="_blank" rel="noopener noreferrer" />
27+
<a
28+
{...props}
29+
target="_blank"
30+
title={title}
31+
rel="noopener noreferrer"
32+
/>
2533
<LinkSvg />
2634
</span>
2735
</Tooltip>
2836
);
2937
} else {
30-
return <Link {...props} />;
38+
return <Link title={title} {...props} />;
3139
}
3240
}

0 commit comments

Comments
 (0)