blog.notmyidea.org/theme/templates/index.html

35 lines
1.3 KiB
HTML

{% extends "base.html" %}
{% block content_title %}{% endblock %}
{% block content %}
{% if articles %}
{% for article in articles_page.object_list %}
{% if loop.first and articles_page.has_previous %}
<section id="content" class="body">
<ol id="posts-list" class="hfeed" start="{{ articles_paginator.per_page -1 }}">
{% endif %}
<li><article class="hentry">
<h1><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark"
title="Permalink to {{ article.title}}">{{ article.title
}}</a></h1> {{ article.locale_date }}, in <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>.
</div><!-- /.entry-content -->
</article></li>
{% if loop.last and (articles_page.has_previous()
or not articles_page.has_previous() and loop.length > 1) %}
{% include 'pagination.html' %}
{% endif %}
{% if loop.last %}
</ol><!-- /#posts-list -->
</section><!-- /#content -->
{% endif %}
{% endfor %}
{% else %}
<section id="content" class="body">
<h2>Pages</h2>
{% for page in PAGES %}
<li><a href="{{ SITEURL }}/{{ page.url }}">{{ page.title }}</a></li>
{% endfor %}
</section>
{% endif %}
{% endblock content %}