Support for responsive adsense banners (#56)

Adsense Banners begin
This commit is contained in:
Gustavo Furtado de Oliveira Alves 2016-11-01 02:05:22 -02:00 committed by Alexandre Vicenzi
parent b545f9a56e
commit 5360d3f5f0
5 changed files with 79 additions and 0 deletions

View file

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