From 7df1c88d8c272c1321247de821007068e83463bb Mon Sep 17 00:00:00 2001 From: Andrew Senetar Date: Mon, 29 Jul 2013 05:58:17 -0400 Subject: [PATCH] Update templates The following updates are made: - index.html now lists the site description along with X articles - _list_item.html universalizes code for iterating over the articles - _site_social.html is merged into base.html - _google_search.html is added for custom search support - _gosquared.html, _google_analytics.html have minor formatting changes - archives.html displays a one page list of all articles - period_archives.html is removed as it is not planned for implementation atm - tags.html general clean up and tweaks - base.html now has - full rss/atom feed support - disqus comment count support on links (not used yet) - blog links in aside - search in aside --- templates/_google_analytics.html | 8 +- templates/_google_search.html | 17 +++ templates/_gosquared.html | 35 ++--- templates/_list_item.html | 41 ++++++ templates/_site_social.html | 3 - templates/archives.html | 22 ++- templates/base.html | 223 ++++++++++++++++++------------- templates/index.html | 25 +++- templates/period_archives.html | 4 - templates/tags.html | 2 +- 10 files changed, 250 insertions(+), 130 deletions(-) create mode 100644 templates/_google_search.html create mode 100644 templates/_list_item.html delete mode 100644 templates/_site_social.html delete mode 100644 templates/period_archives.html diff --git a/templates/_google_analytics.html b/templates/_google_analytics.html index bcdf492..fa1c333 100644 --- a/templates/_google_analytics.html +++ b/templates/_google_analytics.html @@ -1,5 +1,5 @@ - - - + diff --git a/templates/_google_search.html b/templates/_google_search.html new file mode 100644 index 0000000..e264902 --- /dev/null +++ b/templates/_google_search.html @@ -0,0 +1,17 @@ +

Site Search

+ + diff --git a/templates/_gosquared.html b/templates/_gosquared.html index 47e5909..f7e66fe 100644 --- a/templates/_gosquared.html +++ b/templates/_gosquared.html @@ -1,17 +1,18 @@ - - diff --git a/templates/_list_item.html b/templates/_list_item.html new file mode 100644 index 0000000..1dccfa5 --- /dev/null +++ b/templates/_list_item.html @@ -0,0 +1,41 @@ +
  • +
    +
    + {% if article.image %} + + {% else %} + + {% endif %} +
    +
    +
    +

    {{ article.title|title }}

    + {% if not category %} + + {% endif %} + {% if not tag and article.tags -%} +
    +   +
      + {% for tag in article.tags %} +
    • {{ tag }}
    • + {% endfor %} +
    +
    + {% endif %} +
    +
    + {{ article.summary }} + +
    +
    +
      +
    • Published by {{ article.author }} on: {{ article.locale_date }}
    • + {% if article.modified %} +
    • Last Modified on: {{ article.modified }}
    • + {% endif %} +
    +
    +
    +
    +
  • diff --git a/templates/_site_social.html b/templates/_site_social.html deleted file mode 100644 index 647b115..0000000 --- a/templates/_site_social.html +++ /dev/null @@ -1,3 +0,0 @@ -{% for network, url in SOCIAL %} -
  • -{% endfor %} diff --git a/templates/archives.html b/templates/archives.html index 88445f1..4c8d8bc 100644 --- a/templates/archives.html +++ b/templates/archives.html @@ -1,10 +1,24 @@ {% extends 'base.html' %} {% block title %}{{ super() }} - Archives{% endblock %} -{% block content_title %}Archives{% endblock %} +{% block content_title %}Archives{% endblock %} {% block content %} - + {% endblock %} diff --git a/templates/base.html b/templates/base.html index e36581c..ef62330 100644 --- a/templates/base.html +++ b/templates/base.html @@ -14,115 +14,136 @@ + + + - {% if FEED -%} + {% if FEED_ATOM -%} {% endif %} {%if FEED_RSS -%} {% endif %} + {% if FEED_ALL_ATOM -%} + + {% endif %} + {%if FEED_ALL_RSS -%} + + {% endif %} + {% if CATEGORY_FEED_ATOM and category -%} + + {% endif %} + {%if CATEGORY_FEED_RSS and category -%} + + {% endif %} + {% if TAG_FEED_ATOM and tag -%} + + {% endif %} + {%if TAG_FEED_RSS and tag -%} + + {% endif %} - + +
    +
    +
    +
    +

    {% block content_title %}{% endblock %}

    + {% block content_image %}{% endblock %} +
    + {% block content %} +
      + {% for article in articles_page.object_list %} + {% include '_list_item.html' %} + {% endfor %} +
    {% endblock %} - -
    -
    - + + +
    + +
    +