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

{% block title %}{{ object.title }}{% endblock %}

{% block main %}
<section class="blogpost">
<h1 class="title">{{ object.title }}</h1>
<div class="meta">{{ object.user.get_full_name|default:entry.user }},
    <time datetime="{{ object.pub_date|date:"c" }}">{{ object.pub_date|date:"j F" }}</time>
</div>
    {{ object.body_html|safe }}
</section>
{% endblock main %}

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

{% block context_menu %}
{% if request.user.is_authenticated %}
<li><a href="{% url 'blog-entry-edit' object.id %}">{% trans "Edit" %}</a></li>
{% endif %}
{% endblock %}
