flex/templates/index.html
2016-08-10 19:28:32 +02:00

44 lines
1.4 KiB
HTML

{% extends "base.html" %}
{% block content %}
{% for article in articles_page.object_list %}
<article>
<header>
<h2><a href="{{ SITEURL }}/{{ article.url }}#{{ article.slug }}">{{ article.title }}</a></h2>
<p>
{% autoescape false %}
{{ _('Posted on %(when)s in %(category)s',
when=article.locale_date,
category='<a href="%s/%s">%s</a>' % (SITEURL, article.category.url, article.category)) }}
{% endautoescape %}
{% if article.tags %}
&#8226; {{ ngettext('Tag', 'Tags', article.tags|count) }}:
{% for tag in article.tags %}
<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>{% if not loop.last %},{% endif %}
{% endfor %}
{% endif %}
{% if DISQUS_SITENAME %}
&#8226; <a href="{{ SITEURL }}/{{ article.url }}#disqus_thread">{{ _('Leave a comment') }}</a>
{% endif %}
</p>
</header>
<div>
{% if summarise or article.metadata['summary'] or SUMMARY_MAX_LENGTH %}
{{ article.summary }}
<a class="btn" href="{{ SITEURL }}/{{ article.url }}#{{ article.slug }}">{{ _('Continue reading') }}</a>
{% else %}
{{ article.content }}
{% endif %}
</div>
{% if not loop.last %}
<hr />
{% endif %}
</article>
{% endfor %}
{% include "partial/pagination.html" %}
{% endblock %}
{% block additional_js %}
{% include "partial/disqus_count.html" %}
{% endblock %}