

{% extends "pathed_content.html" %}

{% block extra_head %}
	<link rel="stylesheet" href="/static/directorystyle.css">
{%endblock%}

{%block content_article%}
	{% if subposts|length > 0 %}
		<table class="directory">
			<caption>Directory contents:</caption>
			<tr>
				<th></th>
				<th>Name</th>
				<th>Title</th>
				<th>Modified</th>
			</tr>
			{% for subpost in subposts %}
				<tr class="entry">
					<td>
						ICN
					</td>
					<td>
						<a href={{subpost.post_path}}>{{subpost.post_basename}}</a>
					</td>
					<td class="entry_title">
						{{ subpost.post_metadata.title }}
					</td>
					<td class="entry_update_time">
						{{ subpost.post_update_time }}
					</td>
				</tr>
			{% endfor %}
		</table>
	{%else%}
		<h4>This directory appears to be empty...</h4>
		<span>This shouldn't happen, sorry!</span>
	{% endif %}

	{% if post.readme.found %}
		{{ post.readme.post_content|markdown_to_html }}
	{% endif %}

{%endblock%}
