{% extends 'base.html' %}
{% load i18n %}
{% load form_as_div %}

{% block content %}
<div class="page-header">
    <h1>
        {% block title %}
        {% if page.is_home_page %}
        {{ competition_name }}
        {% else %}
        {{ page.title }}
        {% endif %}
        {% endblock %}
    </h1>
</div>

<div class="row">
    {% if sidebar_links %}
    <div class="col-sm-3 hidden-xs">
        <ul class="nav nav-pills nav-stacked">
            {% for linked_page in sidebar_links %}
            <li {% if linked_page == page %}class="active"{% endif %}>
                <a href="{{ linked_page.get_absolute_url }}">{{ linked_page.title }}</a>
            </li>
            {% endfor %}
        </ul>
    </div>

    <div class="flatpage-content col-sm-9 col-xs-12">
    {% else %}
    <div class="flatpage-content col-xs-12">
    {% endif %}
        {{ page.render_content }}
    </div>
</div>
{% endblock %}
