@using zotanpw.Backend
@{
	var title = ViewData.ContainsKey("subtitle") ? $"zotan.pw >> {ViewData["title"]} >> {ViewData["subtitle"]}" : $"zotan.pw >> {ViewData["title"]}";
	if (string.IsNullOrEmpty(ViewData["og-title"] as string))
		ViewData["og-title"] = title;
}
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8"/>
	<meta http-equiv="X-UA-Compatible" content="chrome=1"/>
	<meta name="twitter:card" content="summary"/>
	<meta name="og:title" content="@ViewData["og-title"]"/>
	<meta name="og:description" content="@ViewData["og-desc"]"/>
	<meta name="og:site_name" content="@Html.Encode(ViewData["og-sitename"])"/>
	<meta name="og:image" content="@ViewData["og-image"]"/>

	<title>@title</title>

	<link rel="stylesheet" href="~/css/site.css?v=@Utils.LinkVersion"/>
	@await RenderSectionAsync("head", false)
	<environment include="Production">
		<script async defer data-website-id="06fcb20d-431a-4251-b6cb-859d9a7384ee" src="https://evilthirdparty.click/spyinator3000.js"></script>
	</environment>
</head>
<body>
<header>
	<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
		<div class="container">
			<h1>
				@{
					var path = Context.Request.Path.Value?.TrimStart('/').Split("/");
					var sublink = path?.Length >= 1 ? path[0] : "";
					var subsublink = path?.Length >= 2 ? path[1] : "";

					if (sublink.ToLowerInvariant().Equals("error")) {
						sublink = "";
					}
				}
				@if (ViewData.ContainsKey("subtitle")) {
					<span>
						<a href="/">zotan.pw</a> >> <a href="/@sublink">@ViewData["title"]</a> >> <a href="/@sublink/@subsublink">@ViewData["subtitle"]</a>
					</span>
				}
				else {
					<span>
						<a href="/">zotan.pw</a> >> <a href="/@sublink">@ViewData["title"]</a>
					</span>
				}
			</h1>
			@await RenderSectionAsync("postheader", false)
		</div>
	</nav>
</header>
<div class="container">
	<section id="main_content">
		@RenderBody()
	</section>
</div>

<div style="text-align: center;">
	@await RenderSectionAsync("prefooter", false)
	<p style="color: #666666">--- Served by @Environment.MachineName running <a class="footerlink" href="https://git.ztn.sh/zotan/zotan.pw-web/commit/@Utils.LinkVersion" target="_blank">zotan.pw-web @Utils.Version</a> on .NET @Environment.Version ---</p>
	@await RenderSectionAsync("postfooter", false)
</div>
</body>
</html>
