Abstracted out the google adsense code

This commit is contained in:
moparisthebest 2013-04-23 18:50:11 -04:00
parent cc61cffa81
commit 439fdddc93
4 changed files with 49 additions and 33 deletions

View File

@ -91,5 +91,16 @@ disqus_show_comment_count: true
# Google Analytics
google_analytics_tracking_id: UA-6877554-1
# Google Adsense
google_ad_client: ca-pub-3055920918910714
google_sidead_slot: 8451358572
google_sidead_width: 160
google_sidead_height: 600
google_bannerad_slot: 4021158971
google_bannerad_width: 468
google_bannerad_height: 60
# Facebook Like
facebook_like: true

View File

@ -16,17 +16,18 @@
</header>
{% endunless %}
<script type="text/javascript"><!--
google_ad_client = "ca-pub-3055920918910714";
/* moparscape.org_banner */
google_ad_slot = "4021158971";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="//pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
{% if site.google_bannerad_slot %}
<script type="text/javascript"><!--
google_ad_client = "{{site.google_ad_client}}";
google_ad_slot = "{{site.google_bannerad_slot}}";
google_ad_width = {{site.google_bannerad_width}};
google_ad_height = {{site.google_bannerad_height}};
//-->
</script>
<script type="text/javascript"
src="//pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
{% endif %}
{% if index %}
<div class="entry-content">{{ content | excerpt }}</div>

View File

@ -1,13 +1,14 @@
{% if site.google_sidead_slot %}
<section>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-3055920918910714";
/* moparscape.org-skyscraper */
google_ad_slot = "8451358572";
google_ad_width = 160;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="//pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<script type="text/javascript"><!--
google_ad_client = "{{site.google_ad_client}}";
google_ad_slot = "{{site.google_sidead_slot}}";
google_ad_width = {{site.google_sidead_width}};
google_ad_height = {{site.google_sidead_height}};
//-->
</script>
<script type="text/javascript"
src="//pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</section>
{% endif %}

View File

@ -10,17 +10,20 @@ layout: default
{% if page.date %}<p class="meta">{% include post/date.html %}{{ time }}</p>{% endif %}
</header>
{% endif %}
<script type="text/javascript"><!--
google_ad_client = "ca-pub-3055920918910714";
/* moparscape.org_banner */
google_ad_slot = "4021158971";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="//pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
{% if site.google_bannerad_slot %}
<script type="text/javascript"><!--
google_ad_client = "{{site.google_ad_client}}";
google_ad_slot = "{{site.google_bannerad_slot}}";
google_ad_width = {{site.google_bannerad_width}};
google_ad_height = {{site.google_bannerad_height}};
//-->
</script>
<script type="text/javascript"
src="//pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
{% endif %}
{{ content }}
{% unless page.footer == false %}
<footer>