Move blog index to be part of base template.

This way, it's not on the bottom of pages.  This shouldn't cause
trouble, since when date_list isn't defined, nothing is shown by this
code.
This commit is contained in:
Bradley M. Kuhn 2015-03-04 15:32:32 -08:00
parent 1c6e685ee4
commit 855584408b
2 changed files with 6 additions and 7 deletions

View file

@ -24,6 +24,12 @@
(<a href="/feeds/blog/?tag={{ tag.slug }}">rss</a>)</li>
{% endfor %}
</ul>
{% if date_list %}
<h3>Blog Index by Year</h3>
<ul>
{% for year in date_list reversed %}<li><a href="{{ year|date:"Y" }}/">{{ year|date:"Y" }}</a></li>{% endfor %}
</ul>
{% endif %}
<h2><a href="/blog/">See all posts&hellip;</a></h2>
<!-- <p><a href="/blog/query/">Query...</a></p> -->

View file

@ -29,11 +29,4 @@
<p class="pagination_list">{% if blog_entries.num_pages > 1 %} {% for pagenum in blog_entries.paginator.page_range %}{% ifequal pagenum blog_entries.number %}[{{ pagenum }}]{% else %}<a href="?page={{ pagenum }}">{{ pagenum }}</a>{% endifequal %} {% endfor %}{% endif %}</p>
<div class="clear"></div>
{% if date_list %}
<h3>Blog Index by Year</h3>
<ul>
{% for year in date_list reversed %}<li><a href="{{ year|date:"Y" }}/">{{ year|date:"Y" }}</a></li>{% endfor %}
</ul>
{% endif %}
{% endblock %}