<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8">
	<title>Sanity {% block title %}{% endblock %}</title>
	<link rel="stylesheet" href="/static/css/screen.css" type="text/css" media="screen,projection" title="no title"/>
	<link rel="stylesheet" href="/static/css/print.css" type="text/css" media="print" title="no title"/>
	<!--[if lt IE 8]><link rel="stylesheet" href="/static/css/ie.css" type="text/css" media="screen,projection" title="no title"><![endif]-->
	<link rel="stylesheet" href="/static/css/main.css" type="text/css" media="screen,projection" title="no title"/>
	<script type="text/javascript" src="/static/js/jquery-1.4.2.min.js"></script>
	<script type="text/javascript" src="/static/js/site.js"></script>
</head>
<body>
<div class="container">
	<div class="span-18" id="header">
		<div class="span-6">
			<h1><a href="/">Sanity</a></h1>
		</div>
		<div class="span-12 last" id="navigation">
			<ul>
				{% if g.user %}
				<li><a href="{{ url_for('frontend.add_task')}}">Add</a></li>
				<li><a href="{{ url_for('user.edit')}}">{{ g.user.name }}</a></li>
					{% if g.user.admin %}
					<li><a href="{{ url_for('admin.index') }}">Admin</a></li>
					{% endif %}
				<li><a href="{{ url_for('user.logout') }}">Logout</a></li>
				{% endif %}
			</ul>
		</div>
	</div>
	{% with messages = get_flashed_messages() %}
		{% if messages %}
		 <div class="success span-18" id="flashes">
			<ul>
			{% for message in messages %}
			  <li>{{ message }}</li>
			{% endfor %}
			</ul>
		</div>
		{% endif %}
	{% endwith %}
	<div id="main" class="span-18">
	{% block body %}{% endblock %}
	</div>
	<div id="footer" class="span-18">
		<div class="span-10">
			<p>&copy; 2010 Aaron Toth. All Rights Reserved.</p>
		</div>
		<div class="span-8 last" id="flask">
			<a href="http://flask.pocoo.org/"><img
			   src="http://flask.pocoo.org/static/badges/powered-by-flask-s.png"
			   border="0"
			   alt="powered by Flask"
			   title="powered by Flask"></a>
		</div>
	</div>
</div>
</body>
</html>
