From 42dbf11bad17f807176a81beabd1a31ce5df8560 Mon Sep 17 00:00:00 2001 From: Egamorf Date: Sat, 3 May 2025 13:58:16 +0200 Subject: [PATCH] arrange style for detail --- .../Pages/Detail/GameDetail.razor | 25 ++++++++++--------- .../Pages/Detail/GameDetail.razor.css | 13 +++++++++- .../Games/Components/GameCreationForm.razor | 4 +-- .../Pages/Games/Components/GameRow.razor | 2 +- .../Games/Filter/AdvancedGameFilter.razor | 4 +-- .../GameIdeas.BlazorApp/wwwroot/css/app.css | 25 +++++++++++++++++++ .../CreateStaticResourceKey.cs | 8 +++--- .../GameIdeas.WebAPI/Files/GameIdeas.fr.json | 4 +-- .../Services/Games/GameWriteService.cs | 1 - 9 files changed, 61 insertions(+), 25 deletions(-) diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Detail/GameDetail.razor b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Detail/GameDetail.razor index 382e0d7..e973cd8 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Detail/GameDetail.razor +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Detail/GameDetail.razor @@ -9,21 +9,22 @@

@Game.Title

@Game.Description
-
+
-

-
+
+ +

@ResourcesKey.Properties

@foreach (var property in Game.Properties ?? []) { -
@property.Label
+
@property.Label
}
-

-
+
+

@ResourcesKey.Tags

@foreach (var property in Game.Tags ?? []) { -
@property.Label
+
@property.Label
}
@@ -40,17 +41,17 @@ @ResourcesKey.Platforms @foreach (var platform in Game.Platforms ?? []) { - @platform.Label + @platform.Label }
- @ResourcesKey.Platforms - @Game.Developer + @ResourcesKey.Developer + @Game.Developer?.Name
- @ResourcesKey.Platforms - @Game.Publisher + @ResourcesKey.Publisher + @Game.Publisher?.Name
diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Detail/GameDetail.razor.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Detail/GameDetail.razor.css index 5f28270..fd0e1f2 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Detail/GameDetail.razor.css +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Detail/GameDetail.razor.css @@ -1 +1,12 @@ - \ No newline at end of file +.detail-container, .properties-tags { + display: grid; + grid-template-columns: 1fr 1fr; +} + +.medias { + grid-column: 2 +} + +.properties { + display: flex; +} \ No newline at end of file diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameCreationForm.razor b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameCreationForm.razor index 3268e75..c9e1028 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameCreationForm.razor +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameCreationForm.razor @@ -22,13 +22,13 @@
-
@ResourcesKey.Developers :
+
@ResourcesKey.Developer :
-
@ResourcesKey.Publishers :
+
@ResourcesKey.Publisher :
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 b31104c..fea81ec 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor @@ -5,7 +5,7 @@
- @GameDto.Title + @GameDto.Title @(GameDto.ReleaseDate?.ToShortDateString() ?? @ResourcesKey.Unknown) diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Filter/AdvancedGameFilter.razor b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Filter/AdvancedGameFilter.razor index 66d3f6f..e111326 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Filter/AdvancedGameFilter.razor +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Filter/AdvancedGameFilter.razor @@ -16,10 +16,10 @@ - - translationService.Translate(nameof(Research)); public string Platforms => translationService.Translate(nameof(Platforms)); public string Tags => translationService.Translate(nameof(Tags)); - public string Publishers => translationService.Translate(nameof(Publishers)); - public string Developers => translationService.Translate(nameof(Developers)); + public string Publisher => translationService.Translate(nameof(Publisher)); + public string Developer => translationService.Translate(nameof(Developer)); public string StorageSize => translationService.Translate(nameof(StorageSize)); public string StorageSizeMo => translationService.Translate(nameof(StorageSizeMo)); public string LastModification => translationService.Translate(nameof(LastModification)); @@ -91,8 +91,8 @@ public static class ResourcesKey public static string Research => _instance?.Research ?? throw new InvalidOperationException("ResourcesKey.Research is not initialized."); public static string Platforms => _instance?.Platforms ?? throw new InvalidOperationException("ResourcesKey.Platforms is not initialized."); public static string Tags => _instance?.Tags ?? throw new InvalidOperationException("ResourcesKey.Tags is not initialized."); - public static string Publishers => _instance?.Publishers ?? throw new InvalidOperationException("ResourcesKey.Publishers is not initialized."); - public static string Developers => _instance?.Developers ?? throw new InvalidOperationException("ResourcesKey.Developers is not initialized."); + public static string Publisher => _instance?.Publisher ?? throw new InvalidOperationException("ResourcesKey.Publisher is not initialized."); + public static string Developer => _instance?.Developer ?? throw new InvalidOperationException("ResourcesKey.Developer is not initialized."); public static string StorageSize => _instance?.StorageSize ?? throw new InvalidOperationException("ResourcesKey.StorageSize is not initialized."); public static string StorageSizeMo => _instance?.StorageSizeMo ?? throw new InvalidOperationException("ResourcesKey.StorageSizeMo is not initialized."); public static string LastModification => _instance?.LastModification ?? throw new InvalidOperationException("ResourcesKey.LastModification is not initialized."); diff --git a/src/GameIdeas/Server/GameIdeas.WebAPI/Files/GameIdeas.fr.json b/src/GameIdeas/Server/GameIdeas.WebAPI/Files/GameIdeas.fr.json index 91cd16e..ec9317f 100644 --- a/src/GameIdeas/Server/GameIdeas.WebAPI/Files/GameIdeas.fr.json +++ b/src/GameIdeas/Server/GameIdeas.WebAPI/Files/GameIdeas.fr.json @@ -13,8 +13,8 @@ "Research": "Rechercher", "Platforms": "Plateformes", "Tags": "Genres", - "Publishers": "Editeurs", - "Developers": "Développeurs", + "Publisher": "Editeur", + "Developer": "Développeur", "StorageSize": "Taille d'espace", "StorageSizeMo": "Taille d'espace en Mo", "LastModification": "Dernière modifications", diff --git a/src/GameIdeas/Server/GameIdeas.WebAPI/Services/Games/GameWriteService.cs b/src/GameIdeas/Server/GameIdeas.WebAPI/Services/Games/GameWriteService.cs index 1b7127f..4681b75 100644 --- a/src/GameIdeas/Server/GameIdeas.WebAPI/Services/Games/GameWriteService.cs +++ b/src/GameIdeas/Server/GameIdeas.WebAPI/Services/Games/GameWriteService.cs @@ -1,5 +1,4 @@ using AutoMapper; -using GameIdeas.Shared.Constants; using GameIdeas.Shared.Dto; using GameIdeas.Shared.Exceptions; using GameIdeas.Shared.Model;