From 6180be8ee707d798b473ed715bb043c740f6a22e Mon Sep 17 00:00:00 2001 From: Egamorf Date: Wed, 16 Apr 2025 01:17:05 +0200 Subject: [PATCH 1/6] Add game row --- .../Pages/Games/Components/GameBase.cs | 42 +++++++++++++++++++ .../Pages/Games/Components/GameRow.razor | 38 +++++++++++++++++ .../Pages/Games/Components/GameRow.razor.css | 1 + .../Games/{GameBase.razor => Game.razor} | 0 .../{GameBase.razor.cs => Game.razor.cs} | 2 +- .../{GameBase.razor.css => Game.razor.css} | 0 .../CreateStaticResourceKey.cs | 2 + .../GameIdeas.WebAPI/Files/GameIdeas.fr.json | 3 +- 8 files changed, 86 insertions(+), 2 deletions(-) create mode 100644 src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameBase.cs create mode 100644 src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor create mode 100644 src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor.css rename src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/{GameBase.razor => Game.razor} (100%) rename src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/{GameBase.razor.cs => Game.razor.cs} (97%) rename src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/{GameBase.razor.css => Game.razor.css} (100%) diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameBase.cs b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameBase.cs new file mode 100644 index 0000000..894a3a9 --- /dev/null +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameBase.cs @@ -0,0 +1,42 @@ +using GameIdeas.Shared.Dto; +using Microsoft.AspNetCore.Components; + +namespace GameIdeas.BlazorApp.Pages.Games.Components; + +public class GameBase : ComponentBase +{ + [Parameter] public GameDto GameDto { get; set; } = new(); + [Inject] public NavigationManager NavigationManager { get; set; } = default!; + + protected void HandleDetailClicked() + { + NavigationManager.NavigateTo($"/Game/Detail/{GameDto.Id}"); + } + + protected void HandlePlatformClicked(PlatformDto platform) + { + if (platform.Url != null) + { + NavigationManager.NavigateTo(platform.Url); + } + } + + protected string GetFormatedStorageSpace() + { + if (GameDto.StorageSpace == null) + { + return string.Empty; + } + + int quotien = (int)Math.Round((decimal)GameDto.StorageSpace) / 1000; + string unit = quotien switch + { + 0 => "Mo", + 1 => "Go", + 2 => "To", + _ => string.Empty + }; + + return $"{GameDto.StorageSpace % 1000:g1} {unit}"; + } +} diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor new file mode 100644 index 0000000..99fa5d3 --- /dev/null +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor @@ -0,0 +1,38 @@ +@using GameIdeas.BlazorApp.Shared.Constants +@inherits GameBase + +
+ + + @GameDto.Title + + @GameDto.ReleaseDate?.ToShortDateString() ?? @ResourcesKey.Unknown + +
+ @foreach (var platform in GameDto.Platforms ?? []) + { +
HandlePlatformClicked(platform))> + @platform.Label +
+ } +
+ +
+ @foreach (var tag in GameDto.Tags ?? []) + { +
+ @tag.Label +
+ } +
+ + @GetFormatedStorageSpace() + +
+ @GameDto.Interest + /5 +
+ + +
\ No newline at end of file diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor.css new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor.css @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/GameBase.razor b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Game.razor similarity index 100% rename from src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/GameBase.razor rename to src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Game.razor diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/GameBase.razor.cs b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Game.razor.cs similarity index 97% rename from src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/GameBase.razor.cs rename to src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Game.razor.cs index e356f4a..2f09114 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/GameBase.razor.cs +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Game.razor.cs @@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Components; namespace GameIdeas.BlazorApp.Pages.Games; -public partial class GameBase () +public partial class Game { [Inject] private IGameGateway GameGateway { get; set; } = default!; diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/GameBase.razor.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Game.razor.css similarity index 100% rename from src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/GameBase.razor.css rename to src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Game.razor.css diff --git a/src/GameIdeas/GameIdeas.Resources/CreateStaticResourceKey.cs b/src/GameIdeas/GameIdeas.Resources/CreateStaticResourceKey.cs index f39a66e..aa5b8fb 100644 --- a/src/GameIdeas/GameIdeas.Resources/CreateStaticResourceKey.cs +++ b/src/GameIdeas/GameIdeas.Resources/CreateStaticResourceKey.cs @@ -38,6 +38,7 @@ public class Translations (TranslationService translationService) public string ErrorCreateGame => translationService.Translate(nameof(ErrorCreateGame)); public string InvalidTitle => translationService.Translate(nameof(InvalidTitle)); public string InvalidInterest => translationService.Translate(nameof(InvalidInterest)); + public string Unknown => translationService.Translate(nameof(Unknown)); } public static class ResourcesKey @@ -84,4 +85,5 @@ public static class ResourcesKey public static string ErrorCreateGame => _instance?.ErrorCreateGame ?? throw new InvalidOperationException("ResourcesKey.ErrorCreateGame is not initialized."); public static string InvalidTitle => _instance?.InvalidTitle ?? throw new InvalidOperationException("ResourcesKey.InvalidTitle is not initialized."); public static string InvalidInterest => _instance?.InvalidInterest ?? throw new InvalidOperationException("ResourcesKey.InvalidInterest is not initialized."); + public static string Unknown => _instance?.Unknown ?? throw new InvalidOperationException("ResourcesKey.Unknown is not initialized."); } \ No newline at end of file diff --git a/src/GameIdeas/Server/GameIdeas.WebAPI/Files/GameIdeas.fr.json b/src/GameIdeas/Server/GameIdeas.WebAPI/Files/GameIdeas.fr.json index 0dcf122..30cf2c1 100644 --- a/src/GameIdeas/Server/GameIdeas.WebAPI/Files/GameIdeas.fr.json +++ b/src/GameIdeas/Server/GameIdeas.WebAPI/Files/GameIdeas.fr.json @@ -33,5 +33,6 @@ "PlaceholderAdd": "Ajouter un nouveau", "ErrorCreateGame": "Erreur lors de la Création d'un jeu", "InvalidTitle": "Le titre est incorrect", - "InvalidInterest": "L'interêt est incorrect'" + "InvalidInterest": "L'interêt est incorrect", + "Unknown": "Inconnu" } \ No newline at end of file -- 2.39.5 From c768c923973953bbbc5b11aa5ebb833bf4c07eb6 Mon Sep 17 00:00:00 2001 From: Maxime Adler Date: Wed, 16 Apr 2025 14:52:43 +0200 Subject: [PATCH 2/6] Fetch games --- .../Pages/Games/Components/GameBase.cs | 20 ++-------- .../Pages/Games/Components/GameRow.razor | 10 ++--- .../Pages/Games/Components/GameRow.razor.css | 40 ++++++++++++++++++- .../Games/Filter/AdvancedGameFilter.razor.css | 2 +- .../Pages/Games/Game.razor | 10 +++-- .../Pages/Games/Game.razor.cs | 23 +++++++++-- .../Pages/Games/Game.razor.css | 9 +++-- .../Pages/Games/Gateways/GameGateway.cs | 13 ++++++ .../Pages/Games/Gateways/IGameGateway.cs | 1 + .../Shared/Constants/Endpoints.cs | 6 ++- .../Exceptions/GameNotFoundException.cs | 3 ++ .../CreateStaticResourceKey.cs | 2 + .../Controllers/GameController.cs | 2 +- .../GameIdeas.WebAPI/Files/GameIdeas.fr.json | 4 +- 14 files changed, 110 insertions(+), 35 deletions(-) create mode 100644 src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Exceptions/GameNotFoundException.cs diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameBase.cs b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameBase.cs index 894a3a9..68229fb 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameBase.cs +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameBase.cs @@ -13,14 +13,6 @@ public class GameBase : ComponentBase NavigationManager.NavigateTo($"/Game/Detail/{GameDto.Id}"); } - protected void HandlePlatformClicked(PlatformDto platform) - { - if (platform.Url != null) - { - NavigationManager.NavigateTo(platform.Url); - } - } - protected string GetFormatedStorageSpace() { if (GameDto.StorageSpace == null) @@ -28,15 +20,11 @@ public class GameBase : ComponentBase return string.Empty; } - int quotien = (int)Math.Round((decimal)GameDto.StorageSpace) / 1000; - string unit = quotien switch + return GameDto.StorageSpace switch { - 0 => "Mo", - 1 => "Go", - 2 => "To", - _ => string.Empty + > 1000000 => $"{GameDto.StorageSpace / 1000000:f1} To", + > 1000 => $"{GameDto.StorageSpace / 1000:f1} Go", + _ => $"{GameDto.StorageSpace:f1} Mo" }; - - return $"{GameDto.StorageSpace % 1000:g1} {unit}"; } } diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor index 99fa5d3..a14e4a6 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor @@ -6,22 +6,22 @@ @GameDto.Title - @GameDto.ReleaseDate?.ToShortDateString() ?? @ResourcesKey.Unknown + @(GameDto.ReleaseDate?.ToShortDateString() ?? @ResourcesKey.Unknown)
@foreach (var platform in GameDto.Platforms ?? []) { -
HandlePlatformClicked(platform))> + @platform.Label -
+ }
@foreach (var tag in GameDto.Tags ?? []) { -
+
@tag.Label
} diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor.css index 5f28270..31b603a 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor.css +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor.css @@ -1 +1,39 @@ - \ No newline at end of file +.row { + display: grid; + grid-template-columns: 48px 5fr 70px 2fr 3fr 60px 30px 30px; + text-wrap: nowrap; + height: 64px; + background: var(--input-secondary); + box-shadow: var(--drop-shadow); + border-radius: var(--big-radius); + overflow: hidden; + align-content: center; + align-items:center; +} +.title { + font-weight: bold; +} + +.pill { + width: fit-content; + height: 24px; + padding: 0 6px; + background: rgb(255, 255, 255, 0.2); + border-radius: var(--small-radius); + align-content: center; +} + +.platforms, .tags { + display: flex; + gap: 4px; +} + +.platform-pill { + color: var(--violet); + cursor: pointer; + +} + + .platform-pill:hover { + text-decoration: underline; + } \ No newline at end of file diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Filter/AdvancedGameFilter.razor.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Filter/AdvancedGameFilter.razor.css index d6db344..65b68ce 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Filter/AdvancedGameFilter.razor.css +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Filter/AdvancedGameFilter.razor.css @@ -6,7 +6,7 @@ padding-left: 10px; height: 100%; box-sizing: border-box; - width: 240px; + width: 100%; border-left: 2px solid var(--line); z-index: var(--index-content); } diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Game.razor b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Game.razor index f06eaeb..714114a 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Game.razor +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Game.razor @@ -13,17 +13,21 @@ + @bind-DisplayType=DisplayType + @bind-Value=GameFilter/>
+ @foreach (var game in GamesDto) + { + + }
- + diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Game.razor.cs b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Game.razor.cs index 2f09114..6534e9e 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Game.razor.cs +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Game.razor.cs @@ -3,6 +3,7 @@ using GameIdeas.BlazorApp.Shared.Components.Popup; using GameIdeas.BlazorApp.Shared.Models; using GameIdeas.Shared.Dto; using Microsoft.AspNetCore.Components; +using System.Net.Http.Headers; namespace GameIdeas.BlazorApp.Pages.Games; @@ -13,11 +14,13 @@ public partial class Game private DisplayType DisplayType = DisplayType.List; private GameFilterDto GameFilter = new(); private Popup? ManualAddPopup; + private bool IsLoading; private CategoriesDto? Categories; + private IEnumerable GamesDto = []; protected override async Task OnInitializedAsync() { - await HandleFetchCategories(); + await HandleFetchDatas(); await base.OnInitializedAsync(); } private void HandleAddClicked(AddType addType) @@ -37,8 +40,22 @@ public partial class Game { ManualAddPopup?.Close(); } - private async Task HandleFetchCategories() + private async Task HandleFetchDatas() { - Categories = await GameGateway.FetchCategories(); + try + { + IsLoading = true; + + Categories = await GameGateway.FetchCategories(); + GamesDto = await GameGateway.FetchGames(new PaggingDto() { CurrentPage = 1, NumberPerPage = 50 }); + } + catch (Exception) + { + throw; + } + finally + { + IsLoading = false; + } } } \ No newline at end of file diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Game.razor.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Game.razor.css index 5dc75c2..5c58be9 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Game.razor.css +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Game.razor.css @@ -1,12 +1,15 @@ .container { + display: grid; + grid-template-columns: 1fr 240px; margin-top: 20px; margin-bottom: 10px; - justify-content: space-between; - display: flex; - flex-direction: row; height: 100%; } .content { z-index: var(--index-content); + margin: 0 20px; + display: flex; + flex-direction: column; + gap: 20px; } \ No newline at end of file diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Gateways/GameGateway.cs b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Gateways/GameGateway.cs index 34873dc..25da217 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Gateways/GameGateway.cs +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Gateways/GameGateway.cs @@ -33,4 +33,17 @@ public class GameGateway(IHttpClientService httpClientService) : IGameGateway throw new CategoryNotFoundException(ResourcesKey.ErrorFetchCategories); } } + + public async Task> FetchGames(PaggingDto pagging) + { + try + { + var result = await httpClientService.FetchDataAsync>(Endpoints.Game.Fetch(pagging)); + return result ?? throw new InvalidOperationException(ResourcesKey.ErrorFetchGames); + } + catch (Exception) + { + throw new CategoryNotFoundException(ResourcesKey.ErrorFetchGames); + } + } } diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Gateways/IGameGateway.cs b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Gateways/IGameGateway.cs index 0269bad..387d846 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Gateways/IGameGateway.cs +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Gateways/IGameGateway.cs @@ -6,4 +6,5 @@ public interface IGameGateway { Task FetchCategories(); Task CreateGame(GameDto game); + Task> FetchGames(PaggingDto pagging); } diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Constants/Endpoints.cs b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Constants/Endpoints.cs index e4cad7a..3e6289d 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Constants/Endpoints.cs +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Constants/Endpoints.cs @@ -1,10 +1,14 @@ -namespace GameIdeas.BlazorApp.Shared.Constants; +using GameIdeas.Shared.Dto; + +namespace GameIdeas.BlazorApp.Shared.Constants; public static class Endpoints { public static class Game { public static readonly string Create = "api/Game/Create"; + public static string Fetch(PaggingDto pagging) => + $"api/Game?{nameof(pagging.CurrentPage)}={pagging.CurrentPage}&{nameof(pagging.NumberPerPage)}={pagging.NumberPerPage}"; } public static class Category diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Exceptions/GameNotFoundException.cs b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Exceptions/GameNotFoundException.cs new file mode 100644 index 0000000..5e06e7a --- /dev/null +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Exceptions/GameNotFoundException.cs @@ -0,0 +1,3 @@ +namespace GameIdeas.BlazorApp.Shared.Exceptions; + +public class GameNotFoundException(string message) : Exception(message); diff --git a/src/GameIdeas/GameIdeas.Resources/CreateStaticResourceKey.cs b/src/GameIdeas/GameIdeas.Resources/CreateStaticResourceKey.cs index aa5b8fb..6cc5cc8 100644 --- a/src/GameIdeas/GameIdeas.Resources/CreateStaticResourceKey.cs +++ b/src/GameIdeas/GameIdeas.Resources/CreateStaticResourceKey.cs @@ -39,6 +39,7 @@ public class Translations (TranslationService translationService) public string InvalidTitle => translationService.Translate(nameof(InvalidTitle)); public string InvalidInterest => translationService.Translate(nameof(InvalidInterest)); public string Unknown => translationService.Translate(nameof(Unknown)); + public string ErrorFetchGames => translationService.Translate(nameof(ErrorFetchGames)); } public static class ResourcesKey @@ -86,4 +87,5 @@ public static class ResourcesKey public static string InvalidTitle => _instance?.InvalidTitle ?? throw new InvalidOperationException("ResourcesKey.InvalidTitle is not initialized."); public static string InvalidInterest => _instance?.InvalidInterest ?? throw new InvalidOperationException("ResourcesKey.InvalidInterest is not initialized."); public static string Unknown => _instance?.Unknown ?? throw new InvalidOperationException("ResourcesKey.Unknown is not initialized."); + public static string ErrorFetchGames => _instance?.ErrorFetchGames ?? throw new InvalidOperationException("ResourcesKey.ErrorFetchGames is not initialized."); } \ No newline at end of file diff --git a/src/GameIdeas/Server/GameIdeas.WebAPI/Controllers/GameController.cs b/src/GameIdeas/Server/GameIdeas.WebAPI/Controllers/GameController.cs index 3fdcb3b..0db432b 100644 --- a/src/GameIdeas/Server/GameIdeas.WebAPI/Controllers/GameController.cs +++ b/src/GameIdeas/Server/GameIdeas.WebAPI/Controllers/GameController.cs @@ -12,7 +12,7 @@ public class GameController(IGameService gameService, ILoggerFactory loggerFacto private readonly ILogger logger = loggerFactory.CreateLogger(); [HttpGet] - public async Task>> SearchGames([FromQuery] PaggingDto pagging) + public async Task>> GetGames([FromQuery] PaggingDto pagging) { try { diff --git a/src/GameIdeas/Server/GameIdeas.WebAPI/Files/GameIdeas.fr.json b/src/GameIdeas/Server/GameIdeas.WebAPI/Files/GameIdeas.fr.json index 30cf2c1..fd9dd3a 100644 --- a/src/GameIdeas/Server/GameIdeas.WebAPI/Files/GameIdeas.fr.json +++ b/src/GameIdeas/Server/GameIdeas.WebAPI/Files/GameIdeas.fr.json @@ -34,5 +34,7 @@ "ErrorCreateGame": "Erreur lors de la Création d'un jeu", "InvalidTitle": "Le titre est incorrect", "InvalidInterest": "L'interêt est incorrect", - "Unknown": "Inconnu" + "Unknown": "Inconnu", + "ErrorFetchGames": "Erreur lors de la récupération des jeux" + } \ No newline at end of file -- 2.39.5 From 5633ef9b06d0c5a96e77f89455dc29f8b030ceac Mon Sep 17 00:00:00 2001 From: Maxime Adler Date: Wed, 16 Apr 2025 16:22:30 +0200 Subject: [PATCH 3/6] Add style for rows --- .../Pages/Games/Components/GameRow.razor.css | 40 ++++++++++++++++++- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor.css index 31b603a..ad76215 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor.css +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor.css @@ -1,6 +1,7 @@ .row { display: grid; grid-template-columns: 48px 5fr 70px 2fr 3fr 60px 30px 30px; + grid-gap: 8px; text-wrap: nowrap; height: 64px; background: var(--input-secondary); @@ -14,6 +15,10 @@ font-weight: bold; } +.release-date, .storage, .max-value { + color: rgb(184, 184, 184); +} + .pill { width: fit-content; height: 24px; @@ -31,9 +36,40 @@ .platform-pill { color: var(--violet); cursor: pointer; - + text-decoration: none; } .platform-pill:hover { text-decoration: underline; - } \ No newline at end of file + } + +.detail { + transform: scale(0.8, 1.2) rotate(-90deg); + background: none; + border: none; + outline: none; + cursor: pointer; +} + +::deep .detail svg { + fill: var(--white); +} + +.value { + font-size: 24px; + font-weight: bold; +} + +.max-value { + translate: 0 200px; +} + +@media screen and (max-width: 800px) { + .row { + grid-template-columns: 48px 5fr 2fr 3fr 30px 30px; + } + + .release-date, .storage { + display: none; + } +} \ No newline at end of file -- 2.39.5 From fa63fde8007bfa37f25b69bc52ae29950856113c Mon Sep 17 00:00:00 2001 From: Egamorf Date: Wed, 16 Apr 2025 21:02:56 +0200 Subject: [PATCH 4/6] Complete style for game rows --- .../GameIdeas.BlazorApp/Helpers/GameHelper.cs | 13 +++++ .../Pages/Games/Components/GameBase.cs | 6 +-- .../Pages/Games/Components/GameRow.razor | 9 ++-- .../Pages/Games/Components/GameRow.razor.css | 49 ++++++++++++++----- .../Pages/Games/Filter/GameFilter.razor.css | 1 - .../Shared/Components/Slider/Slider.razor.cs | 12 +---- 6 files changed, 61 insertions(+), 29 deletions(-) diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Helpers/GameHelper.cs b/src/GameIdeas/Client/GameIdeas.BlazorApp/Helpers/GameHelper.cs index d806f8e..8f830c2 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Helpers/GameHelper.cs +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Helpers/GameHelper.cs @@ -9,4 +9,17 @@ public static class GameHelper game.CreationUserId = 100000; game.CreationDate = DateTime.Now; } + + public static string GetInterestColor(int interest, int maxInterest) + { + int firstTier = (int)Math.Floor(0.33 * maxInterest); + int secondTier = (int)Math.Ceiling(0.66 * maxInterest); + + return interest switch + { + int x when x <= firstTier => "--red", + int x when x >= secondTier => "--green", + _ => "--yellow", + }; + } } diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameBase.cs b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameBase.cs index 68229fb..efc56cf 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameBase.cs +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameBase.cs @@ -10,7 +10,7 @@ public class GameBase : ComponentBase protected void HandleDetailClicked() { - NavigationManager.NavigateTo($"/Game/Detail/{GameDto.Id}"); + NavigationManager.NavigateTo($"/Games/Detail/{GameDto.Id}"); } protected string GetFormatedStorageSpace() @@ -22,8 +22,8 @@ public class GameBase : ComponentBase return GameDto.StorageSpace switch { - > 1000000 => $"{GameDto.StorageSpace / 1000000:f1} To", - > 1000 => $"{GameDto.StorageSpace / 1000:f1} Go", + >= 1000000 => $"{GameDto.StorageSpace / 1000000:f1} To", + >= 1000 => $"{GameDto.StorageSpace / 1000:f1} Go", _ => $"{GameDto.StorageSpace:f1} Mo" }; } diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor index a14e4a6..d694e4f 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor @@ -1,10 +1,11 @@ -@using GameIdeas.BlazorApp.Shared.Constants +@using GameIdeas.BlazorApp.Helpers +@using GameIdeas.BlazorApp.Shared.Constants @inherits GameBase
- @GameDto.Title + @GameDto.Title @(GameDto.ReleaseDate?.ToShortDateString() ?? @ResourcesKey.Unknown) @@ -30,7 +31,9 @@ @GetFormatedStorageSpace()
- @GameDto.Interest + + @GameDto.Interest + /5
diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor.css index ad76215..7bb678f 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor.css +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor.css @@ -1,21 +1,44 @@ .row { display: grid; - grid-template-columns: 48px 5fr 70px 2fr 3fr 60px 30px 30px; + grid-template-columns: auto 3fr 70px 2fr 3fr 60px 30px 30px; grid-gap: 8px; text-wrap: nowrap; height: 64px; background: var(--input-secondary); box-shadow: var(--drop-shadow); border-radius: var(--big-radius); + align-items: center; overflow: hidden; - align-content: center; - align-items:center; -} -.title { - font-weight: bold; } -.release-date, .storage, .max-value { +.row * { + max-height: 64px; + height: fit-content; + padding: 6px 0; + box-sizing: border-box; +} + +.icon { + padding: 0; + margin: 8px; + height: 48px; + width: 48px; +} + +.title { + font-weight: bold; + color: var(--white); + text-decoration: none; + width: fit-content; + padding: 6px; + border-radius: var(--small-radius); +} + +.title:hover { + background: var(--input-selected); +} + +.release-date, .storage, .max-value { color: rgb(184, 184, 184); } @@ -30,6 +53,7 @@ .platforms, .tags { display: flex; + flex-wrap: wrap; gap: 4px; } @@ -44,7 +68,7 @@ } .detail { - transform: scale(0.8, 1.2) rotate(-90deg); + transform: scale(0.6, 1) rotate(-90deg); background: none; border: none; outline: none; @@ -61,15 +85,16 @@ } .max-value { - translate: 0 200px; + position: absolute; + transform: translate(2px, 10px); } -@media screen and (max-width: 800px) { +@media screen and (max-width: 1000px) { .row { - grid-template-columns: 48px 5fr 2fr 3fr 30px 30px; + grid-template-columns: 48px 3fr 2fr 3fr 30px 30px; } - .release-date, .storage { + .tags, .storage { display: none; } } \ No newline at end of file diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Filter/GameFilter.razor.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Filter/GameFilter.razor.css index a7a9081..2be42ae 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Filter/GameFilter.razor.css +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Filter/GameFilter.razor.css @@ -3,7 +3,6 @@ flex-direction: row; gap: 8px; align-items: center; - z-index: var(--index-content); } .search-container { diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Slider/Slider.razor.cs b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Slider/Slider.razor.cs index 007bf0a..ea2be8f 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Slider/Slider.razor.cs +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Slider/Slider.razor.cs @@ -1,3 +1,4 @@ +using GameIdeas.BlazorApp.Helpers; using Microsoft.AspNetCore.Components; namespace GameIdeas.BlazorApp.Shared.Components.Slider; @@ -16,15 +17,6 @@ public partial class Slider private string StatusColor(int value) { string str = "--thumb-color: var({0});"; - - int firstTier = (int)Math.Floor(0.33 * Params.Max); - int secondTier = (int)Math.Ceiling(0.66 * Params.Max); - - return value switch - { - int x when x <= firstTier => string.Format(str, "--red"), - int x when x >= secondTier => string.Format(str, "--green"), - _ => string.Format(str, "--yellow"), - }; + return string.Format(str, GameHelper.GetInterestColor(value, Params.Max)); } } \ No newline at end of file -- 2.39.5 From d23e980a6d5dd44881b3e034392e86f3dbac5dbf Mon Sep 17 00:00:00 2001 From: Egamorf Date: Wed, 16 Apr 2025 21:23:13 +0200 Subject: [PATCH 5/6] Enhance style --- .../Pages/Games/Components/GameRow.razor.css | 1 + .../Pages/Games/Filter/AdvancedGameFilter.razor.css | 3 ++- .../Pages/Games/Filter/GameFilter.razor.css | 1 + .../Client/GameIdeas.BlazorApp/Pages/Games/Game.razor.css | 5 ++--- src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/app.css | 1 - 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor.css index 7bb678f..3adfb08 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor.css +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor.css @@ -27,6 +27,7 @@ .title { font-weight: bold; + font-size: 13px; color: var(--white); text-decoration: none; width: fit-content; diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Filter/AdvancedGameFilter.razor.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Filter/AdvancedGameFilter.razor.css index 65b68ce..fc8c9f4 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Filter/AdvancedGameFilter.razor.css +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Filter/AdvancedGameFilter.razor.css @@ -4,7 +4,7 @@ gap: 10px; padding-right: 20px; padding-left: 10px; - height: 100%; + min-height: calc(100vh - 80px); box-sizing: border-box; width: 100%; border-left: 2px solid var(--line); @@ -19,6 +19,7 @@ .title { font-weight: bold; + font-size: 14px; color: var(--violet); height: 24px; align-content: center diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Filter/GameFilter.razor.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Filter/GameFilter.razor.css index 2be42ae..269d9e7 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Filter/GameFilter.razor.css +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Filter/GameFilter.razor.css @@ -2,6 +2,7 @@ display: flex; flex-direction: row; gap: 8px; + margin: 0 8px; align-items: center; } diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Game.razor.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Game.razor.css index 5c58be9..501965d 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Game.razor.css +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Game.razor.css @@ -1,9 +1,8 @@ .container { display: grid; grid-template-columns: 1fr 240px; - margin-top: 20px; - margin-bottom: 10px; - height: 100%; + padding: 20px 0; + height: fit-content; } .content { diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/app.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/app.css index 238e46c..1f9a59a 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/app.css +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/app.css @@ -39,7 +39,6 @@ html { html, body, #app { margin: 0; padding: 0; - height: 100%; } .invalid { -- 2.39.5 From 740b8fdd68aa1fb4b9ded4a70d832fb159c2cad9 Mon Sep 17 00:00:00 2001 From: Egamorf Date: Thu, 17 Apr 2025 00:55:35 +0200 Subject: [PATCH 6/6] Add Game row skeleton --- .../Pages/Games/Components/GameRow.razor | 2 +- .../Games/Components/GameRowSkeleton.razor | 36 ++++++ .../Components/GameRowSkeleton.razor.css | 111 ++++++++++++++++++ .../Pages/Games/Filter/GameFilter.razor.css | 2 +- .../Pages/Games/Game.razor | 19 ++- .../Pages/Games/Game.razor.cs | 3 +- .../Shared/Components/Popup/Popup.razor | 2 +- .../Components/Search/SearchInput.razor | 2 +- .../Components/Search/SearchInput.razor.cs | 4 +- .../Shared/Constants/Icons.cs | 28 ++--- 10 files changed, 182 insertions(+), 27 deletions(-) create mode 100644 src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRowSkeleton.razor create mode 100644 src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRowSkeleton.razor.css diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor index d694e4f..a2309f2 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor @@ -37,5 +37,5 @@ /5
- +
\ No newline at end of file diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRowSkeleton.razor b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRowSkeleton.razor new file mode 100644 index 0000000..7e97df7 --- /dev/null +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRowSkeleton.razor @@ -0,0 +1,36 @@ +@using GameIdeas.BlazorApp.Helpers +@using GameIdeas.BlazorApp.Shared.Constants + +
+
@Icons.Game
+ +
+ + @ResourcesKey.Unknown + +
+
+
+
+
+ +
+
+
+
+ + 10.0 Go + +
+ + @Interest + + /5 +
+ + +
+ +@code { + private int Interest = @Random.Shared.Next(1, 5); +} \ No newline at end of file diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRowSkeleton.razor.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRowSkeleton.razor.css new file mode 100644 index 0000000..df41d48 --- /dev/null +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRowSkeleton.razor.css @@ -0,0 +1,111 @@ +.row { + display: grid; + grid-template-columns: auto 3fr 70px 2fr 3fr 60px 30px 30px; + grid-gap: 8px; + height: 64px; + background: var(--input-secondary); + box-shadow: var(--drop-shadow); + border-radius: var(--big-radius); + align-items: center; + overflow: hidden; +} + +.row * { + max-height: 64px; + height: fit-content; + padding: 6px 0; + box-sizing: border-box; +} + +.icon { + border-radius: var(--small-radius); + padding: 4px; + margin: 8px; + height: 48px; + width: 48px; + animation: loading 3s ease infinite; +} + +.icon ::deep svg { + fill: var(--input-secondary); +} + +.title { + border-radius: var(--small-radius); + animation: loading 3s ease infinite; + width: 160px; + height: 24px; + padding: 6px; + border-radius: var(--small-radius); +} + +.release-date, .storage, .max-value { + color: rgb(184, 184, 184); +} + +.pill { + width: 60px; + height: 24px; + padding: 0 6px; + border-radius: var(--small-radius); + align-content: center; + animation: loading 3s ease infinite; +} + +.pill-lg { + width: 80px; +} + +.pill-sm { + width: 40px; +} + +.platforms, .tags { + display: flex; + flex-wrap: wrap; + gap: 4px; +} + +.detail { + transform: scale(0.6, 1) rotate(-90deg); + background: none; + border: none; + outline: none; + cursor: pointer; +} + +::deep .detail svg { + fill: var(--white); +} + +.value { + font-size: 24px; + font-weight: bold; +} + +.max-value { + position: absolute; + transform: translate(2px, 10px); +} + +@media screen and (max-width: 1000px) { + .row { + grid-template-columns: 48px 3fr 2fr 3fr 30px 30px; + } + + .tags, .storage { + display: none; + } +} + +@keyframes loading { + 0% { + background: rgb(255, 255, 255, 0.05); + } + 50% { + background: rgb(255, 255, 255, 0.2); + } + 100% { + background: rgb(255, 255, 255, 0.05); + } +} \ No newline at end of file diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Filter/GameFilter.razor.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Filter/GameFilter.razor.css index 269d9e7..748276e 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Filter/GameFilter.razor.css +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Filter/GameFilter.razor.css @@ -13,7 +13,7 @@ .slider-container { width: 150px; - min-width: 150px; + min-width: 150px; } .select-container { diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Game.razor b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Game.razor index 714114a..8841706 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Game.razor +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Game.razor @@ -13,16 +13,27 @@ + @bind-DisplayType=DisplayType + @bind-Value=GameFilter />
- @foreach (var game in GamesDto) + @if (!IsLoading) { - + @foreach (var game in GamesDto) + { + + } } + else + { + @for (int i = 0; i < 20; i++) + { + + } + } +
diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Game.razor.cs b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Game.razor.cs index 6534e9e..f586315 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Game.razor.cs +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Game.razor.cs @@ -3,7 +3,6 @@ using GameIdeas.BlazorApp.Shared.Components.Popup; using GameIdeas.BlazorApp.Shared.Models; using GameIdeas.Shared.Dto; using Microsoft.AspNetCore.Components; -using System.Net.Http.Headers; namespace GameIdeas.BlazorApp.Pages.Games; @@ -14,7 +13,7 @@ public partial class Game private DisplayType DisplayType = DisplayType.List; private GameFilterDto GameFilter = new(); private Popup? ManualAddPopup; - private bool IsLoading; + private bool IsLoading = false; private CategoriesDto? Categories; private IEnumerable GamesDto = []; diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Popup/Popup.razor b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Popup/Popup.razor index fb626b3..64a59ec 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Popup/Popup.razor +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Popup/Popup.razor @@ -8,7 +8,7 @@ diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Search/SearchInput.razor b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Search/SearchInput.razor index db11012..886e722 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Search/SearchInput.razor +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Search/SearchInput.razor @@ -17,7 +17,7 @@ @if (!string.IsNullOrEmpty(Text)) {
- @Icons.Shared.Close; + @Icons.Close;
} diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Search/SearchInput.razor.cs b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Search/SearchInput.razor.cs index 5e5f3d1..fd0f42e 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Search/SearchInput.razor.cs +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Search/SearchInput.razor.cs @@ -57,8 +57,8 @@ public partial class SearchInput { return Icon switch { - SearchInputIcon.Dropdown => Icons.Search.Triangle, - SearchInputIcon.Search => Icons.Search.Glass, + SearchInputIcon.Dropdown => Icons.Triangle, + SearchInputIcon.Search => Icons.Glass, _ => new MarkupString() }; } diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Constants/Icons.cs b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Constants/Icons.cs index 26ade56..07d5d99 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Constants/Icons.cs +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Constants/Icons.cs @@ -8,21 +8,19 @@ public static class Icons private const string CloseBraket = ""; - public static class Search - { - public readonly static MarkupString Glass = new(OpenBraket + - "" + - CloseBraket); + public readonly static MarkupString Glass = new(OpenBraket + + "" + + CloseBraket); - public readonly static MarkupString Triangle = new(OpenBraket + - "" + - CloseBraket); - } + public readonly static MarkupString Triangle = new(OpenBraket + + "" + + CloseBraket); + + public readonly static MarkupString Close = new(OpenBraket + + "" + + CloseBraket); - public static class Shared - { - public readonly static MarkupString Close = new(OpenBraket + - "" + - CloseBraket); - } + public readonly static MarkupString Game = new(OpenBraket + + "" + + CloseBraket); } -- 2.39.5