Added fullscreening image
This commit is contained in:
parent
1e364529d3
commit
c5ef374135
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -1 +1,3 @@
|
|||
|
||||
.clickable{
|
||||
cursor:pointer
|
||||
}
|
|
@ -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">
|
||||
|
|
Loading…
Reference in New Issue