{% load i18n %}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
	<meta http-equiv="Content-Type" content="application/xhtml+xml" />
	<title>{% if feed %}{{ feed.title }} - {% endif %}{{ site.title }}</title>
	<link rel="stylesheet" href="{{ media_url }}/default.css" type="text/css"/>
	<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="{{ site.url }}/feed/rss/" />
	{% block extrastyle %}{% endblock %}
	{% block extrahead %}{% endblock %}
</head>

<body>


<div id="header">

<div class="tit"><h1><a href="{{ site.url }}" title="{% if feed %}{{ feed.title }} - {% endif %}{{ site.title }}">{% if feed %}{{ feed.shortname }} - {% endif %}{{ site.title }}</a></h1></div>

<div class="subfeeds"></div>

<div class="buttons">
	<a href="{{ site.url }}/syndication/atom{{ url_suffix }}/" title="Atom 1.0 feed">
		<img src="{{ media_url }}/button-atom.png"/></a>
	<a href="{{ site.url }}/syndication/rss{{ url_suffix }}/" title="RSS 2.0 feed">
		<img src="{{ media_url }}/button-rss.png"/></a>
	<a href="{{ site.url }}/syndication/opml/" title="OPML"><img src="{{ media_url }}/button-opml.png"/></a>
	<a href="{{ site.url }}/syndication/foaf/" title="FOAF"><img src="{{ media_url }}/button-foaf.png"/></a>
</div>

</div>


<div id="container">


<div id="center" class="column">

{% for item in object_list %}

{% with item.date_modified|date:"F j, Y" as date_key %}
{% ifchanged item.feed.id date_key %}
{% if not forloop.first %}
	<br class="clear"/>
</div> {# /.channel #}
{% endif %}
{% endifchanged %}

{% ifchanged date_key %}
<h1>{{ item.date_modified|date:"F j, Y" }}</h1>
{% endifchanged %}

{% ifchanged item.feed.id date_key %}
<div class="channel">
	<h2><a href="{{ item.feed.link }}" title="{{ item.feed.title }}">{{ item.feed.shortname }}</a></h2>
{% endifchanged %}
{% endwith %}

	<div class="entry">
		<h3><a href="{{ item.link }}">{% if item.title %}{{ item.title }}
					{% else %}{{ item.subscriber.name }}{% endif %}</a></h3>
		<div class="content">
		{{ item.content|safe }}
		</div> {# /.content #}
		<p class="date"><a href="{{ item.link }}" title="{% trans "Author link" %}">{% if item.author %}{% blocktrans with item.author as author %}by {{ author }} at{% endblocktrans %}{% endif %}{{ item.date_modified|date:"g:i A" }}</a>{% for tag in item.qtags %}{% if forloop.first %} {% trans "under" %} {% endif %}<a href="{{ site.url }}/tag/{{ tag.name }}" title="Tag">{{ tag.name }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}
		{% if item.comments %}<a href="{{ item.comments }}" title="{% trans "Comments" %}">({% trans "Comments" %})</a> {% endif %}
		</p>
	</div> {# /.entry #}

{% if forloop.last %}
	<br class="clear"/>
</div> {# /.channel #}
{% endif %}

{% endfor %}

</div> {# /#center #}


{% if false %}
<div id="left" class="column">
<h2>{% trans "Tag soup" %}</h2>
<p id="cloud">
{% for tag in tagcloud %}
	<a
		href="{{ site.url }}/{{ url_suffix }}"
		title="{% blocktrans count tag.count as posts %}{{ posts }} post{% plural %}{{ posts }} posts{% endblocktrans %}"
		class="cloud_{{ tag.weight }}">{{ tag.tagname }}</a>
{% endfor %}
</p>
</div> {# /#left #}
{% endif %}


</div> {# /#container #}


<div id="footer">
{% if site.welcome %}
<div class="welcome">
<h2>{% trans "Welcome" %}</h2>
{{ site.welcome|safe }}
</div>
{% endif %}
{% if site.greets %}
<div class="credits">
<h2>{% trans "Credits" %}</h2>
{{ site.greets|safe }}
</div>
{% endif %}

<p class="paginator clear">
	Page {{ page }} of {{ pages }} (
	{% blocktrans count hits as posts %}{{ posts }} post{% plural %}{{ posts }} posts{% endblocktrans %}
	) <br/>
{% if has_previous %}<a href="?page={{ previous }}">&lt;&lt; {% trans "Back" %}</a>{% endif %} {% if has_next %}<a href="?page={{ next }}">{% trans "Forward" %} &gt;&gt;</a>{% endif %}</p>
</div>


<div class="subfeeds_dd">
	<p>Subfeeds:</p>
	{% for subsciber in subscribers %}
		<p><a href="{{ site.url }}/feed/{{ subsciber.feed.id }}/"
			title="{{ subsciber.feed.title }}">{{ subsciber.name }}</a></p>
	{% endfor %}
</div>


</body>

</html>
