{% load static %}

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>{% block title %}{% if section %}{{ section }} - {% endif %}Quintet Blog{% endblock %}</title>

    <!-- Bootstrap -->
    <link href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/r29/html5.min.js"></script>
      <script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  <body>
    <nav class="navbar navbar-default navbar-static-top" role="navigation">
      <div class="container">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="/">My Quintet Blog</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
          <ul class="nav navbar-nav">
            <li><a href="/">Home</a></li>
            {% for section in sections %}
            <li><a href="{% url 'quintet.blog.views.list_posts' section=section.slug %}">{{ section.name }}</a></li>
            {% endfor %}

            {% for page in pages %}
            <li><a href="{% url 'quintet.blog.views.view_page' slug=page.slug %}">{{ page.title }}</a></li>
            {% endfor %}
          </ul>
        </div>
      </div>
    </nav>

    <div class="container">
      {% block content %}
        {% if filter_title %}
        <h3 class="text-info"><span class="glyphicon glyphicon-bookmark"></span> {{ filter_title }}</h3>
        {% endif %}

        {% for post in posts %}
        {% include 'article.html' %}
        <hr>
        {% empty %}
        <article style="padding-top: 100px;">
          <p class="lead text-center text-muted">No posts to display.</p>
        </article>
        {% endfor %}

        {% endblock %}
    </div>

    <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
    <script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.1.1/js/bootstrap.min.js"></script>
    <script src="//cdnjs.cloudflare.com/ajax/libs/ekko-lightbox/3.0.3a/ekko-lightbox.min.js"></script>
  </body>
</html>
