From 1a9ca28b1c348e70baa1f93397f217a5be1575d2 Mon Sep 17 00:00:00 2001 From: moparisthebest Date: Wed, 31 Jul 2013 19:05:43 -0400 Subject: [PATCH] Fix ads to display only once at top of article, mainly for index --- source/_includes/article.html | 37 +++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/source/_includes/article.html b/source/_includes/article.html index 968aaff..b1ba2f9 100644 --- a/source/_includes/article.html +++ b/source/_includes/article.html @@ -16,6 +16,33 @@ {% endunless %} +{% unless ad1_displayed %} +{% assign ad1_displayed = true %} +{% if site.google_bannerad_slot %} + + +{% endif %} +{% endunless %} + +{% if index %} +
{{ content | excerpt }}
+ {% capture excerpted %}{{ content | has_excerpt }}{% endcapture %} + {% if excerpted == 'true' %} + + {% endif %} +{% else %} +
{{ content }}
+ {% if site.google_bannerad_slot %} {% endif %} -{% if index %} -
{{ content | excerpt }}
- {% capture excerpted %}{{ content | has_excerpt }}{% endcapture %} - {% if excerpted == 'true' %} - - {% endif %} -{% else %} -
{{ content }}
{% endif %}