-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
159 lines (145 loc) · 7.18 KB
/
index.html
File metadata and controls
159 lines (145 loc) · 7.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="utf-8" />
<title>Sopa de Letras - Juego de Palabras</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Juego de sopa de letras - Encuentra palabras ocultas en el puzzle" />
<link rel="shortcut icon" href="image/Browser.ico" type="image/x-icon" />
<link rel="stylesheet" href="./public/output.css" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
</head>
<body class="font-poppins">
<!-- Contenedor Principal -->
<div class="flex flex-col justify-center items-center bg-gradient-to-br from-pink-600 dark:from-gray-900 to-fuchsia-500 dark:to-gray-800 p-4 min-h-screen transition-colors duration-300">
<!-- Botones superiores -->
<div class="top-4 right-4 z-50 fixed flex gap-4">
<!-- Botón Limpiar Caché -->
<button id="clearCacheBtn"
class="bg-white/20 dark:bg-gray-700/50 shadow-lg hover:shadow-xl backdrop-blur-sm p-3 rounded-full text-white hover:scale-110 transition-all duration-300"
aria-label="Limpiar caché"
title="Limpiar caché (configuraciones e historial)">
<span class="text-xl">🧹</span>
</button>
<!-- Botón Modo Oscuro -->
<button id="darkModeToggle"
class="bg-white/20 dark:bg-gray-700/50 shadow-lg hover:shadow-xl backdrop-blur-sm p-3 rounded-full text-white hover:scale-110 transition-all duration-300"
aria-label="Alternar modo oscuro"
title="Cambiar modo oscuro">
<span class="dark:hidden text-xl">🌙</span>
<span class="hidden dark:inline text-xl">☀️</span>
</button>
</div>
<!-- Card Principal -->
<div class="relative bg-white/90 dark:bg-gray-800/90 shadow-2xl hover:shadow-3xl backdrop-blur-md p-8 rounded-3xl w-full max-w-2xl hover:scale-105 transition-all duration-300">
<!-- Header -->
<div class="bg-gradient-to-br from-pink-600 dark:from-pink-700 to-fuchsia-600 dark:to-fuchsia-700 -mx-8 -mt-8 mb-6 p-8 rounded-t-3xl">
<h1 class="drop-shadow-lg font-bold text-white text-4xl md:text-5xl text-center">
🎮 Sopa de Letras
</h1>
</div>
<!-- Contenido -->
<div class="space-y-6">
<div class="text-center">
<h2 class="mb-4 font-semibold text-gray-800 dark:text-gray-100 text-2xl">
¿Listo para el desafío?
</h2>
<p class="text-gray-700 dark:text-gray-300 text-lg leading-relaxed">
Este juego consiste en encontrar un número determinado de palabras
enlazando letras de forma <strong>horizontal</strong>, <strong>vertical</strong> o <strong>diagonal</strong> y en
cualquier sentido, tanto de derecha a izquierda como de izquierda a
derecha, y de arriba a abajo, como de abajo a arriba.
</p>
</div>
<div class="bg-pink-50 dark:bg-gray-700/50 p-4 border-pink-600 dark:border-fuchsia-500 border-l-4 rounded-xl">
<p class="text-gray-800 dark:text-gray-200">
<strong class="text-pink-600 dark:text-fuchsia-400">🎯 Objetivo:</strong>
Descubrir todas las palabras propuestas para lograr el 100% de completitud.
</p>
</div>
<!-- Características -->
<div class="gap-4 grid grid-cols-1 md:grid-cols-2 mt-6">
<div class="flex items-start space-x-3">
<span class="text-2xl">📊</span>
<div>
<h3 class="font-semibold text-gray-800 dark:text-gray-100">Niveles de Dificultad</h3>
<p class="text-gray-600 dark:text-gray-400 text-sm">Fácil, medio y difícil</p>
</div>
</div>
<div class="flex items-start space-x-3">
<span class="text-2xl">🏆</span>
<div>
<h3 class="font-semibold text-gray-800 dark:text-gray-100">Sistema de Puntuación</h3>
<p class="text-gray-600 dark:text-gray-400 text-sm">Compite contra el tiempo</p>
</div>
</div>
<div class="flex items-start space-x-3">
<span class="text-2xl">🔤</span>
<div>
<h3 class="font-semibold text-gray-800 dark:text-gray-100">Palabras Aleatorias</h3>
<p class="text-gray-600 dark:text-gray-400 text-sm">14 palabras únicas por juego</p>
</div>
</div>
<div class="flex items-start space-x-3">
<span class="text-2xl">📱</span>
<div>
<h3 class="font-semibold text-gray-800 dark:text-gray-100">Responsive</h3>
<p class="text-gray-600 dark:text-gray-400 text-sm">Juega en cualquier dispositivo</p>
</div>
</div>
</div>
<!-- Botón Continuar -->
<div class="mt-8 text-center">
<a href="./public/game.html"
class="inline-block bg-gradient-to-r from-pink-600 dark:from-pink-700 to-fuchsia-600 dark:to-fuchsia-700 shadow-lg hover:shadow-2xl px-10 py-4 rounded-full font-semibold text-white text-lg hover:scale-105 transition-all hover:-translate-y-1 duration-300 transform">
Continuar →
</a>
</div>
</div>
</div>
<!-- Footer -->
<div class="mt-8 text-white/80 dark:text-gray-400 text-sm text-center">
<p>© 2026 Sopa de Letras - Versión 2.0</p>
</div>
</div>
<!-- Script para Dark Mode -->
<script type="module">
import { DarkMode } from './src/js/DarkMode.js';
const darkMode = new DarkMode();
darkMode.init();
const toggleButton = document.getElementById('darkModeToggle');
if (toggleButton) {
toggleButton.addEventListener('click', () => {
darkMode.toggle();
});
}
// Botón limpiar caché
const clearCacheBtn = document.getElementById('clearCacheBtn');
if (clearCacheBtn) {
clearCacheBtn.addEventListener('click', () => {
const confirmClean = confirm(
'🧹 ¿Estás seguro de que quieres limpiar el caché?\n\n' +
'Esto borrará:\n' +
'• Configuraciones guardadas\n' +
'• Historial de juegos\n' +
'• Preferencia de modo oscuro\n\n' +
'Útsalo si tienes problemas al cargar el juego.'
);
if (confirmClean) {
try {
localStorage.clear();
sessionStorage.clear();
alert('✅ Caché limpiado exitosamente.\n\nLa página se recargará.');
window.location.reload();
} catch (error) {
console.error('Error al limpiar caché:', error);
alert('❌ Error al limpiar el caché. Intenta desde el menú del navegador.');
}
}
});
}
</script>
</body>
</html>