From 4f04f61df6feb3a99287f9ee208b9851f309b849 Mon Sep 17 00:00:00 2001 From: egamorf76 Date: Thu, 20 Feb 2025 20:58:45 +0100 Subject: [PATCH 01/13] Add file for header --- .../Pages/Games/Components/GameHeader.razor | 1 + .../Pages/Games/Components/GameHeader.razor.cs | 7 +++++++ .../GameIdeas.BlazorApp/Shared/Components/Header.razor | 5 +++++ .../Shared/Components/Header.razor.cs | 10 ++++++++++ 4 files changed, 23 insertions(+) create mode 100644 src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameHeader.razor create mode 100644 src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameHeader.razor.cs create mode 100644 src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Header.razor create mode 100644 src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Header.razor.cs diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameHeader.razor b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameHeader.razor new file mode 100644 index 0000000..e02abfc --- /dev/null +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameHeader.razor @@ -0,0 +1 @@ + diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameHeader.razor.cs b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameHeader.razor.cs new file mode 100644 index 0000000..40de90c --- /dev/null +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameHeader.razor.cs @@ -0,0 +1,7 @@ +namespace GameIdeas.BlazorApp.Pages.Games.Components +{ + public partial class GameHeader + { + + } +} \ No newline at end of file diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Header.razor b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Header.razor new file mode 100644 index 0000000..5db584e --- /dev/null +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Header.razor @@ -0,0 +1,5 @@ +
+
+ Game Ideas +
+
\ No newline at end of file diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Header.razor.cs b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Header.razor.cs new file mode 100644 index 0000000..e1036dc --- /dev/null +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Header.razor.cs @@ -0,0 +1,10 @@ +namespace GameIdeas.BlazorApp.Shared.Components; + +public partial class Header +{ + + private Task HandleIconClicked() + { + throw new NotImplementedException(); + } +} -- 2.39.5 From 0c21e853f3f766b340148502b8bb8a1b12f39121 Mon Sep 17 00:00:00 2001 From: Maxime Adler Date: Fri, 21 Feb 2025 16:03:03 +0100 Subject: [PATCH 02/13] Add content for header --- .../Shared/Components/Header.razor | 39 ++- .../Shared/Components/Header.razor.cs | 3 + .../Shared/Components/Header.razor.css | 257 ++++++++++++++++++ .../GameIdeas.BlazorApp/wwwroot/css/app.css | 18 +- .../wwwroot/default-account.png | Bin 0 -> 6408 bytes .../CreateStaticResourceKey.cs | 4 + .../GameIdeas.WebAPI/Files/GameIdeas.fr.json | 4 +- 7 files changed, 320 insertions(+), 5 deletions(-) create mode 100644 src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Header.razor.css create mode 100644 src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/default-account.png diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Header.razor b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Header.razor index 5db584e..347d232 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Header.razor +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Header.razor @@ -1,5 +1,38 @@ -
-
+@using GameIdeas.Resources +@inherits ComponentBase + +
+
Game Ideas
-
\ No newline at end of file +
+ @Body +
+ +
diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Header.razor.cs b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Header.razor.cs index e1036dc..6587063 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Header.razor.cs +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Header.razor.cs @@ -1,7 +1,10 @@ +using Microsoft.AspNetCore.Components; + namespace GameIdeas.BlazorApp.Shared.Components; public partial class Header { + [Parameter] public RenderFragment? Body { get; set; } private Task HandleIconClicked() { diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Header.razor.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Header.razor.css new file mode 100644 index 0000000..f9a0ebd --- /dev/null +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Header.razor.css @@ -0,0 +1,257 @@ +.header-tab { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: flex-end; + padding: 0px 10px; + height: 40px; + width: 100%; +} + +.header-icon { + display: flex; + justify-content: center; + align-items: center; + padding: 4px; + width: 40%; + height: 100%; +} + +.header-body { + +} + +.account-container { + display: flex; + flex-direction: row; + justify-content: flex-end; + align-items: flex-end; +} + +.button-icon { + color: var(--white); +} + +.account-icon { +} + +.add-container { + +} + +.button { + +} + +.manual-add { + +} + +.more-add { + +} + +.dropdown-more-add { + +} + +.drowdown-more-element { + +} + +/* Frame */ + +/* Auto layout */ + +padding: 0px; +gap: 40px; + +width: 136px; +height: 40px; +/* Inside auto layout */ +flex: none; +order: 2; +flex-grow: 0; +/* Frame 9 */ +width: 56px; +height: 28px; +/* Violet */ +background: #A380D1; +border-radius: 4px; +/* Inside auto layout */ +flex: none; +order: 0; +flex-grow: 0; +/* Frame 55 */ +/* Auto layout */ +display: flex; +flex-direction: column; +align-items: flex-start; +padding: 0px; +gap: 10px; + +position: absolute; +width: 132px; +height: 56px; +left: 0px; +top: 28px; +/* Violet */ +background: #A380D1; +box-shadow: +border-radius: 4px; +/* Frame 56 */ +/* Auto layout */ +display: flex; +flex-direction: column; +align-items: flex-start; +padding: 4px; +gap: 10px; + +width: 132px; +height: 56px; +/* Inside auto layout */ +flex: none; +order: 0; +flex-grow: 0; +/* Ajout manuel */ +width: 89px; +height: 19px; + +font-family: 'Noto Sans'; +font-style: normal; +font-weight: 400; +font-size: 14px; +line-height: 19px; +/* identical to box height */ +color: #FFFFFF; +/* Inside auto layout */ +flex: none; +order: 0; +flex-grow: 0; +/* Ajout automatique */ +width: 124px; +height: 19px; + +font-family: 'Noto Sans'; +font-style: normal; +font-weight: 400; +font-size: 14px; +line-height: 19px; +/* identical to box height */ +color: #FFFFFF; +/* Inside auto layout */ +flex: none; +order: 1; +flex-grow: 0; +/* Frame */ +/* Auto layout */ +display: flex; +flex-direction: column; +justify-content: center; +align-items: center; +padding: 0px; + +position: absolute; +width: 28px; +height: 28px; +left: 0px; +top: 0px; +/* Frame 10 */ +/* Auto layout */ +display: flex; +flex-direction: column; +justify-content: center; +align-items: center; +padding: 0px; + +width: 16px; +height: 16px; +/* Inside auto layout */ +flex: none; +order: 0; +flex-grow: 0; +/* Frame */ +width: 24px; +height: 24px; +/* Inside auto layout */ +flex: none; +order: 0; +flex-grow: 0; +/* Vector */ +position: absolute; +left: 20.83%; +right: 20.83%; +top: 20.83%; +bottom: 20.83%; +/* White */ +background: #FFFFFF; +/* Line 5 */ +position: absolute; +width: 28px; +height: 0px; +left: 28px; +top: 0px; + +border: 1px solid rgba(0, 0, 0, 0.2); +transform: rotate(90deg); +/* Frame */ +/* Auto layout */ +display: flex; +flex-direction: column; +justify-content: center; +align-items: center; +padding: 0px; + +position: absolute; +width: 28px; +height: 28px; +left: 28px; +top: 0px; +/* Frame 10 */ +/* Auto layout */ +display: flex; +flex-direction: column; +justify-content: center; +align-items: center; +padding: 0px; + +width: 16px; +height: 16px; +/* Inside auto layout */ +flex: none; +order: 0; +flex-grow: 0; +/* Polygon 11 */ +width: 16px; +height: 10px; +/* White */ +background: #FFFFFF; +transform: rotate(-180deg); +/* Inside auto layout */ +flex: none; +order: 0; +align-self: stretch; +flex-grow: 0; +/* Icon account */ +/* Auto layout */ +display: flex; +flex-direction: row; +justify-content: center; +align-items: center; +padding: 4px; + +width: 40px; +height: 40px; +/* Inside auto layout */ +flex: none; +order: 1; +flex-grow: 0; +/* Vector */ +width: 32px; +height: 32px; +/* Light black */ +background: #5C5C5E; +/* Inside auto layout */ +flex: none; +order: 0; +flex-grow: 1; diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/app.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/app.css index 9390d91..7b0ac83 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/app.css +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/app.css @@ -1,15 +1,31 @@ @import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@300;400;700&display=swap'); +:root { + --background: linear-gradient(180deg, #2B1D3D 0%, #171229 100%); + --violet: #A380D1; + --red: #FF5E51; + --yellow: #FFC107; + --green: #43F8C0; + --light-grey: #5C5C5E; + --black: rgba(44, 43, 46, 0.8); + --white: #fff; + --semi-black: rgba(0, 0, 0, 0.5); + --small-radius: 4px; + --radius: 6px; + --drop-shadow: 0px 0px 20px rgba(0, 0, 0, 0.25); +} + html, body { margin: 0; padding: 0; height: 100%; font-family: 'Noto Sans', sans-serif; + font-size: 12rem } body { - background: linear-gradient(180deg, #2B1D3D 0%, #171229 100%); + background: var(--background); overflow: hidden } diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/default-account.png b/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/default-account.png new file mode 100644 index 0000000000000000000000000000000000000000..61a7c68f4a11702f2a01f8ee60317d407b14bf7d GIT binary patch literal 6408 zcmW+*cRbba`+nYU2j|E*gphIUWS8xOW0SH{iHykJJNr%9g=7~F86_DdByqA=Mubw4 zk-f9W`T73-x}W>GUia&||GMt$dG0tveQg>lHYxxBjjoP{F#y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&r!PnEzqS6hX` z{d?ivM<`*DTg+7>ad^HEGU!&$hB%uir1TbKiO#VagA&k8|UwrP?Jr z)|j{r5BbZ#G2n9>K-KJn_r{QPV1mISp>~Oj0X#60j4f;hbL2XM!{TLS$H!7@r3&zv z%nd&DwxZZIx~1;Tq`MUGm^vEMEcsOO_;6AEBy^?gEZ(e@$0n5jjUfg|II(R+0RNQgnQ$3M8TO`ph?D-EZ3}KnckloRg zx%E%GQG$I=|KR2Gm$Wg&c8Se@-acgRmo*CvZ&H3!P~Lb%4dW`uzu0Acc{BE=4t1>0 zpz0di80wX%lI2TRq?|jIKz2hO3z$+|&a=tT;itcpCS8WUk%`GHXoT^P`rR91bPSSj{6q6%&9C}l@zl;w{A7$GCeJ85 z2~8`fD9O-j@SsB_Q|^8f>^$a(3cF`G#o+51^l&fh5f+6f3n}%9PJymfZ0SS{&3!&L zc^wOU7i^hW>%>0D?lC8H-RilO<)LCPTX3iKRi;+?ALwU+bn zy2Zu)^w$(>vt&_?slpdLcCpa%q*Z0DA>Cs$OG}l?@t^`uJn+AfluH(I@ARXf3v0%Z zEN5ZLcJW{_3ZRK+1Wp~j9S?x_Oe!)Zd!&LNE!yr<8V<*TSW(TTz`+-89Q62jenPo1 z$}vY{0jFC}4&x%|)ez)V?14y73w0|j{4j+Vz_^%U0+F%t%ByGO7kxPFHFYT=ykOat zXiuCc6~q7|q-G+5kfUgo(jEd4YK~A8EX_TsDD(h0zomLob&#E_<1o;PhH)ShjeW@y z@d$-v71(@i8Svq$oDE{d;AtVl$Lu4HUCi(eEFzl5vM8GQE%|L?027K}9JMZD_1=@G yO=vtI translationService.Translate(nameof(GamesIdeas)); + public string ManualAdd => translationService.Translate(nameof(ManualAdd)); + public string AutoAdd => translationService.Translate(nameof(AutoAdd)); } public static class ResourcesKey @@ -16,4 +18,6 @@ public static class ResourcesKey } public static string GamesIdeas => _instance?.GamesIdeas ?? throw new InvalidOperationException("ResourcesKey.GamesIdeas is not initialized."); + public static string ManualAdd => _instance?.ManualAdd ?? throw new InvalidOperationException("ResourcesKey.ManualAdd is not initialized."); + public static string AutoAdd => _instance?.AutoAdd ?? throw new InvalidOperationException("ResourcesKey.AutoAdd 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 83fbcd7..022260c 100644 --- a/src/GameIdeas/Server/GameIdeas.WebAPI/Files/GameIdeas.fr.json +++ b/src/GameIdeas/Server/GameIdeas.WebAPI/Files/GameIdeas.fr.json @@ -1,3 +1,5 @@ { - "GamesIdeas": "Game Ideas" + "GamesIdeas": "Game Ideas", + "ManualAdd": "Ajout manuel", + "AutoAdd": "Ajout automatique" } \ No newline at end of file -- 2.39.5 From c04b8285d7d66a91efa8ee754fd43940bf934bf8 Mon Sep 17 00:00:00 2001 From: egamorf76 Date: Fri, 21 Feb 2025 21:08:49 +0100 Subject: [PATCH 03/13] Update blazor architecture --- .../Client/GameIdeas.BlazorApp/App.razor | 8 +- .../Layouts/MainLayout.razor | 14 + .../Layouts/MainLayout.razor.cs | 16 ++ .../Layouts/MainLayout.razor.css | 41 +++ .../Pages/Games/GamesBase.razor | 13 +- .../Pages/Games/GamesBase.razor.cs | 21 +- .../Client/GameIdeas.BlazorApp/Program.cs | 16 +- .../Shared/Components/Header.razor | 38 --- .../Shared/Components/Header.razor.css | 257 ------------------ .../Shared/Components/HeaderLayout.razor | 41 +++ ...{Header.razor.cs => HeaderLayout.razor.cs} | 4 +- .../Shared/Components/HeaderLayout.razor.css | 66 +++++ .../Shared/Components/Loader.razor | 1 + .../Shared/Components/Loader.razor.css | 31 +++ .../Client/GameIdeas.BlazorApp/_Imports.razor | 1 - .../GameIdeas.BlazorApp/wwwroot/css/app.css | 60 +--- .../GameIdeas.BlazorApp/wwwroot/index.html | 2 +- 17 files changed, 252 insertions(+), 378 deletions(-) create mode 100644 src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor create mode 100644 src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor.cs create mode 100644 src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor.css delete mode 100644 src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Header.razor delete mode 100644 src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Header.razor.css create mode 100644 src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/HeaderLayout.razor rename src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/{Header.razor.cs => HeaderLayout.razor.cs} (68%) create mode 100644 src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/HeaderLayout.razor.css create mode 100644 src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Loader.razor create mode 100644 src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Loader.razor.css diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/App.razor b/src/GameIdeas/Client/GameIdeas.BlazorApp/App.razor index 3cfa54f..cc3223e 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/App.razor +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/App.razor @@ -1,11 +1,13 @@ - +@using GameIdeas.BlazorApp.Layouts + + - + Not found - +

Sorry, there's nothing at this address.

diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor b/src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor new file mode 100644 index 0000000..f9b7cd3 --- /dev/null +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor @@ -0,0 +1,14 @@ +@using GameIdeas.BlazorApp.Shared.Components +@inherits LayoutComponentBase + +
+ @if (IsLoading) { + + } + + @Body + + + + +
diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor.cs b/src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor.cs new file mode 100644 index 0000000..bb4f4af --- /dev/null +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor.cs @@ -0,0 +1,16 @@ + +using System.Net.Http.Json; +using GameIdeas.Resources; + +namespace GameIdeas.BlazorApp.Layouts +{ + public partial class MainLayout + { + public bool IsLoading { get; set; } = true; + + protected override void OnInitialized() + { + IsLoading = false; + } + } +} \ No newline at end of file diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor.css new file mode 100644 index 0000000..982fdd4 --- /dev/null +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor.css @@ -0,0 +1,41 @@ +.page { + background: var(--background); + overflow: hidden +} + +.orb { + position: absolute; + border-radius: 100%; +} + +.green { + position: absolute; + width: 80vh; + height: 80vh; + top: -20vh; + background: #315941; + filter: blur(30vh); + z-index: -999; +} + +.blue { + position: absolute; + width: 80vw; + height: 80vw; + left: 10vw; + top: 50vh; + background: #3A4156; + filter: blur(30vh); + z-index: -999; +} + +.red { + position: absolute; + width: 100vh; + height: 100vh; + left: 60vw; + top: -30vh; + background: #593533; + filter: blur(30vh); + z-index: -999; +} diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/GamesBase.razor b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/GamesBase.razor index 9591ca2..2e117ad 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/GamesBase.razor +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/GamesBase.razor @@ -1,5 +1,14 @@ -@page "/" +@page "/Games" +@using GameIdeas.BlazorApp.Layouts +@using GameIdeas.BlazorApp.Shared.Components +@using GameIdeas.Resources -@inherits LayoutComponentBase +@layout MainLayout +@ResourcesKey.GamesIdeas + + +
Prout
+ +
diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/GamesBase.razor.cs b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/GamesBase.razor.cs index 087075f..cde8f1f 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/GamesBase.razor.cs +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/GamesBase.razor.cs @@ -1,24 +1,5 @@ -using Microsoft.AspNetCore.Components; -using System.Net.Http.Json; -using GameIdeas.Resources; - namespace GameIdeas.BlazorApp.Pages.Games; -public partial class GamesBase ( - IHttpClientFactory HttpClientFactory, - TranslationService TranslationService, - Translations Translations) : LayoutComponentBase +public partial class GamesBase () { - protected override async Task OnInitializedAsync() - { - var client = HttpClientFactory.CreateClient("GameIdeas.WebAPI"); - var response = await client.GetAsync("api/Translations"); - var dictionary = await response.Content.ReadFromJsonAsync>(); - if (dictionary != null) - { - TranslationService.Initialize(dictionary); - ResourcesKey.Initialize(Translations); - } - - } } \ No newline at end of file diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Program.cs b/src/GameIdeas/Client/GameIdeas.BlazorApp/Program.cs index bf5571b..d68b7f2 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Program.cs +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Program.cs @@ -1,3 +1,4 @@ +using System.Net.Http.Json; using GameIdeas.BlazorApp; using GameIdeas.Resources; using Microsoft.AspNetCore.Components.Web; @@ -23,4 +24,17 @@ builder.Services.AddHttpClient( builder.Services.AddSingleton(); builder.Services.AddSingleton(); -await builder.Build().RunAsync(); \ No newline at end of file +var app = builder.Build(); + +var client = app.Services.GetService()?.CreateClient("GameIdeas.WebAPI") ?? + throw new Exception("Http client not found"); +var response = await client.GetAsync("api/Translations"); +var dictionary = await response.Content.ReadFromJsonAsync>(); + +if (dictionary != null) +{ + app.Services.GetService()!.Initialize(dictionary); + ResourcesKey.Initialize(app.Services.GetService()!); +} + +await app.RunAsync(); \ No newline at end of file diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Header.razor b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Header.razor deleted file mode 100644 index 347d232..0000000 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Header.razor +++ /dev/null @@ -1,38 +0,0 @@ -@using GameIdeas.Resources -@inherits ComponentBase - -
-
- Game Ideas -
-
- @Body -
- -
diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Header.razor.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Header.razor.css deleted file mode 100644 index f9a0ebd..0000000 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Header.razor.css +++ /dev/null @@ -1,257 +0,0 @@ -.header-tab { - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: flex-end; - padding: 0px 10px; - height: 40px; - width: 100%; -} - -.header-icon { - display: flex; - justify-content: center; - align-items: center; - padding: 4px; - width: 40%; - height: 100%; -} - -.header-body { - -} - -.account-container { - display: flex; - flex-direction: row; - justify-content: flex-end; - align-items: flex-end; -} - -.button-icon { - color: var(--white); -} - -.account-icon { -} - -.add-container { - -} - -.button { - -} - -.manual-add { - -} - -.more-add { - -} - -.dropdown-more-add { - -} - -.drowdown-more-element { - -} - -/* Frame */ - -/* Auto layout */ - -padding: 0px; -gap: 40px; - -width: 136px; -height: 40px; -/* Inside auto layout */ -flex: none; -order: 2; -flex-grow: 0; -/* Frame 9 */ -width: 56px; -height: 28px; -/* Violet */ -background: #A380D1; -border-radius: 4px; -/* Inside auto layout */ -flex: none; -order: 0; -flex-grow: 0; -/* Frame 55 */ -/* Auto layout */ -display: flex; -flex-direction: column; -align-items: flex-start; -padding: 0px; -gap: 10px; - -position: absolute; -width: 132px; -height: 56px; -left: 0px; -top: 28px; -/* Violet */ -background: #A380D1; -box-shadow: -border-radius: 4px; -/* Frame 56 */ -/* Auto layout */ -display: flex; -flex-direction: column; -align-items: flex-start; -padding: 4px; -gap: 10px; - -width: 132px; -height: 56px; -/* Inside auto layout */ -flex: none; -order: 0; -flex-grow: 0; -/* Ajout manuel */ -width: 89px; -height: 19px; - -font-family: 'Noto Sans'; -font-style: normal; -font-weight: 400; -font-size: 14px; -line-height: 19px; -/* identical to box height */ -color: #FFFFFF; -/* Inside auto layout */ -flex: none; -order: 0; -flex-grow: 0; -/* Ajout automatique */ -width: 124px; -height: 19px; - -font-family: 'Noto Sans'; -font-style: normal; -font-weight: 400; -font-size: 14px; -line-height: 19px; -/* identical to box height */ -color: #FFFFFF; -/* Inside auto layout */ -flex: none; -order: 1; -flex-grow: 0; -/* Frame */ -/* Auto layout */ -display: flex; -flex-direction: column; -justify-content: center; -align-items: center; -padding: 0px; - -position: absolute; -width: 28px; -height: 28px; -left: 0px; -top: 0px; -/* Frame 10 */ -/* Auto layout */ -display: flex; -flex-direction: column; -justify-content: center; -align-items: center; -padding: 0px; - -width: 16px; -height: 16px; -/* Inside auto layout */ -flex: none; -order: 0; -flex-grow: 0; -/* Frame */ -width: 24px; -height: 24px; -/* Inside auto layout */ -flex: none; -order: 0; -flex-grow: 0; -/* Vector */ -position: absolute; -left: 20.83%; -right: 20.83%; -top: 20.83%; -bottom: 20.83%; -/* White */ -background: #FFFFFF; -/* Line 5 */ -position: absolute; -width: 28px; -height: 0px; -left: 28px; -top: 0px; - -border: 1px solid rgba(0, 0, 0, 0.2); -transform: rotate(90deg); -/* Frame */ -/* Auto layout */ -display: flex; -flex-direction: column; -justify-content: center; -align-items: center; -padding: 0px; - -position: absolute; -width: 28px; -height: 28px; -left: 28px; -top: 0px; -/* Frame 10 */ -/* Auto layout */ -display: flex; -flex-direction: column; -justify-content: center; -align-items: center; -padding: 0px; - -width: 16px; -height: 16px; -/* Inside auto layout */ -flex: none; -order: 0; -flex-grow: 0; -/* Polygon 11 */ -width: 16px; -height: 10px; -/* White */ -background: #FFFFFF; -transform: rotate(-180deg); -/* Inside auto layout */ -flex: none; -order: 0; -align-self: stretch; -flex-grow: 0; -/* Icon account */ -/* Auto layout */ -display: flex; -flex-direction: row; -justify-content: center; -align-items: center; -padding: 4px; - -width: 40px; -height: 40px; -/* Inside auto layout */ -flex: none; -order: 1; -flex-grow: 0; -/* Vector */ -width: 32px; -height: 32px; -/* Light black */ -background: #5C5C5E; -/* Inside auto layout */ -flex: none; -order: 0; -flex-grow: 1; diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/HeaderLayout.razor b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/HeaderLayout.razor new file mode 100644 index 0000000..e857a73 --- /dev/null +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/HeaderLayout.razor @@ -0,0 +1,41 @@ +@using GameIdeas.Resources +@inherits LayoutComponentBase + +
+
+ Game Ideas +
+ + @Body + + +
diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Header.razor.cs b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/HeaderLayout.razor.cs similarity index 68% rename from src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Header.razor.cs rename to src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/HeaderLayout.razor.cs index 6587063..8879ccd 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Header.razor.cs +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/HeaderLayout.razor.cs @@ -2,10 +2,8 @@ using Microsoft.AspNetCore.Components; namespace GameIdeas.BlazorApp.Shared.Components; -public partial class Header +public partial class HeaderLayout : LayoutComponentBase { - [Parameter] public RenderFragment? Body { get; set; } - private Task HandleIconClicked() { throw new NotImplementedException(); diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/HeaderLayout.razor.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/HeaderLayout.razor.css new file mode 100644 index 0000000..43fa775 --- /dev/null +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/HeaderLayout.razor.css @@ -0,0 +1,66 @@ +.header-tab { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: flex-end; + padding: 0px 10px; + height: 40px; + width: 100%; +} + +.icon-container { + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + width: 40px; + height: 100%; +} + +.account-add-container { + display: flex; + flex-direction: row; + justify-content: flex-end; + align-items: flex-end; +} + +.add-container { + overflow: visible; +} + +.add-buttons { + display: flex; + flex-direction: row; + background: var(--violet); + border-radius: var(--small-radius); +} + +.button { + display: flex; + justify-content: center; + align-items: center; + width: 28px; + height: 28px; +} + +.first-button { + border-right: 1px solid var(--line-black); +} + +.button-icon { + color: var(--white); +} + +.account-icon { + color: var(--light-grey); +} + +.dropdown-more-add { + background: var(--violet); + box-shadow: var(--drop-shadow); + border-radius: var(--small-radius); +} + +.drowdown-more-element { + width: 100%; +} \ No newline at end of file diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Loader.razor b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Loader.razor new file mode 100644 index 0000000..d8b5aa6 --- /dev/null +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Loader.razor @@ -0,0 +1 @@ +
diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Loader.razor.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Loader.razor.css new file mode 100644 index 0000000..4814a07 --- /dev/null +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Loader.razor.css @@ -0,0 +1,31 @@ +.overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: var(--semi-black); + display: flex; + align-items: center; + justify-content: center; + z-index: 1000; +} + +.loader { + border: 8px solid var(--white); + border-top: 8px solid var(--violet); + border-radius: 50%; + width: 60px; + height: 60px; + animation: spin 1s linear infinite; +} + +@keyframes spin { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } +} \ No newline at end of file diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/_Imports.razor b/src/GameIdeas/Client/GameIdeas.BlazorApp/_Imports.razor index 8956baf..d37285f 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/_Imports.razor +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/_Imports.razor @@ -6,4 +6,3 @@ @using Microsoft.AspNetCore.Components.Web.Virtualization @using Microsoft.AspNetCore.Components.WebAssembly.Http @using Microsoft.JSInterop -@using GameIdeas.BlazorApp.Pages.Games diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/app.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/app.css index 7b0ac83..42733a1 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/app.css +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/app.css @@ -10,66 +10,22 @@ --black: rgba(44, 43, 46, 0.8); --white: #fff; --semi-black: rgba(0, 0, 0, 0.5); + --line-black: rgba(0, 0, 0, 0.2); --small-radius: 4px; --radius: 6px; --drop-shadow: 0px 0px 20px rgba(0, 0, 0, 0.25); } -html, body { +html { + font-family: 'Noto Sans', sans-serif; + font-size: 12px +} + +html, body, .app { margin: 0; padding: 0; height: 100%; - - font-family: 'Noto Sans', sans-serif; - font-size: 12rem -} - -body { - background: var(--background); - overflow: hidden -} - -html::before, -body::before, -body::after { - content: ""; - position: absolute; - border-radius: 100%; -} - -html::before { - /*Green orb*/ - position: absolute; - width: 80vh; - height: 80vh; - top: -20vh; - background: #315941; - filter: blur(30vh); - z-index: -999; -} - -body::before { - /*Blue orb*/ - position: absolute; - width: 80vw; - height: 80vw; - left: 10vw; - top: 50vh; - background: #3A4156; - filter: blur(30vh); - z-index: -999; -} - -body::after { - /*Reb orb*/ - position: absolute; - width: 100vh; - height: 100vh; - left: 60vw; - top: -30vh; - background: #593533; - filter: blur(30vh); - z-index: -999; + overflow: hidden; } h1:focus { diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/index.html b/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/index.html index 4d324bb..0c6c62d 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/index.html +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/index.html @@ -5,7 +5,7 @@ Game Ideas - + -- 2.39.5 From f9f6e5843a83119e4baed4f02ebaf3b4f749bc8e Mon Sep 17 00:00:00 2001 From: Egamorf Date: Sun, 23 Feb 2025 16:31:07 +0100 Subject: [PATCH 04/13] Update solution --- src/GameIdeas/GameIdeas.sln | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/GameIdeas/GameIdeas.sln b/src/GameIdeas/GameIdeas.sln index 8e12f8a..2166a5d 100644 --- a/src/GameIdeas/GameIdeas.sln +++ b/src/GameIdeas/GameIdeas.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 -VisualStudioVersion = 17.12.35506.116 d17.12 +VisualStudioVersion = 17.12.35506.116 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameIdeas.BlazorApp", "Client\GameIdeas.BlazorApp\GameIdeas.BlazorApp.csproj", "{ABBADA2F-9017-49A2-AEB9-AC2DB7D70831}" EndProject @@ -45,4 +45,7 @@ Global {ABBADA2F-9017-49A2-AEB9-AC2DB7D70831} = {9598BBAF-CC9F-4F43-82B2-40F57296C9F0} {61C3985E-15DF-4127-9D1F-CAE39F0ADD17} = {F59BED34-9473-436A-A91A-23510A4E0E87} EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {6380DD77-53E4-4F3B-BB45-FAD2263D1511} + EndGlobalSection EndGlobal -- 2.39.5 From 99e541083fae52584d04d4a2d9b45a9ea791bd93 Mon Sep 17 00:00:00 2001 From: Egamorf Date: Sun, 23 Feb 2025 19:31:16 +0100 Subject: [PATCH 05/13] Update style --- .../Layouts/MainLayout.razor | 7 +-- .../Layouts/MainLayout.razor.css | 14 ++---- .../Shared/Components/HeaderLayout.razor | 24 +++++----- .../Shared/Components/HeaderLayout.razor.cs | 16 ++++++- .../Shared/Components/HeaderLayout.razor.css | 47 +++++++++++++++++-- .../GameIdeas.BlazorApp/wwwroot/css/app.css | 14 +++++- 6 files changed, 91 insertions(+), 31 deletions(-) diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor b/src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor index f9b7cd3..830f1af 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor @@ -8,7 +8,8 @@ @Body - - -
+ + + + diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor.css index 982fdd4..92cedd7 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor.css +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor.css @@ -1,41 +1,37 @@ .page { - background: var(--background); - overflow: hidden + height: 100%; + overflow: hidden; + z-index: 1; } .orb { position: absolute; border-radius: 100%; + z-index: -1; } .green { - position: absolute; width: 80vh; height: 80vh; top: -20vh; background: #315941; filter: blur(30vh); - z-index: -999; } .blue { - position: absolute; width: 80vw; height: 80vw; left: 10vw; top: 50vh; background: #3A4156; filter: blur(30vh); - z-index: -999; } .red { - position: absolute; width: 100vh; height: 100vh; left: 60vw; - top: -30vh; + top: -40vh; background: #593533; filter: blur(30vh); - z-index: -999; } diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/HeaderLayout.razor b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/HeaderLayout.razor index e857a73..1655974 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/HeaderLayout.razor +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/HeaderLayout.razor @@ -12,28 +12,30 @@
- +
-
- +
+
-
-
diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/HeaderLayout.razor.cs b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/HeaderLayout.razor.cs index 8879ccd..0353f16 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/HeaderLayout.razor.cs +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/HeaderLayout.razor.cs @@ -4,8 +4,22 @@ namespace GameIdeas.BlazorApp.Shared.Components; public partial class HeaderLayout : LayoutComponentBase { - private Task HandleIconClicked() + private bool AddButtonsVisile = false; + private ElementReference DropdownAdd; + + private void HandleIconClicked() { throw new NotImplementedException(); } + + private async Task HandleMoreAddClickedAsync() + { + AddButtonsVisile = !AddButtonsVisile; + await DropdownAdd.FocusAsync(); + } + + private void HandlerDropdownAddFocusOut() + { + AddButtonsVisile = false; + } } diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/HeaderLayout.razor.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/HeaderLayout.razor.css index 43fa775..321d27b 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/HeaderLayout.razor.css +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/HeaderLayout.razor.css @@ -5,7 +5,6 @@ align-items: flex-end; padding: 0px 10px; height: 40px; - width: 100%; } .icon-container { @@ -17,6 +16,15 @@ height: 100%; } + .icon-container img { + max-height: 85%; + max-width: 85%; + } + +.icon-container:hover { + cursor: pointer; +} + .account-add-container { display: flex; flex-direction: row; @@ -26,6 +34,7 @@ .add-container { overflow: visible; + margin-right: 40px; } .add-buttons { @@ -33,6 +42,7 @@ flex-direction: row; background: var(--violet); border-radius: var(--small-radius); + overflow: hidden; } .button { @@ -44,23 +54,50 @@ } .first-button { - border-right: 1px solid var(--line-black); + border-right: 2px solid var(--line-black); +} + +.second-button .button-icon { + padding: 6px; } .button-icon { - color: var(--white); + fill: var(--white); } + .button-icon:hover { + background: var(--line-black); + cursor: pointer; + } + + .account-icon { - color: var(--light-grey); + fill: var(--light-grey); } .dropdown-more-add { + margin-top: 0px; + display: flex; + flex-direction: column; + gap: 4px; background: var(--violet); box-shadow: var(--drop-shadow); border-radius: var(--small-radius); + position: fixed; + padding: 4px; + animation-name: fade-in; + animation-duration: 0.4s } .drowdown-more-element { - width: 100%; + width: fit-content; +} + +.drowdown-more-element:hover { + color: var(--light-grey); + cursor: pointer; +} + +.invisible { + display: none; } \ No newline at end of file diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/app.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/app.css index 42733a1..afefa49 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/app.css +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/app.css @@ -18,16 +18,21 @@ html { font-family: 'Noto Sans', sans-serif; - font-size: 12px + font-size: 12px; + color: var(--white) } -html, body, .app { +html, body, #app { margin: 0; padding: 0; height: 100%; overflow: hidden; } +#app { + background: var(--background); +} + h1:focus { outline: none; } @@ -137,4 +142,9 @@ code { .form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder { text-align: start; +} + +@keyframes fade-in { + 0% {opacity: 0} + 100% {opacity: 1} } \ No newline at end of file -- 2.39.5 From c76cabafdb812f0508ebf5f57aa58a9330c875b6 Mon Sep 17 00:00:00 2001 From: Egamorf Date: Sun, 23 Feb 2025 21:36:50 +0100 Subject: [PATCH 06/13] Fox missing orb --- .../GameIdeas.BlazorApp/Layouts/MainLayout.razor | 2 ++ .../Layouts/MainLayout.razor.css | 13 +++++++++++-- .../Shared/Components/HeaderLayout.razor.cs | 11 ++++++++++- .../Client/GameIdeas.BlazorApp/wwwroot/css/app.css | 4 ++-- 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor b/src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor index 830f1af..651b9eb 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor @@ -13,3 +13,5 @@ + +
\ No newline at end of file diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor.css index 92cedd7..cd61f2c 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor.css +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor.css @@ -1,13 +1,12 @@ .page { height: 100%; overflow: hidden; - z-index: 1; } .orb { position: absolute; border-radius: 100%; - z-index: -1; + z-index: -999; } .green { @@ -35,3 +34,13 @@ background: #593533; filter: blur(30vh); } + +.background { + height: 100%; + width: 100%; + background: var(--background); + position: fixed; + top: 0; + left: 0; + z-index: -1000; +} \ No newline at end of file diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/HeaderLayout.razor.cs b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/HeaderLayout.razor.cs index 0353f16..c05e5eb 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/HeaderLayout.razor.cs +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/HeaderLayout.razor.cs @@ -5,6 +5,7 @@ namespace GameIdeas.BlazorApp.Shared.Components; public partial class HeaderLayout : LayoutComponentBase { private bool AddButtonsVisile = false; + private bool AddButtonsActive = false; private ElementReference DropdownAdd; private void HandleIconClicked() @@ -14,7 +15,15 @@ public partial class HeaderLayout : LayoutComponentBase private async Task HandleMoreAddClickedAsync() { - AddButtonsVisile = !AddButtonsVisile; + if (AddButtonsActive == true) + { + AddButtonsVisile = false; + } + else + { + AddButtonsVisile = !AddButtonsVisile; + } + await DropdownAdd.FocusAsync(); } diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/app.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/app.css index afefa49..3bd1fab 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/app.css +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/app.css @@ -29,9 +29,9 @@ html, body, #app { overflow: hidden; } -#app { +/*#app { background: var(--background); -} +}*/ h1:focus { outline: none; -- 2.39.5 From 06dcd9e811ce1e41727100ba0236c12dbd086650 Mon Sep 17 00:00:00 2001 From: Egamorf Date: Mon, 24 Feb 2025 02:01:15 +0100 Subject: [PATCH 07/13] Fix dropdown double click --- .../Shared/Components/HeaderLayout.razor | 3 ++- .../Shared/Components/HeaderLayout.razor.cs | 16 ++++++---------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/HeaderLayout.razor b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/HeaderLayout.razor index 1655974..24bcc9d 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/HeaderLayout.razor +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/HeaderLayout.razor @@ -23,7 +23,8 @@
-