From c5ef3741356b0a493fd6ea99d7f58bfc037598e1 Mon Sep 17 00:00:00 2001 From: BOT Alex <44818698+MagicBOTAlex@users.noreply.github.com> Date: Mon, 15 May 2023 22:11:01 +0200 Subject: [PATCH] Added fullscreening image --- Otakians/Pages/Index.razor | 34 +++++++++++++++----------------- Otakians/Pages/Index.razor.css | 4 +++- Otakians/Shared/MainLayout.razor | 2 +- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Otakians/Pages/Index.razor b/Otakians/Pages/Index.razor index 7f079c8..e530763 100644 --- a/Otakians/Pages/Index.razor +++ b/Otakians/Pages/Index.razor @@ -16,18 +16,23 @@ } - - - - Damn - + + + + + + Damn + + + text + Show Overlay - @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; @@ -88,7 +83,7 @@ protected override void OnAfterRender(bool firstRender) { - + } // TODO: Add a "save post" button to each post. @@ -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; } } \ No newline at end of file diff --git a/Otakians/Pages/Index.razor.css b/Otakians/Pages/Index.razor.css index 5f28270..5a43898 100644 --- a/Otakians/Pages/Index.razor.css +++ b/Otakians/Pages/Index.razor.css @@ -1 +1,3 @@ - \ No newline at end of file +.clickable{ + cursor:pointer +} \ No newline at end of file diff --git a/Otakians/Shared/MainLayout.razor b/Otakians/Shared/MainLayout.razor index 0957e67..f50252f 100644 --- a/Otakians/Shared/MainLayout.razor +++ b/Otakians/Shared/MainLayout.razor @@ -6,7 +6,7 @@ Primary - BT + BT