aboutsummaryrefslogtreecommitdiff
path: root/templates/weblog.html
blob: 88abf61c460cca29612160158270175d69032aa0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{% extends "base.html" %}
{% block content %}
<div class="posts-list">
  {% for post in paginator.pages %}
    <div class="post-container">
      <h2>
        <a href="{{ post.permalink }}">{{ post.title }}</a>
        <span class="publish-date">{{ post.date | date }}</span>
      </h2>
      {% if post.summary %}
        {{ post.summary | safe }}
      {% endif %}
    </div>
  {% endfor %}
</div>
{% if paginator %}
  {% if paginator.number_pagers > 1 %}
  <div class="paginator">
    {% if paginator.previous %}
      <a href="{{ paginator.first }}">First</a>
      <a href="{{ paginator.previous }}">Previous page: {{ paginator.current_index - 1 }}</a>
    {% endif %}
    {% if paginator.next %}
      <a href="{{ paginator.next }}">Next page: {{ paginator.current_index + 1 }}</a>
      <a href="{{ paginator.last }}">Last</a>
    {% endif %}
  </div>
  {% endif %}
{% endif %}
{% endblock %}