{% extends "base.html" %}

{% block body-class %}blog-site{% endblock %}
{% block html-class %}blog-site{% endblock %}

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

{% block page-description %}{% endblock %}
{% block rochester-made %}{% endblock %}
{% block keyboard-shortcuts %}{% endblock %}
{% block olark %}{% endblock %}
{% block js %}
        {{ block.super }}
        window.blog_post = true;
        {% if blog_user.profile.gittip_username %}
            window.gittip_username = '{{ blog_user.profile.gittip_username }}';
        {% endif %}
{% endblock %}

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

{% block header %}
    <header class="main">
        <div class="inner group">
            <h1>
                <a href="/">
                    {% if blog_user.profile.blog_title %}
                        {{ blog_user.profile.blog_title }}
                    {% else %}
                        {{ blog_user.username }}
                    {% endif %}
                </a>
            </h1> 
        </div>
    </header>
{% endblock %}
{% block sub-header %}
    <header class="sub">
        <div class="inner group">
            <ul class="bcrumb group">
                <li class="prompt">//</li>
                <li><a href="/">blog</a></li>
                {% block breadcrumb %}{% endblock %}
                <li class="rss">
                    <a href="/?rss">RSS</a>
                </li>
            </ul>
        </div>
    </header>
{% endblock %}
{% block aside %}
    <aside class="main">
        {% if sidebar %}
            <section class="sidebar">
                {{ sidebar.stylized|safe }}
            </section>
        {% endif %}
        {% if blog_user.profile.google_ad_client %}
            <div class="google-ads">
                <script type="text/javascript">
                    google_ad_client = '{{ blog_user.profile.google_ad_client }}';
                    google_ad_slot = '{{ blog_user.profile.google_ad_slot }}';
                    google_ad_width = {{ blog_user.profile.google_ad_width }};
                    google_ad_height = {{ blog_user.profile.google_ad_height }};
                </script>
                <script type="text/javascript" src="//pagead2.googlesyndication.com/pagead/show_ads.js"></script>
            </div>
        {% endif %}
        {% if not blog_user.profile.is_pro %}
            <nav class="footer {% if sidebar %}with-sidebar{% endif %}">
                <ul class="powered">
                    <li class="snipt"><a href="https://snipt.net/blogging/">Blog powered by Snipt</a></li>
                </ul>
            </nav>
        {% endif %}
    </aside>
{% endblock %}
