mirror of
https://github.com/hmaxnl/SharpRSS.git
synced 2024-11-14 17:44:20 +01:00
29 lines
1.2 KiB
Plaintext
29 lines
1.2 KiB
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/>
|
|
<MudTooltip Text="Go to the source code on GitHub">
|
|
<MudIconButton Icon="@Icons.Custom.Brands.GitHub" Href="https://github.com/hmaxnl/SharpRSS" Target="_blank"/>
|
|
</MudTooltip>
|
|
<MudTooltip Text="@(BaseLayout.DarkTheme ? "Toggle to light mode" : "Toggle to dark mode")">
|
|
<MudToggleIconButton @bind-Toggled="@BaseLayout.DarkTheme" Color="Color.Dark" ToggledColor="Color.Warning" Icon="@Icons.Material.Filled.DarkMode" ToggledIcon="@Icons.Material.Filled.LightMode"/>
|
|
</MudTooltip>
|
|
</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;
|
|
}
|
|
} |