LearnChineseSimplified/LearningChineseFixed/Shared/MainLayout.razor

30 lines
1003 B
Plaintext
Raw Normal View History

2023-06-27 11:48:18 +02:00
@using System.Text;
@inherits LayoutComponentBase
@inject NavigationManager navigator
@inject Blazored.LocalStorage.ILocalStorageService localStorage
<MudLayout>
<MudAppBar Elevation="0">
@if (Program.CCharsLeft > 0)
{
<MudText>@("CChars left: " + Program.CCharsLeft)</MudText>
}
2023-06-27 11:48:18 +02:00
<MudSpacer />
<MudIconButton Icon="@Icons.Custom.Brands.MudBlazor" Color="Color.Inherit" Link="https://mudblazor.com/" Target="_blank" />
<MudIconButton Icon="@Icons.Custom.Brands.LinkedIn" Color="Color.Inherit" Link="https://www.linkedin.com/in/zhentao-wei-3a3a0a182/" Target="_blank" />
</MudAppBar>
<MudMainContent>
<MudContainer MaxWidth="MaxWidth.Large" Style="height: 90vh;" Class="pt-2">
@Body
</MudContainer>
</MudMainContent>
</MudLayout>
@code {
protected override async Task OnInitializedAsync()
{
Program.UpdateUiEvent += OnUiUpdate;
}
2023-06-27 11:48:18 +02:00
void OnUiUpdate() => StateHasChanged();
2023-06-27 11:48:18 +02:00
}