Skip to content

Commit 8b55774

Browse files
committed
docs: add carbon ads to content
1 parent cb3d46f commit 8b55774

File tree

2 files changed

+117
-0
lines changed

2 files changed

+117
-0
lines changed

src/css/customTheme.css

+80
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,83 @@ html[data-theme="dark"] .header-github-link::before {
160160
border-top-left-radius: 3px;
161161
}
162162
}
163+
164+
.bsa-standard {
165+
--width: 960px;
166+
--gap: 1.5ch;
167+
position: relative;
168+
max-inline-size: var(--width);
169+
font-size: 16px;
170+
171+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI',
172+
Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue',
173+
sans-serif;
174+
}
175+
176+
.bsa-standard .native-banner {
177+
display: flex;
178+
column-gap: var(--gap);
179+
row-gap: var(--gap);
180+
flex-wrap: wrap;
181+
align-items: center;
182+
padding: 1em;
183+
box-shadow: inset 0 0 2px hsla(0, 0%, 0%, 0.15);
184+
185+
text-decoration: none;
186+
}
187+
188+
.bsa-standard .native-img {
189+
flex-shrink: 0;
190+
flex-basis: 125px;
191+
height: 50px;
192+
line-height: 0;
193+
}
194+
195+
.bsa-standard .native-main {
196+
display: flex;
197+
flex-grow: 1;
198+
flex-basis: 300px;
199+
flex-direction: row;
200+
flex-wrap: wrap;
201+
align-items: center;
202+
gap: var(--gap);
203+
}
204+
205+
.bsa-standard .native-details {
206+
display: flex;
207+
flex-grow: 1;
208+
flex-basis: 300px;
209+
210+
flex-direction: column;
211+
flex-wrap: wrap;
212+
padding-left: var(--gap);
213+
}
214+
215+
.bsa-standard .native-company {
216+
margin-bottom: 0.5ex;
217+
font-weight: 600;
218+
219+
font-size: 0.625em;
220+
line-height: 1.4;
221+
letter-spacing: 0.2ch;
222+
text-transform: uppercase;
223+
}
224+
225+
.bsa-standard .native-desc {
226+
font-weight: 300;
227+
font-size: 1em;
228+
line-height: 1.4;
229+
letter-spacing: 1px;
230+
}
231+
232+
.bsa-standard .native-cta {
233+
padding: 10px 16px;
234+
border-radius: 3px;
235+
font-weight: 600;
236+
237+
font-size: 0.875em;
238+
line-height: 1;
239+
letter-spacing: 0.1ch;
240+
text-transform: uppercase;
241+
white-space: nowrap;
242+
}

src/theme/MDXContent/index.js

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import React from 'react';
2+
import MDXContent from '@theme-original/MDXContent';
3+
4+
export default function MDXContentWrapper(props) {
5+
return (
6+
<>
7+
<div id="bsa-custom-01" class="bsa-standard"></div>
8+
<MDXContent {...props} />
9+
<script src="//m.servedby-buysellads.com/monetization.custom.js"></script>
10+
<script dangerouslySetInnerHTML={{__html: `
11+
if (typeof _bsa !== 'undefined' && _bsa) {
12+
_bsa.init('custom', 'CWYI4K7E', 'placement:pnpmio', {
13+
target: '#bsa-custom-01',
14+
template: \`
15+
<a href="##link##" class="native-banner" style="background: ##backgroundColor##" rel="sponsored noopener" target="_blank" title="##company## — ##tagline##">
16+
<img class="native-img" width="125" src="##logo##" />
17+
<div class="native-main">
18+
<div class="native-details" style="
19+
color: ##textColor##;
20+
border-left: solid 1px ##textColor##;
21+
">
22+
<span class="native-desc">##description##</span>
23+
</div>
24+
<span class="native-cta" style="
25+
color: ##ctaTextColor##;
26+
background-color: ##ctaBackgroundColor##;
27+
">##callToAction##</span>
28+
</div>
29+
</a>
30+
\`,
31+
});
32+
}
33+
`}} >
34+
</script>
35+
</>
36+
);
37+
}

0 commit comments

Comments
 (0)