Files
Swarm/DysonNetwork.Sphere/Pages/Shared/_Layout.cshtml
2025-07-10 01:53:44 +08:00

51 lines
1.8 KiB
Plaintext

@using DysonNetwork.Sphere.Auth
<!DOCTYPE html>
<html lang="en" class="h-full">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>@ViewData["Title"]</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=Noto+Sans+Mono:wght@100..900&family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap"
rel="stylesheet">
<link rel="stylesheet" href="~/css/styles.css" asp-append-version="true"/>
<link
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200"
rel="stylesheet"
/>
</head>
<body class="h-full bg-base-200">
<header class="navbar bg-base-100/35 backdrop-blur-md shadow-xl fixed left-0 right-0 top-0 z-50 px-5">
<div class="flex-1">
<a class="btn btn-ghost text-xl">Solar Network</a>
</div>
<div class="flex-none">
<ul class="menu menu-horizontal px-1">
@if (Context.Request.Cookies.TryGetValue(AuthConstants.CookieTokenName, out _))
{
<li><a href="/web/account/profile">Profile</a></li>
<li>
<form method="post" asp-page="/Account/Profile" asp-page-handler="Logout">
<button type="submit">Logout</button>
</form>
</li>
}
else
{
<li>
<a href="/web/auth/login"><span class="material-symbols-outlined">login</span></a>
</li>
}
</ul>
</div>
</header>
<main class="h-full pt-16">
@RenderBody()
</main>
@await RenderSectionAsync("Scripts", required: false)
</body>
</html>