{% extends "base.html" %}

{% block page_title %}
    <title>{{ blog.title }} | {{ meta.title}}</title>
{% endblock page_title %}

{% block page_meta %}
    <meta name="title" content="{{ blog.title }} | {{ meta.title}}">
    <meta name="description" content="{{ body|striptags|truncate|e }}">
    <!-- Google will often use this as its description of your page/site. Make it good. -->

    <meta name="author" content="{{ blog.author }}">
    <meta name="Copyright" content="{{ blog.copyright }}">

    <!-- Dublin Core Metadata : http://dublincore.org/ -->
    <meta name="DC.title" content="{{ blog.title}} | {{meta.title }}">
    <meta name="DC.subject" content="{{ body|striptags|truncate|e }}">
    <meta name="DC.creator" content="{{ blog.author }}">
{% endblock page_meta %}


{% block content %}
    <h3><a href="{{meta.url}}">{% if meta.title %}{{ meta.title }}{% else %}#{% endif %}</a></h3>
    <p class="muted"><small>
        posted on {{ meta.date.strftime("%d/%m/%Y %H:%M")  }}
        {% if meta.tags %}
            {% for t in meta.tags %}<a href="{{ blog.url }}tag/{{ t }}/">#{{ t }}</a> {% endfor %}
        {% endif %}
    </small></p>
    {{ body|safe() }}

    {% if mentions %}
    <hr/>
    <div class="mentions">
    {% for tweet_id, tweet in mentions.tweets|dictsort|reverse %}
    <div class="mentions-item">
        <img src="{{ blog.url }}images/{{ tweet.profile_image_local }}" class="mentions-avatar" />
        <div class="mentions-body">
            <strong>{{ tweet.user_name }}</strong> <a href="http://twitter.com/{{tweet.user_screen_name}}" class="muted">@{{ tweet.user_screen_name }}</a><br/>
        {{ tweet.text|urlize }} -- 
        <small><a href="http://twitter.com/{{ tweet.user_screen_name}}/status/{{tweet_id}}" class="muted" >{{ tweet.created_at }}</a></small>
        </div>
    </div>
    {% endfor %}
    </div>
    {% endif %}
    <hr />
{% endblock %}
