{% apply spaceless %}
<!doctype html>
<html>
<head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
	<title>{{ settings.title }}</title>
	<link rel="stylesheet" media="screen" href="{{ config.url_stylesheet }}"/>
	<link rel="stylesheet" media="screen" href="{{ config.root }}{{ settings.css }}"/>
	{% if config.url_favicon %}<link rel="shortcut icon" href="{{ config.url_favicon }}" />{% endif %}
	{% if config.default_stylesheet.1 != '' %}<link rel="stylesheet" type="text/css" id="stylesheet" href="{{ config.uri_stylesheets }}{{ config.default_stylesheet.1 }}">{% endif %}
	{% if config.font_awesome %}<link rel="stylesheet" href="{{ config.root }}{{ config.font_awesome_css }}">{% endif %}
	{% include 'header.html' %}
</head>
<body>
	{{ boardlist.top }}
	<header>
	    <img class="icon" src="{{ settings.icon }}">
		<h1>{{ settings.title }}</h1>
		<div class="subtitle">{{ settings.subtitle }}</div>
	</header>
	{% if config.url_banner %}<img class="board_image" src="{{ config.url_banner }}" {% if config.banner_width or config.banner_height %}style="{% if config.banner_width %}width:{{ config.banner_width }}px{% endif %};{% if config.banner_width %}height:{{ config.banner_height }}px{% endif %}" {% endif %}alt="" />{% endif %}
	
	<div class="box-wrap">
	    <fieldset>
		<legend>Boards</legend>
		<ul>
			{% for board in boards %}
				<li class="boardlinksurl">
					<a href="{{ config.board_path|sprintf(board.uri) }}">
						{{ board.title|e }}
					</a>
				</li>
			{% endfor %}
		</ul>
	    </fieldset>
	    <br>
		{% if settings.description or settings.imageofnow or settings.quoteofnow or settings.videoofnow %}
			<div class="mainBox">
				<br>
				{% if settings.description %}
					<div class="description">{{ settings.description }}</div>
					<br>
				{% endif %}
				{% if settings.imageofnow %}
					<img class="imageofnow" src="{{ settings.imageofnow }}">
					<br>
				{% endif %}
				{% if settings.quoteofnow %}
					<div class="quoteofnow">{{ settings.quoteofnow }}</div>
					<br>
				{% endif %}
				{% if settings.videoofnow %}
					<iframe class="videoofnow" width="560" height="315" src="{{ settings.videoofnow }}"></iframe>
					<br>
				{% endif %}
			</div>
		{% endif %}
	
	    <div class="ban">
		{% if news|length == 0 %}
			<p style="text-align:center" class="unimportant">(No news to show.)</p>
		{% else %}
			{% for entry in news %}
				<h2 id="{{ entry.id }}">
					{% if entry.subject %}
						{{ entry.subject }}
					{% else %}
						<em>no subject</em>
					{% endif %}
					<span class="unimportant"> &mdash; by {{ entry.name }} at {{ entry.time|date(config.post_date, config.timezone) }}</span>
				</h2>
				<p>{{ entry.body }}</p>
			{% endfor %}
		{% endif %}
	    </div>
	    <h1>Recent Images</h1>
		<div class="box image">
			<ul>
				{% for post in recent_images %}
					<li>
						<a href="{{ post.link }}">
							<img src="{{ post.src }}" style="width:{{ post.thumbwidth }}px;height:{{ post.thumbheight }}px" alt="">
						</a>
					</li>
				{% endfor %}
			</ul>
		</div>
		<div class="mainBox">
			<h2>Latest Posts</h2>
			<ul>
				{% for post in recent_posts %}
					<li>
						<strong>{{ post.board_name }}</strong>: 
						<a href="{{ post.link }}">
							{{ post.snippet }}
						</a>
					</li>
				{% endfor %}
			</ul>
		</div>
		<div class="mainBox">
			<h2>Stats</h2>
			<ul>
				<li>Total posts: {{ stats.total_posts }}</li>
				<li>Unique posters: {{ stats.unique_posters }}</li>
				<li>Active content: {{ stats.active_content|filesize }}</li>
			</ul>
		</div>
	</div>
	
	<hr/>

	{% include 'footer.html' %}
	
</body>
</html>
{% endapply %}
