{% load static i18n wagtailcore_tags wagtailroutablepage_tags wagtailuserbar puput_tags %}
{% wagtailuserbar %}
<!DOCTYPE HTML>
<html>
<head>
    <title>{% block title %}{{ blog_page.title }}{% if blog_page.description %} | {{ blog_page.description }}{% endif %}{% endblock title %}</title>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <meta name="title" content="{% block meta_title %}{% if blog_page.seo_title %}{{ blog_page.seo_title }}{% else %}{{ blog_page.title }}{% endif %}{% endblock meta_title %}"/>
    <meta name="description" content="{% block meta_description %}{{ blog_page.search_description }}{% endblock meta_description %}"/>
    {% block social_share %}{% endblock social_share %}
    <link rel="canonical" href="{% block canonical %}{% canonical_url %}{% endblock canonical %}"/>

    <!--[if lte IE 8]><script src="assets/js/ie/html5shiv.js"></script><![endif]-->
    <!--[if lte IE 8]><link rel="stylesheet" href="assets/css/ie8.css" /><![endif]-->
    <link href='//fonts.googleapis.com/css?family=Roboto:400,300,300italic,100italic,100,400italic,500,500italic,700,900,700italic,900italic' rel='stylesheet' type='text/css'>
    {% block css %}
        <link rel='stylesheet' href="{% static 'puput/css/bootstrap.min.css' %}" type='text/css'/>
        <link rel="stylesheet" href="{% static 'puput/css/font-awesome.min.css' %}">
        <link rel="stylesheet" href="{% static 'puput/css/puput.css' %}"/>
    {% endblock %}
</head>
<body>
<div class="about">
    <div class="container">
        <section class="title-section">
            <h1 class="title-header">
                <a href="{% pageurl blog_page %}">{{ blog_page.title }}</a>
            </h1>
            <h2>{{ blog_page.description }}</h2>
        </section>
    </div>
</div>
<div class="container">
    <div class="row">
        <div class="col-sm-8 col-md-8">
            {% block content %}{% endblock content %}
            {% block extra_content %}{% endblock extra_content %}
        </div>

        <div class="col-sm-4 col-md-4">
            <div class="blog_sidebar">
                <div class="rss-sitemap">
                    <a href="{% feeds_url blog_page %}" target="_blank" title="RSS">
                         <i class="fa fa-rss-square"></i> <span>{% trans 'Feed RSS' %}</span>
                    </a>
                </div>
                <form name="search_form" class="search_form" method="get" action="{% routablepageurl blog_page "entries_search" %}">
                    <div class="input-group">
                         <input type="search" name="q" placeholder="{% trans 'Search' %}">
                         <span class="input-group-btn">
                            <button class="btn btn-default" type="submit"><i class="fa fa-search"></i></button>
                         </span>
                    </div>
                </form>

                {% if blog_page.display_last_entries %}
                    <ul class="sidebar">
                        <h4>{% trans 'Last Entries' %}</h4>
                        {% recent_entries blog_page.num_last_entries %}
                    </ul>
                {% endif %}
                {% if blog_page.display_popular_entries %}
                    <ul class="sidebar">
                        <h4>{% trans 'Popular Entries' %}</h4>
                        {% popular_entries blog_page.num_popular_entries %}
                    </ul>
                {% endif %}
                {% if blog_page.display_categories %}
                    <ul class="sidebar">
                        <h4>{% trans 'Categories' %}</h4>
                        {% categories_list %}
                    </ul>
                {% endif %}
                {% if blog_page.display_tags %}
                    <ul class="sidebar">
                        <h4>{% trans 'Tags' %}</h4>
                        {% tags_list %}
                    </ul>
                {% endif %}
                {% if blog_page.display_archive %}
                    <ul class="sidebar widget menu">
                        <h4>{% trans 'Archive' %}</h4>
                        {% archives_list %}
                    </ul>
                {% endif %}
            </div>
        </div>
    </div>
</div>
<div class="footer">

    <div class="footer_bottom">
        <div class="copy">
            <p>
                Powered by <a href="http://www.djangoproject.com" rel="nofollow">Django</a>,
                <a href="http://www.wagtail.io" rel="nofollow">Wagtail</a> and
                <a href="http://github.com/APSL/puput" rel="nofollow">Puput</a> |
                Design by <a href="http://www.templategarden.com" rel="nofollow">TemplateGarden</a>
            </p>
        </div>
    </div>
</div>
{% block js %}
    {% block extra_js %}
      <script src="{% static 'puput/js/jquery.min.js' %}"></script>
      <script src="{% static 'puput/js/puput.js' %}"></script>
    {% endblock extra_js %}
{% endblock js %}
</body>
</html>
