From d108872a06cac567392b2537df11b975310fde09 Mon Sep 17 00:00:00 2001 From: theoneand33 Date: Mon, 7 Sep 2026 12:00:52 +1200 Subject: [PATCH 1/2] feat(games): add fullscreen button to game players - Add reusable FullscreenButton with fullscreen toggle - Wire into Flash, Run 3, and Webtris wrappers - Adjust resize and fullscreen styles to fill viewport --- src/components/flash.astro | 24 ++++++++++-- src/components/fullscreen-button.astro | 54 ++++++++++++++++++++++++++ src/pages/games/[slug].astro | 32 ++++++++++++++- 3 files changed, 105 insertions(+), 5 deletions(-) create mode 100644 src/components/fullscreen-button.astro diff --git a/src/components/flash.astro b/src/components/flash.astro index 2bd9082..6e99611 100644 --- a/src/components/flash.astro +++ b/src/components/flash.astro @@ -1,4 +1,6 @@ --- +import FullscreenButton from "./fullscreen-button.astro"; + interface Props { gamePath: string; } @@ -7,11 +9,23 @@ const { gamePath } = Astro.props; ---
-
+
Loading game...
+
+ +
+ + + + diff --git a/src/pages/games/[slug].astro b/src/pages/games/[slug].astro index aa90725..2e7a3a5 100644 --- a/src/pages/games/[slug].astro +++ b/src/pages/games/[slug].astro @@ -1,6 +1,7 @@ --- import Layout from "../../layout/layout.astro"; import Flash from "../../components/flash.astro"; +import FullscreenButton from "../../components/fullscreen-button.astro"; import { gamesMap } from "../../data/game-seo"; export async function getStaticPaths() { @@ -21,6 +22,9 @@ const seo = gamesMap[slug];
+
+ +
) : slug === "webtris" ? ( -
+