site_opytex/theme/templates/index.html

49 lines
1.5 KiB
HTML

{% extends "base.html" %}
{% block content %}
{% for article in articles_page.object_list | sort(reverse=True,attribute='modified') %}
<article>
<header>
<h2><a href="{{ SITEURL }}/{{ article.url }}{% if not DISABLE_URL_HASH %}#{{ article.slug }}{% endif %}">{{ article.title }}</a></h2>
<p>
{{ _('Posted on %(when)s (modified on %(mod)s) in %(category)s',
when=article.locale_date,
mod=article.locale_modified,
category='<a href="%s/%s">%s</a>'|format(SITEURL, article.category.url, article.category)|safe) }}
{% if article.tags and not HOME_HIDE_TAGS %}
&#8226; {{ _('Tagged with') }}
{% for tag in article.tags %}
<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>{% if not loop.last %},{% endif %}
{% endfor %}
{% endif %}
{% if 'post_stats' in PLUGINS %}
&#8226; {{ article.stats['read_mins'] }} min read
{% endif %}
</p>
</header>
<div>
{% if summarise or article.metadata['summary'] or SUMMARY_MAX_LENGTH %}
{% if article.featured_image %}
<img src="{{ article.featured_image }}">
{% endif %}
{{ article.summary }}
<br>
<a class="btn" href="{{ SITEURL }}/{{ article.url }}{% if not DISABLE_URL_HASH %}#{{ article.slug }}{% endif %}">{{ _('Continue reading') }}</a>
{% else %}
{{ article.content }}
{% endif %}
</div>
{% if not loop.last %}
<hr />
{% endif %}
</article>
{% endfor %}
{% include "partial/pagination.html" %}
{% endblock %}