Skip to content

Commit

Permalink
Toc ad image (#269)
Browse files Browse the repository at this point in the history
  • Loading branch information
recrwplay authored Oct 9, 2024
1 parent 1474254 commit 29ae8d7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/css/toc-ad.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
background-color: transparent !important;
}

.toc .toc-ad .toc-ad-image {
width: 192px;
}

.toc .toc-ad .toc-ad-icon {
display: block;
content: "";
Expand Down
Binary file added src/img/nodes-24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/partials/toc-ad.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,18 @@
{{/if}}

<a href="{{{page.attributes.ad-link}}}" target="_blank">

{{#unless page.attributes.ad-image}}
{{#with page.attributes.ad-icon}}
<i class="toc-ad-icon toc-ad-icon--{{{this}}}"></i>
{{/with}}
{{/unless}}

{{#unless page.attributes.ad-icon}}
{{#with page.attributes.ad-image}}
<img class="toc-ad-image" src="{{{this}}}" alt="{{{ page.attributes.ad-title }}}">
{{/with}}
{{/unless}}

<h2 class="toc-ad-title">
{{{page.attributes.ad-title}}}
Expand Down

0 comments on commit 29ae8d7

Please sign in to comment.