{{- template "page_header.html" map "global" . "pageTitle" $.siteConfig.SiteName "boardConfig" $.boardConfig "siteConfig" $.siteConfig "boards" $.boards "sections" $.sections "ban" $.ban}}
<div class="section-block banpage-block">
	<div class="section-title-block">
		<span class="section-title ban-title">{{if (.ban.BannedForever)}}YOU'RE PERMABANNED, IDIOT!{{else}}YOU ARE BANNED :({{end}}</span>
	</div>
	<div class="section-body">
		<div id="ban-info">{{if .ban.IsGlobalBan}}
			You are banned from posting on <span class="ban-boards">all boards</span> for the following reason:{{else}}
			You are banned from posting on <span class="ban-boards">{{.board.Dir}}</span> for the following reason:{{end}}
			<p class="reason">{{.ban.Message}}</p>
			Your ban was placed on <time datetime="{{formatTimestampAttribute .ban.IssuedAt}}" class="ban-timestamp">{{formatTimestamp .ban.IssuedAt}}</time> and will 
				{{- if .ban.Permanent}} <span class="ban-timestamp">not expire</span>
				{{- else}} expire on <time class="ban-timestamp" datetime="{{formatTimestampAttribute .ban.ExpiresAt}}">{{formatTimestamp .ban.ExpiresAt}}</time>
				{{- end}}.<br />
			Your IP address is <span class="ban-ip">{{.ip}}</span>.<br /><br />
			{{if .ban.CanAppeal}}You may appeal this ban:<br />
				<form id="appeal-form" action="{{webPath `/post`}}" method="POST">
					<input type="hidden" name="board" value="{{.board.Dir}}">
					<input type="hidden" name="banid" value="{{.ban.ID}}">
					<textarea rows="4" cols="48" name="appealmsg" id="postmsg" placeholder="Appeal message"></textarea>
					<input type="submit" name="doappeal" value="Submit" /><br />
				</form>
			{{- else}}You may <span class="ban-timestamp">not</span> appeal this ban.<br />{{end}}
		</div>
			{{- if .ban.BannedForever -}}
				<img id="banpage-image" src="{{webPath `static/permabanned.jpg`}}"/><br />
				<audio id="jack" preload="auto" autobuffer loop> 
					<source src="{{webPath `static/hittheroad.ogg`}}" />
					<source src="{{webPath `static/hittheroad.wav`}}" />
					<source src="{{webPath `static/hittheroad.mp3`}}" />
				</audio>
				<script type="text/javascript">
					document.getElementById("jack").play();
				</script>
			{{- end -}}
	</div>
</div>
{{template "page_footer.html" .}}