Renamed project to CCharLearn
This commit is contained in:
parent
a6f55347b8
commit
591c3307a9
233 changed files with 16 additions and 17 deletions
31
CCharLearn/Shared/MainLayout.razor
Normal file
31
CCharLearn/Shared/MainLayout.razor
Normal file
|
@ -0,0 +1,31 @@
|
|||
@using System.Text;
|
||||
@inherits LayoutComponentBase
|
||||
@inject NavigationManager navigator
|
||||
@inject Blazored.LocalStorage.ILocalStorageService localStorage
|
||||
|
||||
<MudLayout>
|
||||
<MudAppBar Elevation="0">
|
||||
@if (Program.CCharsLeft > 0)
|
||||
{
|
||||
<MudButton OnClick="()=>{navigator.NavigateTo(string.Empty); Program.CCharsLeft = 0;}" Variant="Variant.Outlined" Color="Color.Primary">Back</MudButton>
|
||||
<MudText Class="pl-8">@("CChars left: " + Program.CCharsLeft)</MudText>
|
||||
}
|
||||
<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;
|
||||
}
|
||||
|
||||
void OnUiUpdate() => StateHasChanged();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue