Add scroll to top button to main layout
This commit is contained in:
parent
8750436f70
commit
87e61bd77c
@ -113,10 +113,6 @@
|
|||||||
</MudStack>
|
</MudStack>
|
||||||
</MudItem>
|
</MudItem>
|
||||||
</MudGrid>
|
</MudGrid>
|
||||||
|
|
||||||
<MudScrollToTop>
|
|
||||||
<MudFab Color="Color.Secondary" Icon="@Icons.Filled.ArrowCircleUp"/>
|
|
||||||
</MudScrollToTop>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
@ -26,14 +26,16 @@
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
<MudItem xs="12">
|
<MudItem xs="12">
|
||||||
<MudTabs Elevation="0" Border="true" Rounded="true" ApplyEffectsToContainer="true" PanelClass="py-6">
|
<MudTabs Elevation="0" Border="true" Rounded="true" ApplyEffectsToContainer="true" Outlined="true" Class="mb-10">
|
||||||
@foreach (var difficulty in Enum.GetValues<Difficulty>())
|
@foreach (var difficulty in Enum.GetValues<Difficulty>())
|
||||||
{
|
{
|
||||||
@if (difficulty is not Difficulty.None)
|
@if (difficulty is not Difficulty.None)
|
||||||
{
|
{
|
||||||
<MudTabPanel Text="@GetDifficultyTitle(difficulty)" Icon="@GetDifficultyIcon(difficulty)">
|
<MudTabPanel Text="@GetDifficultyTitle(difficulty)"
|
||||||
|
Icon="@GetDifficultyIcon(difficulty)">
|
||||||
|
|
||||||
<MudDataGrid Items="@response.SongBestData.Where(data => data.Difficulty == difficulty)"
|
<MudDataGrid Items="@response.SongBestData.Where(data => data.Difficulty == difficulty)"
|
||||||
ColumnResizeMode="ResizeMode.Container">
|
ColumnResizeMode="ResizeMode.Container" RowsPerPage="25" Elevation="0">
|
||||||
<Columns>
|
<Columns>
|
||||||
<Column T="SongBestData" Field="@nameof(SongBestData.SongId)" Title="Song" StickyLeft="true" Class="clm-row-large">
|
<Column T="SongBestData" Field="@nameof(SongBestData.SongId)" Title="Song" StickyLeft="true" Class="clm-row-large">
|
||||||
<CellTemplate>
|
<CellTemplate>
|
||||||
@ -75,7 +77,7 @@
|
|||||||
</MudTooltip>
|
</MudTooltip>
|
||||||
</CellTemplate>
|
</CellTemplate>
|
||||||
</Column>
|
</Column>
|
||||||
<Column T="SongBestData" Field="@nameof(SongBestData.BestScoreRank)" Title="Best Rank">
|
<Column T="SongBestData" Field="@nameof(SongBestData.BestScoreRank)" Title="Best Rank" Sortable="false">
|
||||||
<CellTemplate>
|
<CellTemplate>
|
||||||
@if (context.Item.BestScoreRank is not ScoreRank.None)
|
@if (context.Item.BestScoreRank is not ScoreRank.None)
|
||||||
{
|
{
|
||||||
@ -96,6 +98,7 @@
|
|||||||
<MudDataGridPager T="SongBestData"/>
|
<MudDataGridPager T="SongBestData"/>
|
||||||
</PagerContent>
|
</PagerContent>
|
||||||
</MudDataGrid>
|
</MudDataGrid>
|
||||||
|
|
||||||
</MudTabPanel>
|
</MudTabPanel>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,10 @@
|
|||||||
<MudMainContent>
|
<MudMainContent>
|
||||||
<MudContainer MaxWidth="MaxWidth.ExtraLarge" Class="my-8">
|
<MudContainer MaxWidth="MaxWidth.ExtraLarge" Class="my-8">
|
||||||
@Body
|
@Body
|
||||||
|
|
||||||
|
<MudScrollToTop>
|
||||||
|
<MudFab Color="Color.Secondary" Icon="@Icons.Filled.ArrowCircleUp" />
|
||||||
|
</MudScrollToTop>
|
||||||
</MudContainer>
|
</MudContainer>
|
||||||
</MudMainContent>
|
</MudMainContent>
|
||||||
</MudLayout>
|
</MudLayout>
|
||||||
|
@ -8,6 +8,13 @@
|
|||||||
<base href="/" />
|
<base href="/" />
|
||||||
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet" />
|
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet" />
|
||||||
<link href="_content/MudBlazor/MudBlazor.min.css" rel="stylesheet" />
|
<link href="_content/MudBlazor/MudBlazor.min.css" rel="stylesheet" />
|
||||||
|
<style>
|
||||||
|
.difficulty-tab .mud-badge.mud-badge-top.right {
|
||||||
|
inset: auto auto calc(100% - 8px) 100%;
|
||||||
|
font-size: 10px;
|
||||||
|
height: 18px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user