diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Detail/GameDetail.razor b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Detail/GameDetail.razor index e973cd8..6350c31 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Detail/GameDetail.razor +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Detail/GameDetail.razor @@ -1,5 +1,8 @@ @page "/Detail/{GameId:int}" +@using GameIdeas.BlazorApp.Helpers @using GameIdeas.BlazorApp.Shared.Components.Header +@using GameIdeas.BlazorApp.Shared.Components.Interest +@using GameIdeas.BlazorApp.Shared.Constants @layout MainLayout @@ -7,54 +10,89 @@
-

@Game.Title

-
@Game.Description
-
+
+ @Icons.Back +

@Game.Title

+ +
-
-
+
+ @Game.Description + +
+
+ +
+

@ResourcesKey.Properties

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

@ResourcesKey.Tags

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

@ResourcesKey.About

+
+ @if (Game.ReleaseDate != null) + { +
+ @ResourcesKey.ReleaseDate + @Game.ReleaseDate?.ToShortDateString() +
+ } -
-

@ResourcesKey.About

-
- -
-
- @ResourcesKey.Platforms - @foreach (var platform in Game.Platforms ?? []) - { - @platform.Label - } -
-
- @ResourcesKey.Developer - @Game.Developer?.Name + @if (Game.StorageSpace != null) + { +
+ @ResourcesKey.StorageSize + @GameHelper.GetFormatedStorageSpace(Game.StorageSpace) +
+ } + + @if (Game.Developer != null) + { +
+ @ResourcesKey.Developer + @Game.Developer?.Name +
+ } + + @if (Game.Publisher != null) + { +
+ @ResourcesKey.Publisher + @Game.Publisher?.Name +
+ } +
-
- @ResourcesKey.Publisher - @Game.Publisher?.Name +
+

@ResourcesKey.Platforms

+
+ @foreach (var platform in Game.Platforms ?? []) + { + @platform.Label + } +
-
+
\ No newline at end of file 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 fd0e1f2..8c8695b 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Detail/GameDetail.razor.css +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Detail/GameDetail.razor.css @@ -1,12 +1,103 @@ .detail-container, .properties-tags { display: grid; - grid-template-columns: 1fr 1fr; + grid-gap: 20px; } -.medias { - grid-column: 2 -} - -.properties { +.flex { display: flex; + gap: 8px; + align-items: center; +} + +.section { + padding: 20px 100px; +} + +.col-2 { + display: grid; + grid-template-columns: 1fr 1fr; + grid-gap: 40px; +} + +.first-larger { + grid-template-columns: 3fr 2fr; +} + +.dark { + background: rgb(0, 0, 0, 0.4) +} + +.header-1, .header-2 { + width: 100%; +} + +.header-2 { + margin-bottom: 20px; +} + +.pills, .informations { + display: flex; + flex-wrap: wrap; + gap: 34px; +} + +.additional-informations, .platforms { + padding: 20px; + background: var(--input-secondary); + box-shadow: var(--drop-shadow); + border-radius: var(--big-radius); +} + +.pill { + width: fit-content; + height: 24px; + padding: 0 6px; + background: rgb(255, 255, 255, 0.2); + border-radius: var(--small-radius); + align-content: center; +} + +.platform-pill { + color: var(--violet); + cursor: pointer; + text-decoration: none; +} + + .platform-pill:hover { + text-decoration: underline; + } + +.square-button { + height: 28px; + min-height: 28px; + width: 28px; + min-width: 28px; + border-radius: var(--small-radius); + background: var(--input-primary); + overflow: hidden; + cursor: pointer; +} + + .square-button ::deep svg { + fill: var(--white); + } + + .square-button:hover ::deep svg { + background: var(--input-selected); + } + +@media screen and (max-width: 1000px) { + .section { + padding: 20px; + } +} + +@media screen and (max-width: 700px) { + .col-2 { + grid-template-columns: 1fr; + } + + .platforms { + grid-row: 1; + } } \ No newline at end of file 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 fea81ec..180382d 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRow.razor @@ -1,4 +1,5 @@ @using GameIdeas.BlazorApp.Helpers +@using GameIdeas.BlazorApp.Shared.Components.Interest @using GameIdeas.BlazorApp.Shared.Constants @inherits GameBase @@ -30,12 +31,7 @@ @GameHelper.GetFormatedStorageSpace(GameDto.StorageSpace) -
- - @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 index 3adfb08..14d3ae6 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 @@ -11,7 +11,7 @@ overflow: hidden; } -.row * { +.row > * { max-height: 64px; height: fit-content; padding: 6px 0; @@ -39,7 +39,7 @@ background: var(--input-selected); } -.release-date, .storage, .max-value { +.release-date, .storage { color: rgb(184, 184, 184); } @@ -50,7 +50,7 @@ background: rgb(255, 255, 255, 0.2); border-radius: var(--small-radius); align-content: center; -} +} .platforms, .tags { display: flex; @@ -80,16 +80,6 @@ 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; diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Interest/Interest.razor b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Interest/Interest.razor new file mode 100644 index 0000000..14a8238 --- /dev/null +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Interest/Interest.razor @@ -0,0 +1,9 @@ +@using GameIdeas.BlazorApp.Helpers + +
+ + @Value + + /5 +
+ diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Interest/Interest.razor.cs b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Interest/Interest.razor.cs new file mode 100644 index 0000000..b65b0d8 --- /dev/null +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Interest/Interest.razor.cs @@ -0,0 +1,8 @@ +using Microsoft.AspNetCore.Components; + +namespace GameIdeas.BlazorApp.Shared.Components.Interest; + +public partial class Interest +{ + [Parameter] public int Value { get; set; } +} \ No newline at end of file diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Interest/Interest.razor.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Interest/Interest.razor.css new file mode 100644 index 0000000..a2e45ac --- /dev/null +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Interest/Interest.razor.css @@ -0,0 +1,16 @@ +.interest { + position: relative; + display: flex; +} + +.value { + align-content: center; + font-size: 24px; + font-weight: bold; +} + +.max-value { + align-content: center; + transform: translate(2px, 10px); + color: rgb(184, 184, 184); +} \ No newline at end of file diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Constants/Icons.cs b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Constants/Icons.cs index 2892160..582fe1d 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Constants/Icons.cs +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Constants/Icons.cs @@ -39,4 +39,8 @@ public static class Icons public readonly static MarkupString Check = new(OpenBraket + "" + CloseBraket); + + public readonly static MarkupString Back = new(OpenBraket + + "" + + CloseBraket); } diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/app.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/app.css index 2d3ec12..c443f39 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/app.css +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/app.css @@ -150,6 +150,7 @@ code { } .header-1, .header-2, span, a { + display: block; color: var(--white); margin: 0; padding: 0;