{% extends "stories/stories_base.html" %}
{% load add_attribute %}

{% block content %}
	{% if story_content.has_previous %}
		<h3>{{ story.headline }}</h3>
		<p><em>continued from page {{ story_content.previous_page_number }}</em></p>
	{% else %}
		<h1>{{ story.headline }}</h1>
		{% if story.subheadline %}<h2>{{ story.subheadline }}</h2>{% endif %}
		<p class="byline">By {{ story.author }}</p>
	{% endif %}
	{% for paragraph in story_content.object_list %}
		{% if forloop.first %}
			{{ paragraph|add_attribute:"class=dropcap"|safe }}
		{% else %}
			{{ paragraph|safe }}
		{% endif %}
	{% endfor %}
	{% if story_content.has_next %}
	    <p><a href="?page={{ story_content.next_page_number }}"><em>Story Continues &rarr;</em></a>
	{% endif %}
	<hr>
	<div class="pagination">
	    <span class="step-links">
	        {% if story_content.has_previous %}
	            <a href="?page={{ story_content.previous_page_number }}">previous</a>
	        {% endif %}

	        <span class="current">
	            Page {{ story_content.number }} of {{ story_content.paginator.num_pages }}.
	        </span>

	        {% if story_content.has_next %}
	            <a href="?page={{ story_content.next_page_number }}">next</a>
	        {% endif %}
	    </span>
	</div>
{% endblock %}