zotan.pw-web/Pages/Shared/_Layout.cshtml

68 lines
2.3 KiB
Plaintext
Raw Normal View History

2022-11-26 13:23:58 +01:00
@using zotanpw.Backend
2023-02-03 21:45:07 +01:00
@{
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;
}
2022-11-26 13:23:58 +01:00
<!DOCTYPE html>
2022-11-20 03:06:41 +01:00
<html lang="en">
<head>
<meta charset="utf-8"/>
2023-02-03 21:45:07 +01:00
<meta http-equiv="X-UA-Compatible" content="chrome=1"/>
2022-11-20 03:06:41 +01:00
<meta name="twitter:card" content="summary"/>
2023-02-03 21:45:07 +01:00
<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>
2022-11-21 21:47:11 +01:00
<link rel="stylesheet" href="~/css/site.css?v=@Utils.LinkVersion"/>
2023-02-03 21:45:07 +01:00
@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>
2022-11-20 03:06:41 +01:00
</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>
2022-11-20 20:48:22 +01:00
@{
var path = Context.Request.Path.Value?.TrimStart('/').Split("/");
2022-11-26 14:09:03 +01:00
var sublink = path?.Length >= 1 ? path[0] : "";
var subsublink = path?.Length >= 2 ? path[1] : "";
if (sublink.ToLowerInvariant().Equals("error")) {
sublink = "";
}
2022-11-20 20:48:22 +01:00
}
@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>
}
2022-11-20 03:06:41 +01:00
</h1>
2022-11-26 03:34:13 +01:00
@await RenderSectionAsync("postheader", false)
2022-11-20 03:06:41 +01:00
</div>
</nav>
</header>
<div class="container">
<section id="main_content">
@RenderBody()
</section>
</div>
2022-11-20 17:00:51 +01:00
<div style="text-align: center;">
@await RenderSectionAsync("prefooter", false)
2022-11-20 03:06:41 +01:00
<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>
2022-11-20 17:00:51 +01:00
@await RenderSectionAsync("postfooter", false)
2022-11-20 03:06:41 +01:00
</div>
</body>
2022-12-13 01:09:16 +01:00
</html>