index page

This commit is contained in:
2026-03-02 23:56:33 +01:00
parent 31135e0762
commit f02d9e085e
4 changed files with 99 additions and 42 deletions
+11 -2
View File
@@ -6,10 +6,19 @@
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="icon" href="/favicon.ico" />
<meta name="generator" content={Astro.generator} />
<title>Astro Basics</title>
<title>Teletype Games</title>
</head>
<body>
<slot />
<header class="bg-gray-800 text-white p-4 flex justify-between items-center">
<a href="/" class="text-xl font-bold">Teletype Games</a>
<nav>
<a href="/" class="p-2">Home</a>
<a href="/catalog" class="p-2">Catalog</a>
</nav>
</header>
<main>
<slot />
</main>
</body>
</html>
+37
View File
@@ -0,0 +1,37 @@
---
import Layout from '../layouts/Layout.astro';
const BASE = "https://games.teletype.hu";
const API = BASE + "/api/software";
const res = await fetch(API);
const json = await res.json();
const softwares = json.softwares;
---
<Layout>
<header class="text-center py-16 bg-gradient-to-r from-purple-600 to-indigo-600 text-white">
<h1 class="text-5xl font-bold mb-4">Játékaink</h1>
<p class="text-xl max-w-xl mx-auto">Fedezd fel a TIC-80 és más platformokra készült játékokat, közvetlenül a böngészőből játszható verziókkal!</p>
</header>
<main class="max-w-6xl mx-auto py-12 px-4 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8">
{softwares.map(({ software, webPlayableRelease }) => (
<div class="bg-white shadow-lg rounded-xl overflow-hidden hover:shadow-2xl transition-shadow duration-300">
<div class="p-6">
<h2 class="text-2xl font-semibold mb-2">{software.title}</h2>
<p class="text-gray-600 mb-4">{software.desc}</p>
<div class="text-sm text-gray-500 mb-4">
<div>Author: {software.author}</div>
<div>Platform: {software.platform}</div>
</div>
{webPlayableRelease?.htmlFolderPath && (
<a href={BASE + webPlayableRelease.htmlFolderPath} target="_blank"
class="inline-block bg-purple-600 text-white px-4 py-2 rounded-lg hover:bg-purple-700 transition-colors">
▶ Play in Browser
</a>
)}
</div>
</div>
))}
</main>
</Layout>
+48 -40
View File
@@ -1,46 +1,54 @@
---
const BASE = "https://games.teletype.hu";
const API = BASE + "/api/software";
const res = await fetch(API);
const json = await res.json();
const softwares = json.softwares;
import Layout from '../layouts/Layout.astro';
---
<html lang="hu" class="bg-gray-50">
<head>
<meta charset="UTF-8" />
<title>Teletype Games</title>
</head>
<body class="font-sans text-gray-800">
<header class="text-center py-16 bg-gradient-to-r from-purple-600 to-indigo-600 text-white">
<Layout>
<div class="space-y-12 py-12">
<!-- Intro Section -->
<section class="text-center max-w-3xl mx-auto px-4">
<h1 class="text-5xl font-bold mb-4">Teletype Games</h1>
<p class="text-xl max-w-xl mx-auto">Fedezd fel a TIC-80 és más platformokra készült játékokat, közvetlenül a böngészőből játszható verziókkal!</p>
</header>
<p class="text-xl text-gray-700">
A Teletype Games egy független játékfejlesztő közösség, amely a kreatív szabadságra, az egyenrangúságra és az open source szemléletre épül. Célunk rövid fejlesztési ciklusú, kísérleti és teljes értékű játékok létrehozása.
</p>
</section>
<main class="max-w-6xl mx-auto py-12 px-4 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8">
{softwares.map(({ software, webPlayableRelease }) => (
<div class="bg-white shadow-lg rounded-xl overflow-hidden hover:shadow-2xl transition-shadow duration-300">
<div class="p-6">
<h2 class="text-2xl font-semibold mb-2">{software.title}</h2>
<p class="text-gray-600 mb-4">{software.desc}</p>
<div class="text-sm text-gray-500 mb-4">
<div>Author: {software.author}</div>
<div>Platform: {software.platform}</div>
</div>
{webPlayableRelease?.htmlFolderPath && (
<a href={BASE + webPlayableRelease.htmlFolderPath} target="_blank"
class="inline-block bg-purple-600 text-white px-4 py-2 rounded-lg hover:bg-purple-700 transition-colors">
▶ Play in Browser
</a>
)}
</div>
</div>
))}
</main>
<!-- Sections Grid -->
<section class="max-w-6xl mx-auto px-4 grid grid-cols-1 md:grid-cols-2 gap-8">
<!-- Catalog Section -->
<div class="bg-white p-8 rounded-lg shadow-lg text-center flex flex-col h-full">
<h2 class="text-3xl font-bold mb-3">Catalog</h2>
<p class="mb-6 min-h-[150px]">Itt találod a játékainkat. Fedezd fel a TIC-80 és más platformokra készült alkotásokat, melyek közül sokat böngészőből is kipróbálhatsz.</p>
<a href="/catalog" class="inline-block bg-purple-600 hover:bg-purple-700 text-white font-bold py-3 px-8 rounded-lg text-lg transition-colors mt-auto">
Játékok Böngészése
</a>
</div>
<footer class="text-center py-8 text-gray-500 text-sm">
© 2026 Teletype Games
</footer>
</body>
</html>
<!-- Wiki Section -->
<div class="bg-white p-8 rounded-lg shadow-lg text-center flex flex-col h-full">
<h2 class="text-3xl font-bold mb-3">Wiki</h2>
<p class="mb-6 min-h-[150px]">Közérdekű fejlesztéssel kapcsolatos tudásanyagunkat itt gyűjtjük. Olvass bele a technikai leírásokba és fejlesztési naplókba.</p>
<a href="https://wiki.teletype.hu" target="_blank" rel="noopener noreferrer" class="inline-block bg-green-600 hover:bg-green-700 text-white font-bold py-3 px-8 rounded-lg text-lg transition-colors mt-auto">
Tudásbázis
</a>
</div>
<!-- Git Section -->
<div class="bg-white p-8 rounded-lg shadow-lg text-center flex flex-col h-full">
<h2 class="text-3xl font-bold mb-3">Git Repók</h2>
<p class="mb-6 min-h-[150px]">Minden projektünk nyílt forráskódú. Böngészd a kódjainkat, tanulmányozd a megoldásainkat, vagy vegyél részt a fejlesztésben.</p>
<a href="https://git.teletype.hu" target="_blank" rel="noopener noreferrer" class="inline-block bg-gray-800 hover:bg-gray-900 text-white font-bold py-3 px-8 rounded-lg text-lg transition-colors mt-auto">
Gitea
</a>
</div>
<!-- Countdown Section -->
<div class="bg-white p-8 rounded-lg shadow-lg text-center flex flex-col h-full">
<h2 class="text-3xl font-bold mb-3">Countdown</h2>
<p class="mb-6 min-h-[150px]">Légy naprakész a következő játékunk megjelenésével kapcsolatban. A visszaszámláló mutatja, mennyi idő van még hátra a premierig.</p>
<a href="https://countdown.teletype.hu" target="_blank" rel="noopener noreferrer" class="inline-block bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-8 rounded-lg text-lg transition-colors mt-auto">
Countdown
</a>
</div>
</section>
</div>
</Layout>