40 lines
1.2 KiB
HTML
40 lines
1.2 KiB
HTML
{% extends "layout.html" %}
|
||
|
||
{% block head_title %}
|
||
{{ super() }} | Blog
|
||
{% endblock %}
|
||
|
||
{% block content %}
|
||
<div class="container">
|
||
<h1>Blog</h1>
|
||
{% for item in page.object_list %}
|
||
<hr />
|
||
<article class="blog-entry">
|
||
<h2><a href="/blog/{{ item.date.year }}/{{ item.date.month }}/{{ item.date.day }}/{{ item.slug }}">{{ item.title }}</a></h2>
|
||
<div>
|
||
<i class="icon-calendar"></i> {{ item.date|dt('%B %e, %Y') }}
|
||
|
||
<i class="icon-user"></i> {{ item.user.first_name }}
|
||
{% if item.draft %}
|
||
<span class="badge badge-warning">
|
||
This post is a draft
|
||
</span>
|
||
{% endif %}
|
||
</div>
|
||
<div class="content">{{ item.content|safe }}</div>
|
||
</article>
|
||
{% endfor %}
|
||
{% if paginator.num_pages > 1 %}
|
||
<div class="pagination pagination-centered">
|
||
<ul>
|
||
{% for p in range(1, paginator.num_pages+1) %}
|
||
<li {% if p == page_number %}class="active"{% endif %}>
|
||
<a href="{{ url('blocks_list') }}?page={{ p }}">{{ p }}</a>
|
||
</li>
|
||
{% endfor %}
|
||
</ul>
|
||
</div>
|
||
{% endif %}
|
||
</div>
|
||
{% endblock %}
|