Files
pelican-hyde/templates/index.html
T
Floyd Hightower ba3949f07a Adding code to support tags
Fixes #1
2021-12-26 21:53:00 -03:00

46 lines
1.4 KiB
HTML

{% extends "base.html" %}
{% block content %}
<div class="posts">
{% for article in articles_page.object_list %}
<div class="post">
<h1 class="post-title" href="{{ SITEURL }}/{{ article.url }}">
<a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a>
</h1>
<span class="post-date">{{ article.locale_date }}</span>
{% if article.tags %}
<span class="post-tags">
Tags:
<ul>
{% for tag in article.tags %}
<li><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a></li>
{% endfor %}
</ul>
</span>
{% endif %}
<p>
{{ article.summary }}
</p>
<a class="read-more" href="{{ article.url }}">Continue reading »</a>
</div>
{% endfor %}
</div>
{% if DEFAULT_PAGINATION %}
<div class="pagination">
{% if articles_page.has_previous() %}
{% set num = articles_page.previous_page_number() %}
<span class="pagination-item older"><a href="{{ SITEURL }}/{{ page_name }}{{ num if num > 1 else '' }}.html">Newer</a></span>
{% else %}
<span class="pagination-item older">Newer</span>
{% endif %}
{% if articles_page.has_next() %}
<span class="pagination-item newer"><a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.next_page_number() }}.html">Older</a></span>
{% else %}
<span class="pagination-item newer">Older</span>
{% endif %}
</div>
{% endif %}
{% endblock %}