<html>
	<head>
		<title>{{title}}</title>
		<link rel="stylesheet" media="screen" href="/static/global.css" />
	</head>
	<body>
		<main>
			<nav>
				<table>
					<tr>
						<td><a href="/posts">Posts</a></td>
						<td><a href="/users">Users</a></td>
					</tr>
				</table>
				<table>
					<tr>
						{% if login %}
						<td><a href="/users/{{login_username}}">{{login_username}}</a></td>
						<td><a href="/action/logout">logout</a></td>
						{% else %}
						<td><a href="/login">login</a></td>
						<td><a href="/signup">signup</a></td>
						{% end %}
					</tr>
				</table>
			</nav>

			<article>
				<h1>{{title}} (by {{author}})</h1>
				<p>{{content}}</p>

				{% if login %}
				<form action="/posts/{{id}}/comments" method="POST">
					<textarea name="content" placeholder="comment"></textarea>
					<input type="submit" value="comment" />
				</form>
				{% end %}

				<table>
				{% for comment in comments %}
					<tr>
						<td>{{comment.author}}:</td>
						<td>{{comment.content}}</td>
					</tr>
				{% end %}
				</table>
			</article>
		</main>
	</body>
</html>