From a7b1d01620cebe40fdbd97ed27b0fb85f1400796 Mon Sep 17 00:00:00 2001 From: ceitine Date: Tue, 5 Nov 2024 22:23:41 +0200 Subject: [PATCH] current team page progress --- src/lib/types/Games.ts | 2 - src/routes/games/+layout.svelte | 109 +++++++++++++++++++++----------- 2 files changed, 73 insertions(+), 38 deletions(-) diff --git a/src/lib/types/Games.ts b/src/lib/types/Games.ts index 54359e7..f7ab916 100644 --- a/src/lib/types/Games.ts +++ b/src/lib/types/Games.ts @@ -85,9 +85,7 @@ export const Games: Game[] = [ 'Spooky Robathon with 3 levels and 3 monsters trying to kick you out. 1st Place winner of the Mighty Brick Game Jam.', media: [ '/blogs/example/ex.png', - '/blogs/frostrial/clothes.png', '/blogs/example/ex.png', - '/blogs/frostrial/clothes.png', '/blogs/example/ex.png', '/blogs/frostrial/clothes.png' ], diff --git a/src/routes/games/+layout.svelte b/src/routes/games/+layout.svelte index 3189352..f28db29 100644 --- a/src/routes/games/+layout.svelte +++ b/src/routes/games/+layout.svelte @@ -18,6 +18,12 @@ }); let mediaIndex: number = 0; + + const getMediaByIndex = function (index: number): string | undefined { + if (game?.media == undefined) return undefined; + index = index < 0 ? game.media.length + (index % game.media.length) : index % game.media.length; + return game.media[index]; + }; @@ -26,15 +32,24 @@ Games / {game.title} -
+
+ {#if getMediaByIndex(mediaIndex)} + {`media + {/if} +
-
+
-
+

quick fish games navigation:

-
+
{#each Games as game} {@const activeClass = game.slug == $page.params.slug || (!$page.params.slug && game == Games[0]) @@ -50,40 +65,36 @@
- {#if game.media && game.media[mediaIndex]} - {@const src = game.media[mediaIndex]} - -
- {#if src.endsWith('mp4')} -
@@ -185,4 +196,30 @@ color: #ff5733; border-color: #ff5733; } + + .mask-right { + mask-image: linear-gradient( + to right, + rgba(0, 0, 0, 1) 0%, + rgba(0, 0, 0, 0.8) 60%, + rgba(0, 0, 0, 0.6) 80%, + rgba(0, 0, 0, 0) 95% + ); + } + + ::-webkit-scrollbar { + height: 0.5rem; + } + + ::-webkit-scrollbar:disabled { + width: 0px; + } + + ::-webkit-scrollbar-track { + background: white; + } + + ::-webkit-scrollbar-thumb { + background-color: #2446f7; + }