{% extends 'base.html' %}

{% block title %}
{{ page.title|striptags|e }} {% if page.subtitle %} - {{ page.subtitle|striptags|e }} {% endif %} · {{ super() }}
{% endblock title %}

{% block head_description %}
{% if page.summary %}
{{ page.summary|striptags|e }}
{% endif %}
{% endblock head_description %}

{% block meta_tags_in_head %}
{{ super() }}
{% if page.keywords %}
<meta name="keywords" content="{{ page.keywords }}" />
{% endif %}

{% from '_includes/smo_metadata.html' import smo_metadata with context %}
{{ smo_metadata(page) }}
{% endblock meta_tags_in_head %}

{% block content %}
<article>
<div class="row-fluid">
    <header class="page-header span10 offset2">
    <h1><a href="{{ SITEURL }}/{{ page.url }}"> {{ page.title }} {% if page.subtitle %} <small> {{ page.subtitle }} </small> {% endif %} </a></h1>
    </header>
</div>

<div class="row-fluid">
    {% if page.toc %}
    <div class="span2 table-of-content">
        <nav>
        <h4>Contents</h4>
        {{ page.toc }}
        </nav>
    </div>
    <div class="span8 article-content">
        {% else %}
        <div class="span8 offset2 article-content">
            {% endif %}

            {{ page.content }}
            {% from '_includes/comments.html' import comments_section with context %}
            {{ comments_section(page) }}
        </div>
    </div>
    </article>
    {% include '_includes/photoswipe.html' %}
    {% endblock content %}

    {% block script %}
    {{ super() }}
    {% from '_includes/comments.html' import comments_script with context %}
    {{ comments_script() }}
    {% endblock script %}
