Adsense Banners

This commit is contained in:
gustavofoa 2016-09-17 10:10:20 -03:00
parent 12bf536294
commit b634829548
4 changed files with 48 additions and 17 deletions

View file

@ -1,12 +0,0 @@
{% if ADSENSE_AD_CLIENT and ADSENSE_AD_SLOT %}
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block"
data-ad-client="{{ ADSENSE_AD_CLIENT }}"
data-ad-slot="{{ ADSENSE_AD_SLOT }}"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
{% endif %}

View file

@ -13,9 +13,6 @@
<article class="single">
<header>
{% if SHOW_ADSENSE_ARTICLE_TOP %}
{% include "adsense-banner.html" %}
{% endif %}
<h1 id="{{ article.slug }}">{{ article.title }}</h1>
<p>
{{ _('Posted on %(when)s in %(category)s',
@ -31,8 +28,16 @@
{{ article.content }}
</div>
{% if SHOW_ADSENSE_ARTICLE_BOTTOM %}
{% include "adsense-banner.html" %}
{% if ADSENSE.adClientId and ADSENSE.adSlot.articleBottom %}
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block"
data-ad-client="{{ ADSENSE.adClientId }}"
data-ad-slot="{{ ADSENSE.adSlot.articleBottom }}"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
{% endif %}
<div class="tag-cloud">

View file

@ -97,8 +97,34 @@
{% endfor %}
</ul>
</div>
{% if ADSENSE.adClientId and ADSENSE.adSlot.aside %}
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block"
data-ad-client="{{ ADSENSE.adClientId }}"
data-ad-slot="{{ ADSENSE.adSlot.aside }}"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
{% endif %}
</aside>
<main>
{% if ADSENSE.adClientId and ADSENSE.adSlot.top %}
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block"
data-ad-client="{{ ADSENSE.adClientId }}"
data-ad-slot="{{ ADSENSE.adSlot.top }}"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
{% endif %}
{% if MAIN_MENU %}
<nav>
<a href="{{ SITEURL }}">{{ _('Home') }}</a>

View file

@ -37,5 +37,17 @@
</article>
{% endfor %}
{% if ADSENSE.adClientId and ADSENSE.adSlot.homeBottom %}
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block"
data-ad-client="{{ ADSENSE.adClientId }}"
data-ad-slot="{{ ADSENSE.adSlot.homeBottom }}"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
{% endif %}
{% include "partial/pagination.html" %}
{% endblock %}