From 33e80ef1eb3d8c72e0bea231fd928638187afc4b Mon Sep 17 00:00:00 2001 From: wearrrrr Date: Sun, 28 Jul 2024 21:13:43 -0500 Subject: [PATCH] Add 4 new games, add vertical property to metada, and update games page --- public/flash/instantiateFlash.js | 1 + public/games | 2 +- src/json/games.json | 17 +++++++++++++++++ src/layouts/Layout.astro | 8 ++++---- src/pages/game/[game].astro | 22 +++++++++++++++++++--- src/pages/game/flash/[game].astro | 2 +- src/types.d.ts | 1 + 7 files changed, 44 insertions(+), 9 deletions(-) diff --git a/public/flash/instantiateFlash.js b/public/flash/instantiateFlash.js index 59f591b..de534ba 100644 --- a/public/flash/instantiateFlash.js +++ b/public/flash/instantiateFlash.js @@ -1,5 +1,6 @@ const id = window.location.pathname.split("/").pop(); if (id && RufflePlayer) { + document.title = `Flash Game - ${id}`; window.addEventListener("load", loadRuffle); } else { document.querySelector("#loader").classList.add("hidden"); diff --git a/public/games b/public/games index e317026..a4e5ff6 160000 --- a/public/games +++ b/public/games @@ -1 +1 @@ -Subproject commit e3170261ecfbd6073322b3cfa500729936b5fa2e +Subproject commit a4e5ff6876b65963183777c0fbb77c73632e3093 diff --git a/src/json/games.json b/src/json/games.json index 69f11b3..aa8353a 100644 --- a/src/json/games.json +++ b/src/json/games.json @@ -57,6 +57,13 @@ "slug": "bloons", "flash": true }, + "bitlife": { + "name": "BitLife", + "image": "/games/bitlife/logo.png", + "slug": "bitlife", + "unity": true, + "vertical": true + }, "cannon-basketball-4": { "name": "Cannon Basketball 4", "image": "/games/cannon-basketball-4/logo.png", @@ -243,6 +250,11 @@ "image": "/games/moto-x3m-winter/logo.png", "slug": "moto-x3m-winter" }, + "pvz": { + "name": "Plants vs Zombies", + "image": "/games/pvz/logo.png", + "slug": "pvz" + }, "retro-bowl": { "name": "Retro Bowl", "image": "/games/retro-bowl/logo.png", @@ -279,6 +291,11 @@ "image": "/games/superhot/logo.png", "slug": "superhot" }, + "temple-run-2": { + "name": "Temple Run 2", + "image": "/games/temple-run-2/logo.png", + "slug": "temple-run-2" + }, "there-is-no-game": { "name": "There is No Game", "image": "/games/there-is-no-game/logo.png", diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 69a066a..018a01c 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -82,10 +82,6 @@ const { title, optionalPreloads } = Astro.props;