<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	{{with .board -}}
		{{with $.op -}}
			{{if ne $.op.Subject "" -}}<title>/{{$.board.Dir}}/ - {{truncateString $.op.Subject 20 true}}</title>
			{{- else if ne $.op.MessageHTML "" -}}<title>/{{$.board.Dir}}/ - {{truncateString $.op.MessageText 20 true}}</title>
			{{- else}}<title>/{{$.board.Dir}}/ - #{{$.op.ID}}</title>{{end}}
		{{- else}}<title>/{{$.board.Dir}}/ - {{$.board.Title}}</title>{{end}}
	{{- else}}<title>{{.site_config.SiteName}}</title>{{end}}
	<link rel="stylesheet" href="{{$.webroot}}css/global.css" />
	<link id="theme" rel="stylesheet" href="{{.webroot}}css/{{.board.DefaultStyle}}" />
	<link rel="shortcut icon" href="{{.webroot}}favicon.png">
	<script type="text/javascript" src="{{$.webroot}}js/consts.js"></script>
	<script type="text/javascript" src="{{$.webroot}}js/gochan.js"></script>
</head>
<body>
<div id="topbar">
	{{range $i, $board := .boards}}<a href="{{$.webroot}}{{$board.Dir}}/" class="topbar-item">/{{$board.Dir}}/</a>{{end}}
</div>