{% extends "with-sidebar.html" %}

{% block content %}
	{% for article in articles_page.object_list %}
		<!-- Post -->
		<article class="post medium">
			{% if article.image %}
			<div class="five alt columns alpha">
				<figure class="post-img media">
					<div class="mediaholder">
						<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">
							<img src="{{ SITEURL }}/images/{{ article.image }}" alt="{{ article.title}}"/>
							<div class="hovercover">
								<div class="hovericon"><i class="hoverlink"></i></div>
							</div>
						</a>
					</div>
				</figure>
			</div>
			{% endif %}
			<div class="{% if article.image %}seven{% else %}twelve{% endif %} columns">
				<section class="post-content">
					<header class="meta">
						<h2><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2>
						<ul>
							<li>By {% for author in article.authors %}<a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>{% if not loop.last %}, {% endif%}{% endfor %}</li>
							<li>{{ article.locale_date }}</li>
							<li><a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a></li>
						</ul>
					</header>
					<p>
						{% if SHOW_FULL_ARTICLE %}
							{{ article.content }}
						{% elif article.summary %}
							{{ article.summary|truncate(280) }}
						{% endif %}
	        		</p>
					<a href="{{ SITEURL }}/{{ article.url }}" class="button color">Read More</a>
				</section>
			</div>
			<div class="clearfix"></div>
		</article>
	{% endfor %}

	{% if DEFAULT_PAGINATION %}
	<!-- Pagination -->
	<nav class="pagination">
		<ul>
			<li>
			    {% if articles_page.has_previous() %}
			        <a href="{{ SITEURL }}/{{ articles_previous_page.url }}">Newest Posts &rarr;</a>
			    {% endif %}
			    {% if articles_page.has_next() %}
			        <a href="{{ SITEURL }}/{{ articles_next_page.url }}">Older Posts &rarr;</a>
			    {% endif %}
			</li>
			<!-- Page {{ articles_page.number }} / {{ articles_paginator.num_pages }} -->
		</ul>
		<div class="clearfix"></div>
	</nav>
	{% endif %}
{% endblock content %}

{% block pv %}
	{{ super() }} 
	{{ page.pageview }}
{% endblock pv %}