Skip to content

Commit b35f9e4

Browse files
committed
feat: add support for displaying carbon ads
1 parent de56349 commit b35f9e4

3 files changed

Lines changed: 37 additions & 0 deletions

File tree

css/carbon_ads.css

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
.carbon_ad_wrapper {
2+
margin-top: var(--prose-elements-margin);
3+
background: var(--neutral-gray-3);
4+
padding: 15px;
5+
border-radius: var(--rounded-md);
6+
text-align: center;
7+
font-size: 12px;
8+
font-weight: 500;
9+
line-height: 1.4;
10+
color: var(--neutral-gray-11);
11+
}
12+
13+
.carbon_ad_wrapper img {
14+
margin: 0 auto 12px;
15+
border-radius: var(--rounded-sm);
16+
}
17+
18+
.carbon_ad_wrapper #carbonads .carbon-poweredby {
19+
display: block;
20+
margin-top: 6px;
21+
text-transform: uppercase;
22+
color: var(--neutral-gray-10);
23+
text-align: center;
24+
font-size: 10px;
25+
}

css/main.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88
@import './sponsors.css';
99
@import './disclosure.css';
1010
@import './feature_highlight.css';
11+
@import './carbon_ads.css';

templates/toc.edge

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@
1212
@if(sponsors && sponsors.length)
1313
@!component('docs::elements/sponsor_advertisements', { sponsors })
1414
@end
15+
16+
@if(carbonAds)
17+
<div class="carbon_ad_wrapper">
18+
<script
19+
async
20+
type="text/javascript"
21+
src="{{ carbonAds.url }}"
22+
id="_carbonads_js"
23+
></script>
24+
</div>
25+
@end
1526
</div>
1627
</div>
1728
</div>

0 commit comments

Comments
 (0)