{% extends "blognajd/base.html" %}
{% load comments tagging_tags inlines %}

{% block meta-description %}{{ object.abstract_markup|render_inlines|striptags }}{% endblock %}

{% block title %}{{ block.super }}&nbsp;&raquo;&nbsp;{{ object.title }}{% endblock %}

{% block extracss %}
<link rel="stylesheet" href="{{ STATIC_URL }}inline_media/css/inline_media.css" type="text/css" media="screen" />
<link rel="stylesheet" href="{{ STATIC_URL }}prettyphoto-3.1.3/css/prettyPhoto.css" type="text/css" media="screen" charset="utf-8" />
{% endblock %}

{% block extrajs %}
<script type="text/javascript" src="{{ STATIC_URL }}inline_media/js/inline_media.js"></script>
<script src="{{ STATIC_URL }}prettyphoto-3.1.3/js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>
{% endblock %}

{% block nav-sitename %}<a href="{% url 'index' %}">{{ settings.BLOGNAJD_SITE_SHORT_NAME }}</a>{% endblock %}

{% block class-nav-blog %}active{% endblock %}

{% block jumbotron %}
{% tags_for_object object as tag_list %}
<div class="jumbotron story">
  {% if object.status == 1 %}
  <div><span class="label label-important">draft</span></div>
  {% endif %}
  <h3>{{ object.title }}</h3>
  <div class="row-fluid">
    <div class="subtitle offset3 span6">
      <div class="date">{{ object.pub_date|date:"l, F j, Y" }}</div>
      {% if tag_list %}
      <div class="tags">{% for tag in tag_list %}<a href="{% url 'tag-detail' tag %}" class="tag label">{{ tag }}</a>{% if not forloop.last %}&nbsp;{% endif %}{% endfor %}</div>
      {% endif %}
    </div>
  </div>
</div>
{% endblock %}

{% block body %}
{% get_comment_count for object as comment_count %}
<div id="body-story" class="row-fluid">
  <div class="span12">
    {{ object.body_markup|render_inlines|safe }}
  </div>
</div>
{% if object.status > 1 and not object.in_the_future %}
{% include "blognajd/includes/comments.html" with comment_count=comment_count %}
{% endif %}
{% endblock %}
