Skip to content

Commit 29ae8d7

Browse files
authored
Toc ad image (#269)
1 parent 1474254 commit 29ae8d7

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

src/css/toc-ad.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
background-color: transparent !important;
1919
}
2020

21+
.toc .toc-ad .toc-ad-image {
22+
width: 192px;
23+
}
24+
2125
.toc .toc-ad .toc-ad-icon {
2226
display: block;
2327
content: "";

src/img/nodes-24.png

7.04 KB
Loading

src/partials/toc-ad.hbs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,18 @@
1515
{{/if}}
1616

1717
<a href="{{{page.attributes.ad-link}}}" target="_blank">
18+
19+
{{#unless page.attributes.ad-image}}
1820
{{#with page.attributes.ad-icon}}
1921
<i class="toc-ad-icon toc-ad-icon--{{{this}}}"></i>
2022
{{/with}}
23+
{{/unless}}
2124

25+
{{#unless page.attributes.ad-icon}}
2226
{{#with page.attributes.ad-image}}
2327
<img class="toc-ad-image" src="{{{this}}}" alt="{{{ page.attributes.ad-title }}}">
2428
{{/with}}
29+
{{/unless}}
2530

2631
<h2 class="toc-ad-title">
2732
{{{page.attributes.ad-title}}}

0 commit comments

Comments
 (0)