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

@ -12,6 +12,7 @@
{% block content %}
<article class="single">
<header>
<h1 id="{{ article.slug }}">{{ article.title }}</h1>
<p>
{{ _('Posted on %(when)s in %(category)s',
@ -26,6 +27,19 @@
<div>
{{ article.content }}
</div>
{% if ADSENSE.adClientId and ADSENSE.adSlot.articleBottom_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.articleBottom_responsible }}"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
{% endif %}
<div class="tag-cloud">
<p>
{% if article.tags %}