mirror of
https://github.com/tangkunyin/hexo-theme-jsimple.git
synced 2026-01-25 14:56:28 +00:00
33 lines
1.8 KiB
Plaintext
33 lines
1.8 KiB
Plaintext
<% if (theme.adsense.client_id){ %>
|
|
<% if (is_archive()){ %>
|
|
<p class="adsense_tb_horizontal">
|
|
<%- partial('adaptive-unit', {format: 'auto', slotId: theme.adsense.archive_id, adStyles: 'display:block'}) %>
|
|
</p>
|
|
<% } else if ('tags' === page.layout) { %>
|
|
<p class="adsense_tb_horizontal">
|
|
<%- partial('adaptive-unit', {format: 'auto', slotId: theme.adsense.tags_id, adStyles: 'display:block'}) %>
|
|
</p>
|
|
<% } else if (is_post()) { %>
|
|
<div class="adsense_post_left">
|
|
<%- partial('adaptive-unit', {format: 'fixed', slotId: theme.adsense.post_left_id, adStyles: 'display:inline-block;width:160px;height:600px'}) %>
|
|
</div>
|
|
<div class="adsense_post_right">
|
|
<%- partial('adaptive-unit', {format: 'fixed', slotId: theme.adsense.post_right_id, adStyles: 'display:inline-block;width:160px;height:600px'}) %>
|
|
</div>
|
|
<p class="adsense_tb_horizontal">
|
|
<%- partial('adaptive-unit', {format: 'fluid', slotId: theme.adsense.post_inner_id, adStyles: 'display:block; text-align:center;'}) %>
|
|
</p>
|
|
<% } else if (is_page()) { %>
|
|
<div class="adsense_page_right">
|
|
<%- partial('adaptive-unit', {format: 'fixed', slotId: theme.adsense.post_right_id, adStyles: 'display:inline-block;width:160px;height:600px'}) %>
|
|
</div>
|
|
<p class="adsense_tb_horizontal">
|
|
<%- partial('adaptive-unit', {format: 'auto', slotId: theme.adsense.page_tb_id, adStyles: 'display:block'}) %>
|
|
</p>
|
|
<% } %>
|
|
<% if (is_archive() || 'tags' === page.layout || is_page() || is_post()) { %>
|
|
<%- partial('adSense-scripts', {type: 'custom'}) %>
|
|
<% } else if (theme.adsense.auto && (is_home() || is_category() || is_tag())) { %>
|
|
<%- partial('adSense-scripts', {type: 'auto'}) %>
|
|
<% } %>
|
|
<% } %> |