<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
    <meta charset="utf-8"/>
    <title>{{title}}{% block subtitle %}{% endblock %}</title>
    <link rel="canonical" href="{{site-url}}{{uri}}">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href='/assets/gfont.css' rel='stylesheet'
          type='text/css'>
    <link rel="stylesheet" href="/assets/bootstrap.css">
    <link href="/assets/fontawesome.css" rel="stylesheet">
    <link rel="stylesheet" href="/assets/highlight-default.css">
    {% style "css/screen.css" %}
</head>
<body>

<nav class="navbar navbar-default">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                <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="{{index-uri}}">{{title}}</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
            <ul class="nav navbar-nav navbar-right">
                <li {% if home %} class="active" {% endif %}><a href="{{index-uri}}">Episodes</a></li>
                {% for nav-page in navbar-pages %}
                <li
                {%ifequal page.uri nav-page.uri %} class="active" {% endifequal %}>
                <a href="{{nav-page.uri}}">{{nav-page.title}}</a>
                </li>
                {% endfor %}
                <li
                {% if archives %} class="active" {% endif %}><a href="{{archives-uri}}">Notebook</a></li>
                <li><a href="feeds.html">News</a></li>
            </ul>
        </div><!--/.nav-collapse -->
    </div><!--/.container-fluid -->
</nav>


<div class="container">

    <div class="row">
        <div class="col-lg-9">
            <div id="content">
                {% block content %}
                {% endblock %}
            </div>
        </div>

        <div class="col-md-3">
            <div id="sidebar">
                <h3>Pages</h3>
                <ul id="pages">
                    {% for page in sidebar-pages %}
                    <li><a href="{{page.uri}}">{{page.title}}</a></li>
                    {% endfor %}
                </ul>

                {% if latest-posts|not-empty %}
                <div id="recent">
                    <h3>Recent</h3>
                    <ul>
                        {% for post in latest-posts %}
                        <li>{{post.date|date:"MM.dd"}} <a href="{{post.uri}}">{{post.title}}</a></li>
                        {% endfor %}
                    </ul>
                </div>
                {% endif %}


                {% if sidebar-links|not-empty %}
                <div id="links">
                    <h3>{{ sidebar-links-title }}</h3>
                    <ul>
                        {% for post in sidebar-links %}
                        <li><a href="{{post.uri}}">{{post.title}}</a></li>
                        {% endfor %}
                    </ul>
                </div>
                {% endif %}

                {% if tags|not-empty %}
                <div id="tags">
                    <h3>Tags</h3>
                    <ul>
                        {% for tag in tags %}
                        <li><a href="{{tag.uri}}">{{tag.name}}</a></li>
                        {% endfor %}
                    </ul>
                </div>
                {% endif %}
            </div>
        </div>
    </div>
    <footer>Copyright &copy; {{today|date:yyyy}} {{author}}
        <p style="text-align: center;">Powered by <a href="http://cryogenweb.org">Cryogen</a></p></footer>
</div>
<script src="/assets/jquery.js"></script>
<script src="/assets/bootstrap.js"></script>
{% script "js/highlight.pack.js" %}
<script>hljs.initHighlightingOnLoad();</script>
{% if post.klipse %} {{post.klipse|safe}} {% endif %}
{% if page.klipse %} {{page.klipse|safe}} {% endif %}
<script src="/assets/bannerjs/banner.js"></script>
</body>
</html>
