{% load snipt_tags static %}

<!DOCTYPE html>
<html lang="en" class="{% block html-class %}{% endblock %}">
<head>

    <title>
        {% block page-title %}
            {% if blog_user.profile.blog_title %}
                {{ blog_user.profile.blog_title }}
            {% else %}
                {{ blog_user.username }}
            {% endif %}
        {% endblock %}
    </title>

    <meta charset="utf-8" />

    {% if 'page' in request.GET %}
        <meta name="robots" content="noindex, follow" />
    {% endif %}

    {% if debug %}
        <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/bootstrap.min.css" />
        <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/blog-themes/pro-adams/style.css" />
        <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/highlightjs-themes/tomorrow.css" />
        <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/themes.css" />
    {% else %}
        <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/pro.css?26" />
    {% endif %}

    <link rel="shortcut icon" href="{{ STATIC_URL }}img/blog-favicon.ico" >

    {% if custom_css %}
        <style type="text/css">
            {{ custom_css.code }}
        </style>
    {% endif %}

    <!--[if IE]>
        <style type="text/css">
            .group {
                display: block;
                zoom: 1;
            }
        </style>
    <![endif]-->

    <script type="text/javascript" src="{{ STATIC_URL }}js/libs/jquery.min.js"></script>
    <script type="text/javascript" src="{{ STATIC_URL }}js/libs/jquery-ui.min.js"></script>

</head>

<body class="{% block body-class %}{% endblock %}">

    <div class="frame">
        <div class="left-y ruler"></div>
        <div class="right-y ruler"></div>
        {% block header %}
            <header class="main">
                <div class="bio">
                    <a class="name" href="/">
                        {% if blog_user.profile.blog_title %}
                            {{ blog_user.profile.blog_title }}
                        {% else %}
                            {{ blog_user.username }}
                        {% endif %}
                    </a>
                    {% if header %}
                        {{ header.stylized|safe }}
                    {% endif %}
                </div>
            </header>
        {% endblock %}
        <section class="main group">
            <section class="content group">
                {% block content %}{% endblock %}
            </section>
            <aside class="main">
                {% if sidebar %}
                    {{ sidebar.stylized|safe }}
                {% endif %}
                {% if snipts %}
                    <section class="module snipts">
                        <h1>Recent blog posts</h1>
                        <ul>
                            {% for snipt in snipts|slice:":3" %}
                                <li><a href="{{ snipt.get_full_absolute_url }}">{{ snipt.title }}</a></li>
                            {% endfor %}
                        </ul>
                    </section>
                {% endif %}
                {% if normal_snipts %}
                    <section class="module snipts">
                        <h1>Recent snipts</h1>
                        <ul>
                            {% for snipt in normal_snipts %}
                                <li><a href="{{ snipt.get_full_absolute_url }}">{{ snipt.title }}</a></li>
                            {% endfor %}
                        </ul>
                    </section>
                {% endif %}
            </aside>
        </section>
    </div>

    <script type="text/javascript" src="{{ STATIC_URL }}js/pro-all.min.js?2"></script>

    {% include 'analytics.html' %}

</body>
</html>
