diff --git a/package.json b/package.json index a853197..b5bccaa 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,9 @@ "bun", "es-de", "store", - "free" + "free", + "internet-archive", + "retro-achievements" ], "devDependencies": { "@types/bun": "latest" diff --git a/src/components/Features.astro b/src/components/Features.astro index 17c994f..fdc652e 100644 --- a/src/components/Features.astro +++ b/src/components/Features.astro @@ -10,6 +10,8 @@ import { RefreshCcw, Joystick, Puzzle, + Grid2x2, + LayoutGrid, } from "@lucide/astro"; import Feature from "./Feature.astro"; --- @@ -79,8 +81,14 @@ import Feature from "./Feature.astro"; + + + diff --git a/src/components/Header.astro b/src/components/Header.astro index b1c6f22..2cbd21b 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -1,9 +1,9 @@ --- import { Github, Discord } from "simple-icons-astro"; -import { HandCoins, Puzzle } from "@lucide/astro"; +import { Gamepad2, HandCoins, Puzzle } from "@lucide/astro"; import Icon from "../assets/icon.svg"; import pkg from "../../package.json"; -import { plugins, releaseData } from "../scripts/getters"; +import { games, plugins, releaseData } from "../scripts/getters"; import Image from "astro/components/Image.astro"; --- @@ -26,12 +26,24 @@ import Image from "astro/components/Image.astro"; `${import.meta.env.BASE_URL}/plugins`, )} class="flex group gap-2 bg-base-300 data-[active=true]:cursor-default rounded-full p-1 px-3 text-xl hover:bg-accent hover:text-accent-content data-[active=true]:bg-accent data-[active=true]:text-accent-content items-center" - href={`${import.meta.env.BASE_URL}plugins`} + href={`${import.meta.env.BASE_URL}/plugins`} >Plugins{plugins.total} + Games{games.length} +
+
+
+ Games {games.length} +
+
+ + diff --git a/src/scripts/getters.ts b/src/scripts/getters.ts index 2d99918..c490e06 100644 --- a/src/scripts/getters.ts +++ b/src/scripts/getters.ts @@ -109,6 +109,15 @@ async function getTotalDownloads (owner: string, repo: string): Promise return totalDownloads; } +export const games = await fetch('https://cdn.jsdelivr.net/npm/@simeonradivoev/gameflow-store@latest/manifests/games.json') + .then(res => res.json()) + .then(v => v.emulators) + .catch((e) => + { + console.error(e); + return [] as any[]; + }); + export const totalDownloads = await getTotalDownloads( "simeonradivoev", "gameflow-deck",