From 7b2fcb5d0d25222951e2b8e042cc20ec485626d8 Mon Sep 17 00:00:00 2001 From: Chen Asraf Date: Mon, 21 Oct 2024 02:08:02 +0300 Subject: [PATCH] feat: screenshots pages update --- .../components/Loader/LoadingContainer.tsx | 9 ++++++- frontend/src/components/Sidebar/Sidebar.tsx | 2 +- .../src/pages/Screenshots/ScreenshotsPage.tsx | 25 ++++++++++++------- frontend/src/style.css | 10 ++++++++ 4 files changed, 35 insertions(+), 11 deletions(-) diff --git a/frontend/src/components/Loader/LoadingContainer.tsx b/frontend/src/components/Loader/LoadingContainer.tsx index a1ab7fb..35453c4 100644 --- a/frontend/src/components/Loader/LoadingContainer.tsx +++ b/frontend/src/components/Loader/LoadingContainer.tsx @@ -8,5 +8,12 @@ export function LoadingContainer({ children, ...rest }: HtmlProps<'div'> & { loading: boolean }) { - return loading ? : children + return loading ? ( + + ) : ( + children + ) } diff --git a/frontend/src/components/Sidebar/Sidebar.tsx b/frontend/src/components/Sidebar/Sidebar.tsx index eda65ef..20ce41c 100644 --- a/frontend/src/components/Sidebar/Sidebar.tsx +++ b/frontend/src/components/Sidebar/Sidebar.tsx @@ -8,7 +8,7 @@ export function Sidebar({ className, ...rest }: HtmlProps<'div'>) { return (
    - + p === '/' || p.startsWith('/games')} /> -

    Screenshots

    +
    +

    Screenshots

    {screenshots.screenshotCollections?.map((dir) => ( -
    -
    +
    +

    {dir.gameName}

    -
    +
    {dir.screenshots.map((file) => ( -
    +
    +
    -

    Screenshots for {dir.gameName}

    +
    +

    Screenshots for {dir.gameName}

    +
    + +
    +
    -
    +
    diff --git a/frontend/src/style.css b/frontend/src/style.css index e74b741..c21be2e 100644 --- a/frontend/src/style.css +++ b/frontend/src/style.css @@ -87,4 +87,14 @@ body { body { @apply bg-background text-foreground; } + + *::-webkit-scrollbar { + @apply w-[18px]; + @apply bg-background; + } + + *::-webkit-scrollbar-thumb { + @apply bg-border rounded-xl; + box-shadow: hsl(var(--background)) inset 0 0 0 4px; + } }