115 lines
3.9 KiB
Plaintext
115 lines
3.9 KiB
Plaintext
@inherits LayoutComponentBase
|
|
|
|
<MudThemeProvider Theme="@_theme" IsDarkMode="_isDarkMode" />
|
|
<MudPopoverProvider />
|
|
<MudDialogProvider />
|
|
<MudSnackbarProvider />
|
|
<MudLayout>
|
|
<MudAppBar Elevation="1">
|
|
<MudIconButton Icon="@Icons.Material.Filled.Menu" Color="Color.Inherit" Edge="Edge.Start" OnClick="@((e) => DrawerToggle())" />
|
|
<MudText Typo="Typo.h5" Class="ml-3">OnProfNext</MudText>
|
|
<MudSpacer />
|
|
<MudIconButton Icon="@(DarkLightModeButtonIcon)" Color="Color.Inherit" OnClick="@DarkModeToggle" />
|
|
<MudIconButton Icon="@Icons.Material.Filled.MoreVert" Color="Color.Inherit" Edge="Edge.End" />
|
|
</MudAppBar>
|
|
<MudDrawer id="nav-drawer" @bind-Open="_drawerOpen" ClipMode="DrawerClipMode.Always" Elevation="2">
|
|
<NavMenu />
|
|
</MudDrawer>
|
|
<MudMainContent Class="pt-16 pa-4">
|
|
@Body
|
|
</MudMainContent>
|
|
</MudLayout>
|
|
|
|
|
|
<div id="blazor-error-ui" data-nosnippet>
|
|
An unhandled error has occurred.
|
|
<a href="." class="reload">Reload</a>
|
|
<span class="dismiss">🗙</span>
|
|
</div>
|
|
|
|
@code {
|
|
private bool _drawerOpen = true;
|
|
private bool _isDarkMode = true;
|
|
private MudTheme? _theme = null;
|
|
|
|
protected override void OnInitialized()
|
|
{
|
|
base.OnInitialized();
|
|
|
|
_theme = new()
|
|
{
|
|
PaletteLight = _lightPalette,
|
|
PaletteDark = _darkPalette,
|
|
LayoutProperties = new LayoutProperties()
|
|
};
|
|
}
|
|
|
|
private void DrawerToggle()
|
|
{
|
|
_drawerOpen = !_drawerOpen;
|
|
}
|
|
|
|
private void DarkModeToggle()
|
|
{
|
|
_isDarkMode = !_isDarkMode;
|
|
}
|
|
|
|
private readonly PaletteLight _lightPalette = new()
|
|
{
|
|
Primary = "rgb(0,67,136)", // Basic Blue
|
|
Secondary = "rgb(0,166,226)", // Accent Blue
|
|
Tertiary = "rgb(63,63,63)", // Dark Grey
|
|
AppbarBackground = "rgb(0,67,136)", // Basic Blue for Appbar
|
|
AppbarText = "#ffffff",
|
|
Background = "rgb(249,249,249)", // Very light
|
|
Surface = "#ffffff",
|
|
DrawerBackground = "#ffffff",
|
|
TextPrimary = "rgb(63,63,63)", // Dark Grey
|
|
TextSecondary = "rgb(156,158,159)", // Dark Grey Abstufung 1
|
|
LinesDefault = "rgb(217,218,219)", // Dark Grey Abstufung 2
|
|
TableLines = "rgb(217,218,219)",
|
|
Divider = "rgb(217,218,219)",
|
|
ActionDefault = "rgb(156,158,159)",
|
|
Info = "rgb(0,166,226)" // Accent Blue
|
|
};
|
|
|
|
private readonly PaletteDark _darkPalette = new()
|
|
{
|
|
Primary = "rgb(128,161,195)", // Basic Blue Abstufung 1 (heller für DarkMode)
|
|
Secondary = "rgb(0,166,226)", // Accent Blue
|
|
Tertiary = "rgb(204,217,231)", // Basic Blue Abstufung 2
|
|
Surface = "rgb(63,63,63)", // Dark Grey
|
|
Background = "#1a1a1a", // Dunkler Hintergrund
|
|
BackgroundGray = "rgb(63,63,63)", // Dark Grey
|
|
AppbarText = "#ffffff",
|
|
AppbarBackground = "rgb(63,63,63)", // Appbar in Dark Grey
|
|
DrawerBackground = "rgb(63,63,63)", // Drawer in Dark Grey
|
|
ActionDefault = "rgb(217,218,219)", // Dark Grey Abstufung 2
|
|
ActionDisabled = "#9999994d",
|
|
ActionDisabledBackground = "#605f6d4d",
|
|
TextPrimary = "#ffffff",
|
|
TextSecondary = "rgb(217,218,219)", // Dark Grey Abstufung 2
|
|
TextDisabled = "#ffffff33",
|
|
DrawerIcon = "rgb(217,218,219)",
|
|
DrawerText = "rgb(217,218,219)",
|
|
GrayLight = "#2a2833",
|
|
GrayLighter = "#1e1e2d",
|
|
Info = "rgb(128,210,241)", // Accent Blue Abstufung 1
|
|
Success = "#3dcb6c",
|
|
Warning = "#ffb545",
|
|
Error = "#ff3f5f",
|
|
LinesDefault = "rgb(156,158,159)", // Dark Grey Abstufung 1
|
|
TableLines = "rgb(156,158,159)",
|
|
Divider = "rgb(156,158,159)",
|
|
OverlayLight = "#1e1e2d80",
|
|
};
|
|
|
|
public string DarkLightModeButtonIcon => _isDarkMode switch
|
|
{
|
|
true => Icons.Material.Rounded.AutoMode,
|
|
false => Icons.Material.Outlined.DarkMode,
|
|
};
|
|
}
|
|
|
|
|