<html>
	<head>
		<style>
			body, code {background-color:#222;}
			a {color:#227;}
			h1 {border-bottom-left-radius:25px; border-bottom-right-radius:25px;
				font-size:3em; margin:-20px auto -20px; padding:15px;
				text-align:center; width:250px;}
			h1, h2 {color:#211;}
			h1, .docs {font-family:monospace;
				text-rendering:optimizeLegibility;}
			h2 {margin-left:10px;}
			code, .docs, .links {border-radius:25px;}
			code {box-shadow:inset 4px 4px 4px #000; color: #fff; display:block;
				padding:10px 40px 20px; margin:20px;}
			.docs, h1, .links {background-color:#fff; box-shadow:4px 4px 4px #000;}
			.docs {margin:50px auto; max-width:600px; min-width:300px; padding:20px;}
			.links {position:fixed; margin:100px 0 0 -200px;
				padding: 20px 0 20px 40px; width:100px;}
			@media (max-width:1000px){
				.anchor {display:block; padding-top:10px;}
				.links {margin:0; padding:0; top:0; max-width:600px; width:auto;
					box-shadow:none; border-bottom:1px solid #000;
					border-radius:0;}
				.links li {display:inline;}
				h1 {margin-top:-10px;}
			}
		</style>
		<title>API Docs</title>
	</head>
	<body>
		<h1>API Docs</h1>
		<div class="docs">
		<ul class="links">
			{% for model in docs %}
			<li><a href="#{{model}}">{{model}}</a></li>
			{% endfor %}
		</ul>
		{% for model, functions in docs.iteritems %}
		<div class="model">
			<a class="anchor" name="{{model}}"><h2>{{model}}</h2></a>
			<ul>
				{% for name, function in functions.iteritems %}
				<li><a href="/api/{{model}}/{{name}}">{{name}}</a>
				<code>{{function|linebreaksbr}}</code></li>
				{% endfor %}
			</ul>
		</div>
		{% endfor %}
		</div>
	</body>
</html>
