<!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>
		<title>{{ title }} - Downpour</title>
		<link rel="stylesheet" type="text/css" href="/media/css/style.css"/>
		<link rel="shortcut icon" href="/media/images/downpour-icon.png"/>
		<script language="javascript" src="/media/js/common.js"></script>
		{% block head %}
		{% endblock %}
	</head>
	<body>
		<div id="header">
			<div id="logo"><a href="/"><img src="/media/images/downpour-logo.png"/></a></div>
			<div id="account">
				{% if user %}
					Logged in as {{ user.username }}
					- <a href="/account/edit">My Account</a>
					- <a href="/account/logout">Logout</a>
				{% else %}
					Not logged in
					- <a href="/account/login">Login</a>
				{% endif %}
			</div>
		</div>
		<div id="main">
			<div id="navigation">
				<ul>
					<li{% if section == 'downloads' %} class="active"{% endif %}><a href="/downloads/">My Downloads</a></li>
					<li{% if section == 'feeds' %} class="active"{% endif %}><a href="/feeds/">My Feeds</a></li>
					<li{% if section == 'libraries' %} class="active"{% endif %}><a href="/libraries/">My Libraries</a></li>
					<li><hr /></li>
					<li{% if section == 'browse' %} class="active"{% endif %}><a href="/browse/">Media Browser</a></li>
					<li{% if section == 'search' %} class="active"{% endif %}><a href="/search/">Search</a></li>
					<li{% if section == 'status' %} class="active"{% endif %}><a href="/status/">Status</a></li>
					<li><hr /></li>
					<li{% if section == 'history' %} class="active"{% endif %}><a href="/downloads/history/">Download History</a></li>
					{% if user and user.admin %}
					<li{% if section == 'work' %} class="active"{% endif %}><a href="/work/">Download Cache</a></li>
					<li{% if section == 'users' %} class="active"{% endif %}><a href="/users/">Users</a></li>
					<li{% if section == 'settings' %} class="active"{% endif %}><a href="/settings/">Settings</a></li>
					{% endif %}
				</ul>
			</div>
			<div id="content">
				{% if unsupported %}
				<div class="warning"><b>Unsupported Browser</b><br />
					Your browser does not support some HTML features used
					in Downpour.  Please upgrade to a newer browser.</div>
				{% endif %}
				{% block heading %}
				<h1>{{ title }}</h1>
				{% endblock %}
				{% block body %}
				{% endblock %}
				<br clear="all"/>
			</div>
		</div>
		<div id="footer">
			Downpour v{{ version }}
		</div>
	</body>
</html>
