diff --git a/Otakians/Pages/Posts.razor b/Otakians/Pages/Posts.razor index 01b7ab8..abd8112 100644 --- a/Otakians/Pages/Posts.razor +++ b/Otakians/Pages/Posts.razor @@ -126,12 +126,14 @@ List posts = new List(); private Random random = new Random(); - const int numImages = 211; + const bool useFoodImages = true; + const int numImagesAnime = 399; + const int numImages = 399; Post GetRandomPost() { int selectedPostNum; reselect: - selectedPostNum = random.Next(1, numImages); + selectedPostNum = random.Next(1, (useFoodImages) ? numImages : numImagesAnime); if (LoadedImages.Contains(selectedPostNum)) goto reselect; @@ -143,9 +145,14 @@ return selectedPost; } + string GetImage(int imageIndex) { - return $@"\images\AnimeImages\AnimeImage ({imageIndex}).jpeg"; + + if (!useFoodImages) + return $@"\images\AnimeImages\AnimeImage ({imageIndex}).jpeg"; + else + return $@"\images\Non-AnimeImages\Food ({imageIndex}).jpeg"; } protected override void OnAfterRender(bool firstRender) diff --git a/Otakians/wwwroot/images/Non-AnimeImages/2023-05-29T02-03-06.717Z/food_2A5ILB90.jpeg b/Otakians/wwwroot/images/Non-AnimeImages/2023-05-29T02-03-06.717Z/food_2A5ILB90.jpeg new file mode 100644 index 0000000..28a8d48 Binary files /dev/null and b/Otakians/wwwroot/images/Non-AnimeImages/2023-05-29T02-03-06.717Z/food_2A5ILB90.jpeg differ