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];
+ };
quick fish games navigation:
-