35 lines
2.1 KiB
Plaintext
35 lines
2.1 KiB
Plaintext
@using System.Security.Claims
|
|
@inject ApplicationNavigation Navigation
|
|
@inject PlotLine.Data.IAppearanceRepository AppearancePreferences
|
|
@{
|
|
var userID = int.Parse(User.FindFirstValue(ClaimTypes.NameIdentifier)!);
|
|
var appearance = await AppearancePreferences.GetAsync(userID);
|
|
ViewData["ApplicationAppearance"] = appearance;
|
|
var theme = appearance.ThemeKey ?? ApplicationAppearance.DefaultTheme;
|
|
var tone = theme.EndsWith("-dark") ? "dark" : "light";
|
|
var navigation = await Navigation.BuildAsync(ViewData.Model, "Maps", Context.Request);
|
|
}
|
|
<!doctype html>
|
|
<html lang="en" data-workspace-detached="true" data-app-theme="@theme" data-bs-theme="@tone" data-theme="@tone">
|
|
<head>
|
|
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>@ViewData["Title"] · PlotDirector</title>
|
|
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
|
|
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
|
|
<link rel="stylesheet" href="~/css/plotline-theme.css" asp-append-version="true" />
|
|
<link rel="stylesheet" href="~/css/application-shell.css" asp-append-version="true" />
|
|
<link rel="stylesheet" href="~/css/application-context-menu.css" asp-append-version="true" />
|
|
<link rel="stylesheet" href="~/css/workspace-surface.css" asp-append-version="true" />
|
|
</head>
|
|
<body class="app-layout pd-detached-shell" data-pd-user-id="@User.FindFirstValue(ClaimTypes.NameIdentifier)" data-pd-project-id="@navigation.Project?.ProjectID">
|
|
<div class="pd-workspace-command-catalog" aria-hidden="true"><partial name="_ApplicationShell" model="navigation" /></div>
|
|
<main>@RenderBody()</main>
|
|
<partial name="_ConfirmationDialog" />
|
|
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
|
<script src="~/js/application-dialogs.js" asp-append-version="true"></script>
|
|
<script src="~/js/workspace-bridge.js" asp-append-version="true"></script>
|
|
<script src="~/js/application-context-menu.js" asp-append-version="true"></script>
|
|
@await RenderSectionAsync("Scripts", required:false)
|
|
</body>
|
|
</html>
|