mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-16 08:59:39 +02:00
New project with 22+ browser games and AI game generation capabilities: - Astro PWA web app with game catalog and player - NestJS backend with AI game generator (Gemini, Claude, GPT-4o) - Community game submission via GitHub API - postMessage integration for score tracking - PWA support with offline capabilities 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
184 lines
No EOL
5.4 KiB
HTML
184 lines
No EOL
5.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
|
|
<title>Offline - Mana Games</title>
|
|
<style>
|
|
:root {
|
|
--color-bg: #0a0a0a;
|
|
--color-bg-secondary: #1a1a1a;
|
|
--color-text: #ffffff;
|
|
--color-text-secondary: #b0b0b0;
|
|
--color-accent: #00ff88;
|
|
--color-accent-secondary: #00cc6a;
|
|
--color-border: #2a2a2a;
|
|
}
|
|
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
|
background-color: var(--color-bg);
|
|
color: var(--color-text);
|
|
min-height: 100vh;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 2rem;
|
|
}
|
|
|
|
.offline-container {
|
|
text-align: center;
|
|
max-width: 500px;
|
|
}
|
|
|
|
.offline-icon {
|
|
font-size: 4rem;
|
|
margin-bottom: 1.5rem;
|
|
opacity: 0.5;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 2.5rem;
|
|
font-weight: 900;
|
|
margin-bottom: 1rem;
|
|
letter-spacing: -0.05em;
|
|
}
|
|
|
|
.accent {
|
|
color: var(--color-accent);
|
|
}
|
|
|
|
p {
|
|
color: var(--color-text-secondary);
|
|
line-height: 1.6;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.offline-games {
|
|
margin-top: 3rem;
|
|
}
|
|
|
|
.offline-games h2 {
|
|
font-size: 1.5rem;
|
|
margin-bottom: 1rem;
|
|
color: var(--color-accent);
|
|
}
|
|
|
|
.games-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
.game-item {
|
|
background-color: var(--color-bg-secondary);
|
|
border: 1px solid var(--color-border);
|
|
padding: 1rem;
|
|
border-radius: 0.5rem;
|
|
text-align: left;
|
|
}
|
|
|
|
.game-item h3 {
|
|
color: var(--color-text);
|
|
font-size: 1.1rem;
|
|
margin-bottom: 0.25rem;
|
|
}
|
|
|
|
.game-item p {
|
|
font-size: 0.9rem;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.reload-button {
|
|
background-color: var(--color-accent);
|
|
color: #000;
|
|
border: none;
|
|
padding: 0.75rem 2rem;
|
|
border-radius: 0.5rem;
|
|
font-size: 1rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
text-decoration: none;
|
|
display: inline-block;
|
|
}
|
|
|
|
.reload-button:hover {
|
|
background-color: var(--color-accent-secondary);
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
h1 {
|
|
font-size: 2rem;
|
|
}
|
|
|
|
.offline-icon {
|
|
font-size: 3rem;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="offline-container">
|
|
<div class="offline-icon">📡</div>
|
|
<h1>Du bist <span class="accent">offline</span></h1>
|
|
<p>
|
|
Keine Internetverbindung gefunden. Aber keine Sorge!
|
|
Einige Spiele, die du bereits gespielt hast, sind möglicherweise
|
|
noch im Cache verfügbar.
|
|
</p>
|
|
<button class="reload-button" onclick="window.location.reload()">
|
|
Erneut versuchen
|
|
</button>
|
|
|
|
<div class="offline-games" id="offline-games" style="display: none;">
|
|
<h2>Verfügbare Offline-Spiele</h2>
|
|
<div class="games-list" id="games-list"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
// Prüfe gecachte Spiele
|
|
if ('caches' in window) {
|
|
caches.open('mana-games-v1').then(cache => {
|
|
cache.keys().then(requests => {
|
|
const gameUrls = requests
|
|
.map(request => request.url)
|
|
.filter(url => url.includes('/games/') && url.endsWith('.html'));
|
|
|
|
if (gameUrls.length > 0) {
|
|
document.getElementById('offline-games').style.display = 'block';
|
|
const gamesList = document.getElementById('games-list');
|
|
|
|
gameUrls.forEach(url => {
|
|
const gameName = url.split('/').pop().replace('.html', '').replace(/_/g, ' ');
|
|
const gameItem = document.createElement('div');
|
|
gameItem.className = 'game-item';
|
|
gameItem.innerHTML = `
|
|
<h3>${gameName}</h3>
|
|
<p>Dieses Spiel ist offline verfügbar</p>
|
|
`;
|
|
gameItem.style.cursor = 'pointer';
|
|
gameItem.onclick = () => window.location.href = url;
|
|
gamesList.appendChild(gameItem);
|
|
});
|
|
}
|
|
});
|
|
});
|
|
}
|
|
|
|
// Automatisch neu laden, wenn wieder online
|
|
window.addEventListener('online', () => {
|
|
window.location.reload();
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |