Added fullscreening image

This commit is contained in:
BOT Alex 2023-05-15 22:11:01 +02:00
parent 1e364529d3
commit c5ef374135
3 changed files with 20 additions and 20 deletions

View File

@ -16,18 +16,23 @@
}
</style>
<MudOverlay @bind-Visible="isOverlayVisible" DarkBackground="true" AutoClose="true">
<MudPaper>
<MudText Class="pa-10">
<MudOverlay @bind-Visible="isOverlayVisible" Style="backdrop-filter:blur(5px)" DarkBackground="true" AutoClose="true">
<MudPaper Elevation="3" Class="rounded-xl">
<MudImage Class="rounded-xl" Elevation="4" Src="@GetImage(selectedImage)" Width="750" Height="750"/>
<MudContainer Class="pa-5 d-flex align-center justify-content-start">
<MudText>
Damn
</MudText>
<MudSpacer/>
<MudIconButton Class="pa-4" Icon="@Icons.Material.Filled.Star" Variant="Variant.Filled" Color="Color.Primary"> text </MudIconButton>
</MudContainer>
</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 < 25; i++)
@for (int i = 0; i < 200; i++)
{
int postId = (LoadedImages.Count > i) ? LoadedImages[i] : GetRandomImageNumber();
@ -47,18 +52,8 @@
@code {
public string Text { get; set; } = "????";
public string ButtonText { get; set; } = "Click Me";
public int ButtonClicked { get; set; }
public bool isOverlayVisible = false;
void ButtonOnClick()
{
ButtonClicked += 1;
Text = $"Awesome x {ButtonClicked}";
ButtonText = "Click Me Again";
}
public void OpenOverlay()
{
isOverlayVisible = true;
@ -100,8 +95,11 @@
RandomUsernames = (await Http.GetStringAsync("RandomUsernames.txt")).Split("\n");
}
int selectedImage = 0;
void ClickPost(int postImage)
{
Console.WriteLine(postImage);
selectedImage = postImage;
isOverlayVisible = true;
}
}

View File

@ -1 +1,3 @@

.clickable{
cursor:pointer
}

View File

@ -6,7 +6,7 @@
<MudAppBar Elevation="1">
<MudButton Variant="Variant.Filled" Color="Color.Primary" OnClick="AddUser">Primary</MudButton>
<MudSpacer />
<MudAvatar Style="cursor:pointer" @onclick="ToggleDrawer" Variant="Variant.Outlined" Color="Color.Success" Class="mr-n2">BT</MudAvatar>
<MudAvatar @onclick="ToggleDrawer" Variant="Variant.Outlined" Color="Color.Success" Class="mr-n2">BT</MudAvatar>
</MudAppBar>
<MudDrawer @bind-Open="@openContentDrawer" ClipMode="DrawerClipMode.Always" Breakpoint="Breakpoint.Lg" PreserveOpenState="false" Elevation="1" Variant="@DrawerVariant.Mini" OpenMiniOnHover="true">