From 0bf064327b7baff8d1dc43b61d7ab0e597cbf31a Mon Sep 17 00:00:00 2001 From: Egamorf Date: Sun, 18 May 2025 14:41:37 +0200 Subject: [PATCH] Rework style and loading --- .../Layouts/MainLayout.razor | 6 - .../Layouts/MainLayout.razor.css | 43 ------- .../Components/GameRowSkeleton.razor.css | 12 -- .../Pages/UserMenu/Components/Login.razor.css | 2 +- .../Components/UserRowSkeleton.razor.css | 13 -- .../CircleLoader/CircleLoader.razor.css | 10 -- .../Shared/Components/Select/Select.razor.css | 2 - .../GameIdeas.BlazorApp/wwwroot/css/app.css | 115 +++++++++--------- .../wwwroot/css/background.css | 42 +++++++ .../GameIdeas.BlazorApp/wwwroot/index.html | 17 ++- 10 files changed, 111 insertions(+), 151 deletions(-) create mode 100644 src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/background.css diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor b/src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor index 8b1aa4e..071eba2 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor @@ -3,10 +3,4 @@
@Body -
- -
- - -
\ 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 60ead01..e002557 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor.css +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Layouts/MainLayout.razor.css @@ -2,47 +2,4 @@ display: flex; flex-direction: column; height: 100%; -} - -.orb { - position: absolute; - border-radius: 100%; - z-index: var(--index-orb); -} - -.green { - width: 80vh; - height: 80vh; - top: -20vh; - background: #315941; - filter: blur(30vh); -} - -.blue { - width: 80vw; - height: 80vw; - left: 10vw; - top: 50vh; - background: #3A4156; - filter: blur(30vh); -} - -.red { - width: 100vh; - height: 100vh; - left: 60vw; - top: -40vh; - background: #593533; - filter: blur(30vh); -} - -.background { - height: 100vh; - width: 100vw; - background: var(--background); - position: fixed; - overflow: hidden; - top: 0; - left: 0; - z-index: var(--index-background); } \ 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 index df41d48..b98c317 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRowSkeleton.razor.css +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameRowSkeleton.razor.css @@ -96,16 +96,4 @@ .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/UserMenu/Components/Login.razor.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/UserMenu/Components/Login.razor.css index 04ccf95..0e3214e 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/UserMenu/Components/Login.razor.css +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/UserMenu/Components/Login.razor.css @@ -50,6 +50,6 @@ border-radius: 50%; border: 3px solid rgba(0, 0, 0, 0.2); border-top-color: var(--white); - animation: loading 1s linear infinite; + animation: spin 1s linear infinite; justify-self: center; } diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Users/Components/UserRowSkeleton.razor.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Users/Components/UserRowSkeleton.razor.css index 7d553ed..f654176 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Users/Components/UserRowSkeleton.razor.css +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Users/Components/UserRowSkeleton.razor.css @@ -54,16 +54,3 @@ fill: var(--yellow); } -@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); - } -} diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/CircleLoader/CircleLoader.razor.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/CircleLoader/CircleLoader.razor.css index 6eee889..a0d9070 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/CircleLoader/CircleLoader.razor.css +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/CircleLoader/CircleLoader.razor.css @@ -19,13 +19,3 @@ height: 60px; animation: spin 1s linear infinite; } - -@keyframes spin { - 0% { - transform: rotate(0deg); - } - - 100% { - transform: rotate(360deg); - } -} diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Select/Select.razor.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Select/Select.razor.css index 4faecde..5353fb6 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Select/Select.razor.css +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Components/Select/Select.razor.css @@ -22,8 +22,6 @@ overflow: hidden; display: flex; flex-direction: column; - animation-name: fade-in; - animation-duration: 0.2s; } .line { diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/app.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/app.css index e3bf462..837adf6 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/app.css +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/app.css @@ -81,65 +81,21 @@ html, body, #app { content: "An error has occurred." } -.loading-progress { - position: relative; - display: block; - width: 8rem; - height: 8rem; - margin: 20vh auto 1rem auto; +#loading-progress { + display: flex; + width: 100vw; + height: 100vh; + justify-content: center; + align-items: center; + animation: loading-background 4s linear infinite; } - .loading-progress circle { - fill: none; - stroke: #e0e0e0; - stroke-width: 0.6rem; - transform-origin: 50% 50%; - transform: rotate(-90deg); + #loading-progress > #loading-icon { + max-width: 200px; + max-height: 200px; + animation: loading-icon 4s ease-in-out infinite; } - .loading-progress circle:last-child { - stroke: #1b6ec2; - stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%; - transition: stroke-dasharray 0.05s ease-in-out; - } - -.loading-progress-text { - color: #000; - position: absolute; - text-align: center; - font-weight: bold; - inset: calc(20vh + 3.25rem) 0 auto 0.2rem; -} - - .loading-progress-text:after { - content: var(--blazor-load-percentage-text, "Loading"); - } - -code { - color: #c02d76; -} - -.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder { - color: var(--bs-secondary-color); - text-align: end; -} - -.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder { - text-align: start; -} - -:focus-visible { - outline: none; -} - -.expand-col-2 { - grid-column: 1 / 3; -} - -.expand-row-2 { - grid-row: 1 / 3; -} - .body-sm { color: #ccc } @@ -158,14 +114,55 @@ code { text-decoration: none; } +@keyframes loading-background { + 0% { + background: rgb(0, 0, 0, 0.2); + } -@keyframes fade-in { - 0% {opacity: 0} - 100% {opacity: 1} + 50% { + background: rgb(0, 0, 0, 0.3); + } + + 100% { + background: rgb(0, 0, 0, 0.2); + } +} + + +@keyframes loading-icon { + 0% { + transform: scale(1); + } + + 50% { + transform: scale(0.95); + } + + 100% { + transform: scale(1); + } } @keyframes loading { - to { + 0% { + background: rgb(255, 255, 255, 0.05); + } + + 50% { + background: rgb(255, 255, 255, 0.2); + } + + 100% { + background: rgb(255, 255, 255, 0.05); + } +} + +@keyframes spin { + 0% { + transform: rotate(0deg); + } + + 100% { transform: rotate(360deg); } } \ No newline at end of file diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/background.css b/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/background.css new file mode 100644 index 0000000..9f7cba6 --- /dev/null +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/css/background.css @@ -0,0 +1,42 @@ +.orb { + position: absolute; + border-radius: 100%; + z-index: var(--index-orb); +} + +.green { + width: 80vh; + height: 80vh; + top: -20vh; + background: #315941; + filter: blur(30vh); +} + +.blue { + width: 80vw; + height: 80vw; + left: 10vw; + top: 50vh; + background: #3A4156; + filter: blur(30vh); +} + +.red { + width: 100vh; + height: 100vh; + left: 60vw; + top: -40vh; + background: #593533; + filter: blur(30vh); +} + +#background { + height: 100vh; + width: 100vw; + background: var(--background); + position: fixed; + overflow: hidden; + top: 0; + left: 0; + z-index: var(--index-background); +} diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/index.html b/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/index.html index 4400e66..0b38306 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/index.html +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/wwwroot/index.html @@ -7,17 +7,23 @@ Game Ideas +
- - - - -
+
+ +
+ +
+ +
+ + +
@@ -25,6 +31,7 @@ Reload 🗙
+