Skip to content

Commit d865557

Browse files
docs: frigade sponsor docs
1 parent f1d42c2 commit d865557

File tree

3 files changed

+45
-3
lines changed

3 files changed

+45
-3
lines changed

docs/src/components/AdsContainerElement/styles.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
.carbon-ads {
2-
position: fixed;
32
display: grid;
43
row-gap: 16px;
54
}

docs/src/components/HomepageSponsored/index.tsx

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable react/require-default-props */
12
/* eslint-disable import/no-unresolved */
23
/* eslint-disable @typescript-eslint/no-var-requires */
34
/* eslint-disable global-require */
@@ -7,7 +8,9 @@ import styles from './styles.module.css'
78

89
type FeatureItem = {
910
title: string
10-
Svg: React.ComponentType<React.ComponentProps<'svg'>>
11+
Svg?: React.ComponentType<React.ComponentProps<'svg'>>
12+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, react/no-unused-prop-types
13+
src?: any
1114
link: string
1215
}
1316

@@ -24,6 +27,14 @@ const FeatureList: FeatureItem[] = [
2427
},
2528
]
2629

30+
const SponsorList: FeatureItem[] = [
31+
{
32+
title: 'Frigade',
33+
src: require('@site/static/img/sponsors/frigade.png').default,
34+
link: 'https://frigade.com/?source=react-tooltip',
35+
},
36+
]
37+
2738
function Feature({ title, Svg, link }: FeatureItem) {
2839
return (
2940
<div className={clsx('col col--6')}>
@@ -39,6 +50,21 @@ function Feature({ title, Svg, link }: FeatureItem) {
3950
export default function HomepageSponsored(): JSX.Element {
4051
return (
4152
<section className={styles.features}>
53+
<div className="container">
54+
<h3 className={styles.sponsoredTitle}>Sponsored by</h3>
55+
<div className="row">
56+
{SponsorList.map(({ link, title, src }, idx) => (
57+
// eslint-disable-next-line react/no-array-index-key
58+
<div key={idx} className={clsx('col col--12')}>
59+
<div className="text--center">
60+
<a href={link} title={title} target="_blank" rel="noreferrer">
61+
<img src={src} alt={title} width={480} />
62+
</a>
63+
</div>
64+
</div>
65+
))}
66+
</div>
67+
</div>
4268
<div className="container">
4369
<h3 className={styles.sponsoredTitle}>Powered by</h3>
4470
<div className="row">

docs/src/theme/TOC/index.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,29 @@
22
import React from 'react'
33
import TOC from '@theme-original/TOC'
44
import AdsContainerElement from '@site/src/components/AdsContainerElement'
5+
import LogoFrigade from '@site/static/img/sponsors/frigade.png'
56

67
export default function TOCWrapper(props) {
78
return (
89
<>
910
<TOC {...props} />
10-
<AdsContainerElement />
11+
<div
12+
style={{
13+
position: 'fixed',
14+
}}
15+
>
16+
<div className="sponsor-frigade">
17+
<a
18+
href="https://frigade.com/?source=react-tooltip"
19+
title="Frigade"
20+
target="_blank"
21+
rel="noreferrer"
22+
>
23+
<img src={LogoFrigade} alt="Frigade" />
24+
</a>
25+
</div>
26+
<AdsContainerElement />
27+
</div>
1128
{/* <ins
1229
className="adsbygoogle"
1330
style={{ display: 'block', position: 'fixed', width: '300px', height: '600px' }}

0 commit comments

Comments
 (0)