{% extends "withaside.html" %}
{% load i18n %}

{% block title %}{% trans "Latest news" %}{% endblock %}
{% block header %}{% trans "Latest news" %}{% endblock %}

{% block main %}

{% for entry in latest %}
<section class="blogpost">
<time datetime="{{ entry.pub_date|date:"c" }}">
<span class="block large"> {{ entry.pub_date|date:"j" }}</span>
<span class="block small">{{ entry.pub_date|date:"F" }}</span>
</time>
<h2><a href="{{ entry.get_absolute_url }}">{{ entry.title }}</a></h2>
<span class="block small">{{ entry.user }}</span>

{{ entry.body_html|truncatewords_html:50|safe }}
<p class="more"><a href="{{ entry.get_absolute_url }}">{% trans "Read on →" %}</a></p>
</section>
{% empty %}
<h1>{% trans "No entries yet" %}</h1>

<p>{% trans "This blog is really empty, but this placeholder is used instead, to give you an impression of what this page will look like." %}</p>
{% endfor %}
{% endblock main %}

{% block sidebar %}
{% load blog_tags %}
{% latest_entries 5 %}
{% include "samklang_blog/widgets/latest.html" with object_list=latest_entries %}
{% endblock sidebar %}
