SharpRSS/WebSharpRSS/MainLayout.razor

53 lines
1.8 KiB
Plaintext
Raw Normal View History

@using System.Drawing
@using Color = MudBlazor.Color
2023-04-27 17:23:01 +02:00
@inherits LayoutComponentBase
<MudThemeProvider @bind-IsDarkMode="@_darkTheme" Theme="_mainTheme"/>
2023-04-27 17:23:01 +02:00
<MudDialogProvider/>
<MudSnackbarProvider/>
2023-05-26 21:54:12 +02:00
<style>
.blur_transparency {
backdrop-filter: blur(16px) saturate(180%);
background: rgba(0,0,0,0.3);
}
.layout_image{
background-image: url('http://s1.picswalls.com/wallpapers/2016/06/10/best-4k-wallpaper_065236736_309.jpg');
height: 100%;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
background-attachment: fixed;
}
</style>
2023-04-27 17:23:01 +02:00
2023-05-26 21:54:12 +02:00
<MudLayout>
<MudAppBar Class="blur_transparency">
<MudIconButton Icon="@Icons.Material.Filled.Menu" Color="Color.Inherit" Edge="Edge.Start" OnClick="@((e) => DrawerToggle())"/>
2023-04-27 20:47:43 +02:00
<MudText Typo="Typo.h6">SharpRSS</MudText>
2023-05-26 21:54:12 +02:00
<MudSpacer/>
<MudToggleIconButton @bind-Toggled="@_darkTheme" Icon="@Icons.Material.Filled.LightMode" ToggledIcon="@Icons.Material.Filled.DarkMode"></MudToggleIconButton>
2023-05-26 21:54:12 +02:00
<MudIconButton Icon="@Icons.Custom.Brands.GitHub" Href="https://github.com/hmaxnl/SharpRSS" Target="_blank"></MudIconButton>
2023-04-27 17:23:01 +02:00
</MudAppBar>
<MudDrawer @bind-Open="@_drawerOpen" ClipMode="DrawerClipMode.Always">
<MudNavMenu>
<MudNavLink Href="/" Icon="@Icons.Material.Filled.Home">Home</MudNavLink>
<MudNavLink Href="/list?cid=" Icon="@Icons.Material.Filled.Power">All</MudNavLink>
</MudNavMenu>
2023-04-28 21:58:36 +02:00
<SideGuide/>
2023-04-27 17:23:01 +02:00
</MudDrawer>
<MudMainContent>
@Body
</MudMainContent>
</MudLayout>
@code {
readonly MudTheme _mainTheme = new MudTheme();
bool _darkTheme = true;
2023-04-27 17:23:01 +02:00
bool _drawerOpen = true;
void DrawerToggle()
{
_drawerOpen = !_drawerOpen;
}
}