{% extends "base.html" %}

{% block body %}

	<div class="header">
    	<h1>{{ feed.title }}.</h1>
	</div>

	<div id="entries" class="content">
		<div class="pure-g bandeau">
			<div class="pure-u-1-2">
				<a href="{{ url_for('index') }}">&#9775; {{ _('Liste des flux') }}</a>
			</div>
			<div class="pure-u-1-2">
				<a href="{{ feed.link }}">{{ _('Site') }}</a>
			</div>
		</div>

	{% for entry in entries %}
		<div class="grid-row pure-g-r"
			 data-url="{{ url_for('entry_view', feed_id=feed.id, entry_id=entry.id) }}">
			<div class="pure-u-6-24 entry-title navlink">
				<a href="{{ url_for('entry_view', feed_id=feed.id, entry_id=entry.id) }}">
					{{ entry.title }}
				</a>
			</div>

			<div class="pure-u-15-24 entry-content">
				{{ entry.content | striptags | truncate(200) }}
			</div>

			<div class="pure-u-3-24 time-ago">
				{{ entry.updated | humanize_date }}
			</div>
		</div>
	{% endfor %}
	</div>

	<div id="pagination">
	{% for num in range(nb_pages) %}
		<a href="{{ url_for('feed_view', feed_id=feed.id, page=num+1) }}"{% if num+1 == page %} class="current-page"{% endif %}>
			{{ num+1 }}
		</a>
	{% endfor %}
	</div>

{% endblock %}
