mirror of
https://github.com/hmaxnl/SharpRSS.git
synced 2024-11-09 23:44:20 +01:00
33 lines
1003 B
Plaintext
33 lines
1003 B
Plaintext
@inherits LayoutComponentBase
|
|
|
|
<MudThemeProvider @bind-IsDarkMode="@_isDarkTheme" Theme="_theme"/>
|
|
<MudDialogProvider/>
|
|
<MudSnackbarProvider/>
|
|
|
|
|
|
<PageTitle>SharpRSS.Blazor</PageTitle>
|
|
|
|
<MudLayout>
|
|
<MudAppBar>
|
|
<MudIconButton Icon="@Icons.Material.Filled.Menu" Color="Color.Inherit" Edge="Edge.Start" OnClick="@((e) => ToggleDrawer())"/>
|
|
<MudText Typo="Typo.h6">SharpRSS</MudText>
|
|
<MudSpacer/>
|
|
<MudToggleIconButton @bind-Toggled="_isDarkTheme" Icon="@Icons.Material.Filled.DarkMode" ToggledIcon="@Icons.Material.Filled.LightMode"/>
|
|
</MudAppBar>
|
|
<MudDrawer @bind-Open="@_drawerOpen" ClipMode="DrawerClipMode.Always">
|
|
<MudNavLink Href="/" Icon="@Icons.Material.Filled.Home">Home</MudNavLink>
|
|
</MudDrawer>
|
|
<MudMainContent>
|
|
@Body
|
|
</MudMainContent>
|
|
</MudLayout>
|
|
|
|
@code
|
|
{
|
|
readonly MudTheme _theme = new MudTheme();
|
|
bool _drawerOpen = true;
|
|
bool _isDarkTheme = true;
|
|
|
|
void ToggleDrawer() => _drawerOpen = !_drawerOpen;
|
|
}
|