Files
IntegryControlPanel_Blazor/IntegryControlPanel/IntegryControlPanel.Client/Layout/MainLayout.razor

110 lines
3.6 KiB
Plaintext

@inherits LayoutComponentBase
<MudThemeProvider Theme="MyCustomTheme"/>
<MudPopoverProvider/>
<MudDialogProvider/>
<MudSnackbarProvider/>
<CascadingAuthenticationState>
<MudLayout>
<MudAppBar Elevation="1">
<MudStaticNavDrawerToggle DrawerId="nav-drawer" Icon="@Icons.Material.Filled.Menu" Color="Color.Inherit" Edge="Edge.Start"/>
<MudText Typo="Typo.h5" Class="ml-3">Integry Control Panel</MudText>
<MudSpacer/>
<AuthorizeView>
<Authorized>
<MudText Typo="Typo.body2" Class="mr-4">
Benvenuto, @context.User.Identity?.Name
</MudText>
</Authorized>
</AuthorizeView>
<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>
</CascadingAuthenticationState>
<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;
MudTheme MyCustomTheme = new MudTheme()
{
PaletteLight = new PaletteLight()
{
Primary = "#4CAF50", // Verde Material (puoi usare anche #43A047 o #2E7D32 per più scuro)
Secondary = "#00BFA5", // Verde acqua moderno
Tertiary = "#8BC34A", // Verde lime di supporto
Background = "#FDFDFD",
Surface = "#FFFFFF",
AppbarBackground = "#FFFFFF",
AppbarText = "#212121",
DrawerBackground = "#F9F9F9",
DrawerText = "#212121",
DrawerIcon = "#4CAF50",
TextPrimary = "#212121",
TextSecondary = "#616161",
ActionDefault = "#4CAF50",
ActionDisabled = "#BDBDBD",
Divider = "#E0E0E0",
LinesDefault = "#E0E0E0",
TableLines = "#E0E0E0"
},
Typography = new Typography()
{
Default = new DefaultTypography()
{
FontFamily = ["Roboto", "Helvetica", "Arial", "sans-serif"],
FontSize = ".95rem",
FontWeight = "400",
LineHeight = "1.5"
},
H6 = new H6Typography()
{
FontSize = "1.1rem",
FontWeight = "500",
LetterSpacing = ".0156em"
},
Button = new ButtonTypography()
{
TextTransform = "none",
FontWeight = "500"
}
},
LayoutProperties = new LayoutProperties()
{
DefaultBorderRadius = "12px" // Flat ma leggermente smussato (stile Material You)
},
Shadows = new Shadow()
{
Elevation =
[
"none", // 0
"0px 1px 2px rgba(0,0,0,0.05)", // 1
"0px 2px 4px rgba(0,0,0,0.08)", // 2
"0px 4px 8px rgba(0,0,0,0.1)", // 3
"0px 8px 16px rgba(0,0,0,0.12)",// 4
"0px 12px 24px rgba(0,0,0,0.14)",// 5
// dal 6 al 24 puoi riciclare o tenere "none"
"none","none","none","none","none",
"none","none","none","none","none",
"none","none","none","none","none",
"none","none","none","none","none"
]
}
};
}