2019-11-16 07:13:46 +00:00
|
|
|
{% extends "base" %}
|
|
|
|
|
|
|
|
{% block extracss %}
|
|
|
|
<link href="/static/css/index.css" rel="stylesheet"/>
|
|
|
|
{% endblock extracss %}
|
|
|
|
|
|
|
|
{% block content %}
|
2019-11-14 02:10:42 +00:00
|
|
|
{% for post in posts %}
|
2019-11-18 08:15:46 +00:00
|
|
|
<a class="article" href="/post/{{ post.title | slugify }}-{{ post.id }}">
|
2019-11-16 07:13:46 +00:00
|
|
|
<article>
|
2019-12-04 21:11:27 +00:00
|
|
|
{#
|
|
|
|
<span><strong>{ image: </strong></span>
|
2019-11-16 07:13:46 +00:00
|
|
|
<figure>
|
|
|
|
<img src="https://files.realpython.com/media/MProc.7cf3be371bbc.png">
|
|
|
|
</figure>
|
2019-12-04 21:11:27 +00:00
|
|
|
#}
|
|
|
|
<p class="article-title"><strong>{ title: </strong>{{ post.title }}</p>
|
2019-11-16 07:13:46 +00:00
|
|
|
<p class="article-body"><strong>Article: </strong>{{ post.content | split(pat=" ") | slice(end=100) | join(sep=" ") }}</p>
|
|
|
|
<div class="article-info">
|
|
|
|
<span><strong>Author: </strong>kirbylife <strong>Date: </strong>{{ post.created_at | date(format="%Y-%m-%d") }}<strong> }</strong></span>
|
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
</a>
|
2019-11-14 02:10:42 +00:00
|
|
|
{% endfor %}
|
2019-11-17 05:10:06 +00:00
|
|
|
|
|
|
|
{# Pages #}
|
|
|
|
<div class="pagination">
|
|
|
|
<strong>Pages:</strong>
|
|
|
|
[
|
|
|
|
{% for n in range(start=1, end=total_pages+1) %}
|
2019-11-17 22:09:58 +00:00
|
|
|
<a {% if actual_page != n %}href="?page={{ n }}"{% endif %}>página {{ n }}</a>{% if total_pages != n %}, {% endif %}
|
2019-11-17 05:10:06 +00:00
|
|
|
{% endfor %}
|
|
|
|
]
|
|
|
|
</div>
|
2019-11-16 07:13:46 +00:00
|
|
|
{% endblock content %}
|