From a437994235839d69eb62929c7a3c1605610560ea Mon Sep 17 00:00:00 2001 From: Kaan Date: Fri, 22 Mar 2024 21:06:23 +0300 Subject: [PATCH] ui: fix scrollbar colors, handle NaN and zero state on homepage and some cleanup on svg icons --- src/app.pcss | 16 +++++++ src/components/HomepageCounter.svelte | 21 +++++++++ src/routes/+page.svelte | 67 +++------------------------ 3 files changed, 44 insertions(+), 60 deletions(-) create mode 100644 src/components/HomepageCounter.svelte diff --git a/src/app.pcss b/src/app.pcss index 64b0630..46ea02e 100644 --- a/src/app.pcss +++ b/src/app.pcss @@ -41,6 +41,22 @@ h3 { @apply outline-none ring-2 ring-sky-400; } +::-webkit-scrollbar { + @apply w-[8px]; +} + +::-webkit-scrollbar-track { + @apply bg-[var(--page-bg)] +} + +::-webkit-scrollbar-thumb { + @apply rounded-xl bg-[#3c4f7c] +} + +::-webkit-scrollbar-thumb:hover { + @apply bg-[#526ca8] +} + .cta-button { background: linear-gradient(0deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.06)), radial-gradient(109.26% 109.26% at 49.83% 13.37%, #ffffff 0%, #babaca 100%); diff --git a/src/components/HomepageCounter.svelte b/src/components/HomepageCounter.svelte new file mode 100644 index 0000000..68ded98 --- /dev/null +++ b/src/components/HomepageCounter.svelte @@ -0,0 +1,21 @@ + + +{#if count > 0} +
+

+ + {count}+ +

+
{subText}
+
+{/if} diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 4af965f..1ff929f 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -2,6 +2,7 @@ import embedImage from "$assets/branding/suyu__Embed-Image.png"; import type { PageData } from "./$types"; import suyuWindow from "$assets/mockups/suyuwindow.png"; + import HomepageCounter from "$components/HomepageCounter.svelte"; import { XCircleOutline } from "flowbite-svelte-icons"; import { Dialog } from "radix-svelte"; @@ -76,12 +77,10 @@ class="cta-button" > Download

By the numbers

-
-

- - {contributors}+ -

-
dedicated contributors
-
-
-

- {starCount}+ -

-
GitLab stars
-
-
-

- - 4000+ -

-
supported games
-
-
-

- - {memberCount}+ -

-
members on Discord
-
+ + + +