mirror of
https://github.com/hmaxnl/SharpRSS.git
synced 2024-09-20 01:54:20 +02:00
25 lines
961 B
Plaintext
25 lines
961 B
Plaintext
|
@inherits LayoutComponentBase
|
||
|
@layout BaseLayout
|
||
|
|
||
|
<CascadingValue Value="this">
|
||
|
<MudAppBar Color="Color.Primary">
|
||
|
<MudIconButton Icon="@Icons.Material.Filled.Menu" Color="Color.Inherit" Edge="Edge.Start" OnClick="@((e) => ToggleDrawerOpen())" />
|
||
|
<MudText Typo="Typo.h6">@AppText</MudText>
|
||
|
<MudSpacer/>
|
||
|
<MudIconButton Icon="@Icons.Custom.Brands.GitHub" Href="https://github.com/hmaxnl/SharpRSS"/>
|
||
|
<MudToggleIconButton @bind-Toggled="@BaseLayout.DarkTheme" Color="Color.Dark" ToggledColor="Color.Warning" Icon="@Icons.Material.Filled.DarkMode" ToggledIcon="@Icons.Material.Filled.LightMode"/>
|
||
|
</MudAppBar>
|
||
|
@Body
|
||
|
</CascadingValue>
|
||
|
|
||
|
@code {
|
||
|
[CascadingParameter]
|
||
|
public BaseLayout BaseLayout { get; set; } = null!;
|
||
|
public bool DrawerOpen { get; set; } = true;
|
||
|
public string AppText { get; set; } = "SharpRSS";
|
||
|
|
||
|
private void ToggleDrawerOpen()
|
||
|
{
|
||
|
DrawerOpen = !DrawerOpen;
|
||
|
}
|
||
|
}
|