{% extends "blogs/themes/default/base.html" %}

{% load pagination_tags %}

{% block body-class %}{{ block.super }} blog-list{% endblock %}

{% block js %}
        {{ block.super }}
        window.detail = false;
{% endblock %}

{% block content %}
    <section class="snipts" id="snipts">
        {% autopaginate snipts 10 %}
        {% for snipt in snipts %}
            {% include "blogs/themes/default/snipt-list.html" %}
        {% empty %}
            <div class="empty-snipts">
                {{ blog_user.username }} has no public blog posts.
            </div>
        {% endfor %}
        {% paginate %}
    </section>
    <script type="text/javascript" id="disqus">
        var disqus_shortname = '{% firstof blog_user.profile.disqus_shortname "snipt-net" %}';
        {% if debug %}
            var disqus_developer = 1;
        {% endif %}
        (function () {
            var s = document.createElement('script'); s.async = true;
            s.type = 'text/javascript';
            s.src = 'https://' + disqus_shortname + '.disqus.com/count.js';
            (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
        }());
    </script>
    <script type="text/html" id="disqus-template">
        var disqus_shortname = 'snipt-net';
        {% if debug %}
            var disqus_developer = 1;
        {% endif %}

        (function () {
            var s = document.createElement('script'); s.async = true;
            s.type = 'text/javascript';
            s.src = 'https://' + disqus_shortname + '.disqus.com/count.js';
            (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
        }());
    </script>
{% endblock %}
