diff --git a/src/App.tsx b/src/App.tsx
index 829a121..e5ca484 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -1,3 +1,5 @@
+import DownloadCenter from './DownloadCenter'
+import { DOWNLOAD_CENTER_PATH, downloadGames } from './downloadCatalog'
import { useEffect, useMemo, useRef, useState } from 'react'
import type { Session } from '@supabase/supabase-js'
import { supabase } from './lib/supabase'
@@ -209,8 +211,6 @@ function SectionHeader({
)
}
-const BETA_DOWNLOAD_URL = 'https://github.com/SpidoCode/spido-code/releases/download/v1.0.0-beta/SPIDOCODE-Windows-x64-v1.0.0-beta.zip'
-const BETA_RELEASE_URL = 'https://github.com/SpidoCode/spido-code/releases/tag/v1.0.0-beta'
function GameDownloads() {
return (
@@ -222,10 +222,9 @@ function GameDownloads() {
BETA DISPONIBLE
SPIDOCODE
El juego principal. Programa junto a Spid y explora su mundo espacial.
- v1.0.0-beta · Windows x64 · Aproximadamente 100 MB
+ {downloadGames[0].releases[0]?.version} · Windows x64
- Descarga el archivo ZIP.
@@ -255,10 +254,10 @@ function Hero() {
Aprende programación.
Explora un nuevo mundo.
Programa junto a Spid. Explora un entorno espacial, resuelve misiones y aprende con cada intento.
- Beta v1.0.0-beta disponible para Windows x64 · Aproximadamente 100 MB. Descarga, extrae el ZIP y ejecuta SpidoCode.exe.
+ Consulta las betas disponibles y las instrucciones de instalación en el centro de descargas.
SPID / TU COMPAÑEROUn pequeño robot con aspecto de computador y patas. Una gran aventura por descubrir.
@@ -1375,6 +1374,7 @@ function LandingPage() {
export default function App() {
const pathname = window.location.pathname.replace(/\/+$/, '') || '/'
+ if (pathname === DOWNLOAD_CENTER_PATH) return
if (pathname === '/recuperar-contrasena') return
if (pathname === '/confirmar-recuperacion') return
if (pathname === '/reset-password') return
diff --git a/src/DownloadCenter.css b/src/DownloadCenter.css
new file mode 100644
index 0000000..ac5337b
--- /dev/null
+++ b/src/DownloadCenter.css
@@ -0,0 +1,28 @@
+.download-center { color: #2b3040; background: linear-gradient(#eef1f6, #eef1f6 55%, #dce5de); }
+.download-center-header { border-bottom: 1px solid #cbd2dc; }
+.download-center-header > div { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-block: 14px; }
+.download-center-main { padding-block: clamp(32px, 6vw, 74px); }
+.download-center-intro { margin-bottom: 28px; }
+.download-center-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 3vw, 32px); }
+.download-center-card, .download-center-install { background: #fff; border: 1px solid #cbd2dc; border-radius: 24px; box-shadow: 0 12px 30px #2b304014; }
+.download-center-card { scroll-margin-top: 16px; min-width: 0; }
+.download-center-card > img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 23px 23px 0 0; }
+.download-center-content, .download-center-install { padding: clamp(18px, 3vw, 30px); display: grid; gap: 12px; }
+.download-center :is(h2) { font: 700 clamp(1.55rem, 4vw, 2.35rem)/1.15 'Spido Pixel', 'Pixelify Sans', monospace; }
+.download-center-status { justify-self: start; padding: 5px 10px; border-radius: 30px; background: #d6eedc; color: #285837; font-size: .8rem; font-weight: 700; }
+.download-center-meta { font-weight: 600; }
+.download-center-actions { display: flex; flex-wrap: wrap; gap: 10px; }
+.download-center details { border-top: 1px solid #dce1e7; padding-top: 12px; }
+.download-center summary { cursor: pointer; font-weight: 600; }
+.download-center details :is(ul,p) { margin-top: 8px; }
+.download-center details a { color: #285837; text-decoration: underline; }
+.download-center-install { margin-top: 26px; }
+.download-center-install ol { list-style: decimal; padding-inline-start: 1.45em; line-height: 1.8; }
+.download-center :is(a, summary):focus-visible { outline: 3px solid #285837; outline-offset: 3px; }
+@media (max-width: 720px) { .download-center-grid { grid-template-columns: minmax(0, 1fr); } }
+@media (prefers-reduced-motion: no-preference) {
+ .download-center-card { animation: download-center-arrive 360ms ease-out both; transition: border-color 160ms ease, box-shadow 160ms ease; }
+ .download-center-card:nth-child(2) { animation-delay: 70ms; }
+ .download-center-card:focus-within, .download-center-card:hover { border-color: #659372; box-shadow: 0 14px 32px #2b304021; }
+}
+@keyframes download-center-arrive { from { transform: translateY(6px); } }
diff --git a/src/DownloadCenter.tsx b/src/DownloadCenter.tsx
new file mode 100644
index 0000000..ff145c4
--- /dev/null
+++ b/src/DownloadCenter.tsx
@@ -0,0 +1,67 @@
+import { Footer } from './SimpleLanding'
+import { downloadGames, releaseLinks } from './downloadCatalog'
+import './DownloadCenter.css'
+
+const formatMB = (bytes: number) => new Intl.NumberFormat('es', { maximumFractionDigits: 1 }).format(bytes / 1_000_000)
+
+export default function DownloadCenter() {
+ return (
+
+
+
+
+
Descarga los juegos
+
Elige tu siguiente misión. Aquí encontrarás las versiones oficiales para Windows.
+
+
+ {downloadGames.map((game) => {
+ const latest = game.releases[0]
+ return (
+
+
+
+
{latest ? 'Beta disponible' : 'Beta próximamente'}
+
{game.name}
+
{game.description}
+
+ Windows x64{latest && ` · ${latest.version} · ZIP de ${formatMB(latest.bytes)} MB`}
+
+ {latest ? (
+
+ ) :
La primera descarga estará disponible cuando se publique su Release oficial.
}
+
+ Historial de versiones
+ {game.releases.length ? (
+
+ ) : Todavía no hay versiones publicadas.
}
+
+
+
+ )
+ })}
+
+
+ Cómo instalar
+
+ - Descarga el ZIP del juego para Windows x64.
+ - Extrae la carpeta completa en tu equipo.
+ - Abre la carpeta y ejecuta
{downloadGames[0].executable} o {downloadGames[1].executable}, según el juego. Conserva el PCK junto al ejecutable.
+
+
+
+
+
+ )
+}
diff --git a/src/SimpleLanding.tsx b/src/SimpleLanding.tsx
index 0f9d23b..a001aef 100644
--- a/src/SimpleLanding.tsx
+++ b/src/SimpleLanding.tsx
@@ -3,9 +3,7 @@ import type { Session } from '@supabase/supabase-js'
import { supabase } from './lib/supabase'
import './SimpleLanding.css'
-export const BETA_DOWNLOAD_URL =
- 'https://github.com/SpidoCode/spido-code/releases/download/v1.0.0-beta/SPIDOCODE-Windows-x64-v1.0.0-beta.zip'
-export const BETA_RELEASE_URL = 'https://github.com/SpidoCode/spido-code/releases/tag/v1.0.0-beta'
+import { DOWNLOAD_CENTER_PATH, downloadGames } from './downloadCatalog'
// El texto real siempre permanece en el árbol accesible; solo cambia su copia decorativa.
function EncryptedLabel({ text, duration = 405, immediate = false, title = false }: {
@@ -163,6 +161,7 @@ export function Nav() {
@@ -316,6 +315,7 @@ export default function SimpleLanding() {
Ver Juegos
+ Descargas
@@ -599,7 +599,7 @@ export function Footer() {
- Versión Beta v1.0.0 activa
+ Beta {downloadGames[0].releases[0]?.version} disponible
@@ -612,6 +612,9 @@ export function Footer() {
-
Juegos
+ -
+ Descargas
+
-
Sistema A.D.A
diff --git a/src/SpidoCodeGamePage.tsx b/src/SpidoCodeGamePage.tsx
index 8e6cca6..d80cab3 100644
--- a/src/SpidoCodeGamePage.tsx
+++ b/src/SpidoCodeGamePage.tsx
@@ -1,4 +1,5 @@
-import { Nav, Footer, NeonSpeckles, BETA_DOWNLOAD_URL, BETA_RELEASE_URL } from './SimpleLanding'
+import { DOWNLOAD_CENTER_PATH } from './downloadCatalog'
+import { Nav, Footer, NeonSpeckles } from './SimpleLanding'
import './SimpleLanding.css'
export default function SpidoCodeGamePage() {
@@ -42,19 +43,11 @@ export default function SpidoCodeGamePage() {
{/* Links de descarga y acciones */}
diff --git a/src/SpidoCodeZeroPage.tsx b/src/SpidoCodeZeroPage.tsx
index 482e28a..079c011 100644
--- a/src/SpidoCodeZeroPage.tsx
+++ b/src/SpidoCodeZeroPage.tsx
@@ -1,4 +1,5 @@
-import { Nav, Footer, NeonSpeckles, BETA_DOWNLOAD_URL, BETA_RELEASE_URL } from './SimpleLanding'
+import { DOWNLOAD_CENTER_PATH } from './downloadCatalog'
+import { Nav, Footer, NeonSpeckles } from './SimpleLanding'
import './SimpleLanding.css'
export default function SpidoCodeZeroPage() {
@@ -42,19 +43,11 @@ export default function SpidoCodeZeroPage() {
{/* Links de descarga y acciones */}
diff --git a/src/downloadCatalog.ts b/src/downloadCatalog.ts
new file mode 100644
index 0000000..587c00c
--- /dev/null
+++ b/src/downloadCatalog.ts
@@ -0,0 +1,50 @@
+export const DOWNLOAD_CENTER_PATH = '/descargas'
+
+type PublishedRelease = {
+ version: string
+ file: string
+ bytes: number
+}
+
+type DownloadGame = {
+ id: string
+ name: string
+ repository: string
+ cover: string
+ description: string
+ executable: string
+ releases: readonly PublishedRelease[]
+}
+
+export const downloadGames: readonly DownloadGame[] = [
+ {
+ id: 'spidocode',
+ name: 'SPIDOCODE',
+ repository: 'SpidoCode/spido-code',
+ cover: '/images/spidocode/spidocode-cover.jpg',
+ description: 'Programa a Spid con código escrito y automatiza misiones de exploración espacial.',
+ executable: 'SpidoCode.exe',
+ releases: [
+ { version: 'v1.0.1-beta', file: 'SPIDOCODE-Windows-x64-v1.0.1-beta.zip', bytes: 104384484 },
+ { version: 'v1.0.0-beta', file: 'SPIDOCODE-Windows-x64-v1.0.0-beta.zip', bytes: 104355151 },
+ ],
+ },
+ {
+ id: 'spidocode-0',
+ name: 'SPIDOCODE 0',
+ repository: 'SpidoCode/spido-code-0',
+ cover: '/images/spidocode/spidocode-0-cover.jpg',
+ description: 'Descubre la lógica de programación con bloques visuales y acertijos junto a Spid.',
+ executable: 'SpidoCode0.exe',
+ releases: [{ version: 'v0.1.0-beta', file: 'SPIDOCODE-0-Windows-x64-v0.1.0-beta.zip', bytes: 41261681 }],
+ },
+]
+
+export function releaseLinks(game: DownloadGame, release: PublishedRelease) {
+ const root = `https://github.com/${game.repository}/releases`
+ const version = encodeURIComponent(release.version)
+ return {
+ notes: `${root}/tag/${version}`,
+ download: `${root}/download/${version}/${encodeURIComponent(release.file)}`,
+ }
+}
diff --git a/vercel.json b/vercel.json
index b14fcde..1239dde 100644
--- a/vercel.json
+++ b/vercel.json
@@ -16,6 +16,7 @@
}
],
"rewrites": [
+ { "source": "/descargas", "destination": "/index.html" },
{
"source": "/confirmar-recuperacion",
"destination": "/index.html"