This commit is contained in:
BOT Alex 2023-05-11 22:14:39 +02:00
parent 607394c99a
commit 1e364529d3
1 changed files with 17 additions and 1 deletions

View File

@ -16,9 +16,18 @@
}
</style>
<MudOverlay @bind-Visible="isOverlayVisible" DarkBackground="true" AutoClose="true">
<MudPaper>
<MudText Class="pa-10">
Damn
</MudText>
</MudPaper>
</MudOverlay>
<MudButton Variant="Variant.Filled" Color="Color.Primary" OnClick="OpenOverlay">Show Overlay</MudButton>
<MudContainer Class="mt-16 px-8 overflow-hidden" MaxWidth="MaxWidth.False">
<MudGrid Spacing="6" Justify="Justify.Center">
@for (int i = 0; i < 100; i++)
@for (int i = 0; i < 25; i++)
{
int postId = (LoadedImages.Count > i) ? LoadedImages[i] : GetRandomImageNumber();
@ -41,6 +50,7 @@
public string Text { get; set; } = "????";
public string ButtonText { get; set; } = "Click Me";
public int ButtonClicked { get; set; }
public bool isOverlayVisible = false;
void ButtonOnClick()
{
@ -49,6 +59,12 @@
ButtonText = "Click Me Again";
}
public void OpenOverlay()
{
isOverlayVisible = true;
StateHasChanged();
}
List<int> LoadedImages = new List<int>();
private Random random = new Random();