Skip to content

Commit 6428906

Browse files
committed
docs: add extraLink param into featured items
1 parent 06952bc commit 6428906

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

Diff for: docs/src/components/HomepageSponsored/index.tsx

+15-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ type FeatureItem = {
1515
eventTitle?: string
1616
link: string
1717
allowsDarkMode?: boolean
18+
extraLink?: string
1819
}
1920

2021
type SponsorItem = FeatureItem & {
@@ -26,6 +27,7 @@ const FeatureList: FeatureItem[] = [
2627
title: 'Digital Ocean',
2728
Svg: require('@site/static/img/digital-ocean-powered-by.svg').default,
2829
link: 'https://www.digitalocean.com/?refcode=0813b3be1161&utm_campaign=Referral_Invite&utm_medium=Referral_Program&utm_source=badge',
30+
extraLink: '/blog/digital-ocean-app-platform',
2931
},
3032
{
3133
title: 'Algolia',
@@ -52,10 +54,10 @@ const SponsorList: SponsorItem[] = [
5254
// },
5355
]
5456

55-
function Feature({ title, Svg, link, allowsDarkMode }: FeatureItem) {
57+
function Feature({ title, Svg, link, allowsDarkMode, extraLink }: FeatureItem) {
5658
return (
5759
<div className={clsx('col col--6')}>
58-
<div className="text--center">
60+
<div className={clsx('text--center', styles['feature-item'])}>
5961
<a href={link} title={title} target="_blank" rel="noreferrer" aria-label={title}>
6062
<Svg
6163
className={clsx(styles.featureSvg, {
@@ -64,6 +66,17 @@ function Feature({ title, Svg, link, allowsDarkMode }: FeatureItem) {
6466
role="img"
6567
/>
6668
</a>
69+
{extraLink && (
70+
<a
71+
href={extraLink}
72+
title={`Learn more about ${title}`}
73+
target="_blank"
74+
rel="noreferrer"
75+
className={styles.featureLink}
76+
>
77+
Learn more about {title}
78+
</a>
79+
)}
6780
</div>
6881
</div>
6982
)

Diff for: docs/src/components/HomepageSponsored/styles.module.css

+5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
gap: 21px;
2121
}
2222

23+
.feature-item {
24+
display: flex;
25+
flex-direction: column;
26+
}
27+
2328
@media screen and (min-width: 1024px) {
2429
.features {
2530
display: flex;

0 commit comments

Comments
 (0)