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"> <article class="single">
<header> <header>
{% if SHOW_ADSENSE_ARTICLE_TOP %}
{% include "adsense-banner.html" %}
{% endif %}
<h1 id="{{ article.slug }}">{{ article.title }}</h1> <h1 id="{{ article.slug }}">{{ article.title }}</h1>
<p> <p>
{{ _('Posted on %(when)s in %(category)s', {{ _('Posted on %(when)s in %(category)s',
@ -31,8 +28,16 @@
{{ article.content }} {{ article.content }}
</div> </div>
{% if SHOW_ADSENSE_ARTICLE_BOTTOM %} {% if ADSENSE.adClientId and ADSENSE.adSlot.articleBottom %}
{% include "adsense-banner.html" %} <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 %} {% endif %}
<div class="tag-cloud"> <div class="tag-cloud">

View file

@ -97,8 +97,34 @@
{% endfor %} {% endfor %}
</ul> </ul>
</div> </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> </aside>
<main> <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 %} {% if MAIN_MENU %}
<nav> <nav>
<a href="{{ SITEURL }}">{{ _('Home') }}</a> <a href="{{ SITEURL }}">{{ _('Home') }}</a>

View file

@ -37,5 +37,17 @@
</article> </article>
{% endfor %} {% 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" %} {% include "partial/pagination.html" %}
{% endblock %} {% endblock %}