Skip to content

Commit d39dd5d

Browse files
committed
allow icon or image in ad
1 parent b91d53f commit d39dd5d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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)