{% extends "planet/base.html" %}
{% load i18n pagination_tags planet_tags %}

{% block head_title %}{% trans "Blog" %}: {{ blog.title }} - {% trans 'Posts in' %} {{ block.super }}{% endblock %}
{% block extra_head %}
    <meta name="title" content="{% trans 'Blog' %}: {{ blog.title }} - {% trans 'Posts in' %} {{ site.name }}" />
    <meta name="description" content="{% trans 'Blog' %} {{ blog.title }} - {% trans 'Posts in' %} {{ site.name }}" />
    <meta name="robots" content="index, follow" />
{% endblock %}

{% block breadcrumb_section %}<li><a href="{% url 'planet.views.blogs_list' %}">Blogs</a> <span class="divider">/</span></li>{% endblock %}
{% block breadcrumb_detail %}<li class="active">{{ blog.title }}</li>{% endblock %}

{% block content %}
    <h2>{% trans "Blog" %}: {{ blog.title }}</h2>
    <table class="blog details table table-hover table-bordered">
        <tr>
            <th>{% trans 'web' %}</th><td><a href="{{ blog.url }}" title="{% trans 'Go to the original blog' %}">{{ blog.url }}</a></td>
        </tr>
        {% for feed in blog.feed_set.all %}
        <tr>
            <th>{% trans 'feed' %}</th><td><a href="{{ feed.get_absolute_url }}" class="feed" title="{% trans 'See the full list of post from this feed' %}">{{ feed.title }}</a></td>
        </tr>
        {% endfor %}
    </table>
    {% if tag %}
        <h3>{% trans 'Posts under tag' %}: <strong>{{ tag }}</strong></h3>
    {% endif %}
    
    {% autopaginate posts 20 %}
    {% for post in posts %}
        <div class="post {% cycle 'even' 'odd' %} clearfix">
            {% post_details post %}
        </div>
    {% endfor %}

    {% if tag %}
        <p>
            <a href="{% url 'planet_tag_feed_list' tag.name %}" title="{% trans 'See the list of blogs talking about this tag' %}">
                {% trans 'Other blogs talking about ' %} {{ tag }}
            </a>
        </p>
    {% endif %}

    {% paginate %}
{% endblock %}

{% block right_column %}
    {% cloud_for_blog blog %}
    {% include 'planet/feeds/blocks/syndication_block.html' %}
{% endblock %}
