{% extends "blognajd/base.html" %}
{% load flatblock_xtd_tags %}

{% block title %}{{ block.super }}&nbsp;&raquo;&nbsp;blog{% endblock %}

{% block extrahead %}
<link rel="alternate" type="application/rss+xml" title="Stories" href="{{ baseurl }}{% url 'stories-feed' %}">
{% endblock %}

{% block nav-sitename %}<a href="{% url 'index' %}">{{ usersettings.site_short_name }}</a>{% endblock %}

{% block class-nav-blog %}active{% endblock %}

{% block jumbotron %}
{% flatblock_xtd "jumbotron-blog" using "flatblocks_xtd/jumbotron.html" %}
{% endblock %}

{% block body %}
<div id="body-blog" class="row">
  <div id="story-list-blog-index" class="col-lg-11 col-md-11">
    {% if object_list %}
    {% for object in object_list %}
    {% include "blognajd/includes/story_blog.html" %}
    {% endfor %}
    {% else %}
    <h5>No story yet.</h5>
    {% endif %}
  </div>
</div>

{% if is_paginated %}
<nav>
  <ul class="pager">
    {% if page_obj.has_previous %}
    <li><a href="?page={{ page_obj.previous_page_number }}"><span aria-hidden="true">&larr;</span> older</a></li>
    {% else %}
    <li class="disabled"><a href="#"><span aria-hidden="true">&larr;</span> older</a></li>
    {% endif %}
    {% if page_obj.has_next %}
    <li><a href="?page={{ page_obj.next_page_number }}">newer <span aria-hidden="true">&rarr;</span></a></li>
    {% else %}
    <li class="disabled"><a href="#">newer <span aria-hidden="true">&rarr;</span></a></li>
    {% endif %}
  </ul>
</div>
{% endif %}

{% endblock %}
