File size: 12,655 Bytes
590f831 2e36d9f 590f831 df99173 590f831 df99173 590f831 2e36d9f df99173 2e36d9f df99173 3a2d43b 2e36d9f e93f54d 2e36d9f e93f54d 2e36d9f 590f831 2e36d9f 590f831 20bb061 2e36d9f 5ec3503 2e36d9f 590f831 2e36d9f a824f25 2e36d9f a824f25 590f831 2e36d9f 6c9686d a824f25 a42859b 590f831 a824f25 590f831 a824f25 590f831 363a016 c23bd16 363a016 c23bd16 363a016 fb98b03 363a016 fb98b03 363a016 2e36d9f 363a016 fb98b03 363a016 05003b5 363a016 a824f25 fb98b03 363a016 2e36d9f 363a016 efb86ac 363a016 efb86ac 363a016 fb98b03 363a016 2e36d9f 363a016 efb86ac 363a016 efb86ac 363a016 2e36d9f 590f831 363a016 df99173 2e36d9f 5ec3503 df99173 2e36d9f 590f831 363a016 590f831 363a016 590f831 2e36d9f f396fd0 590f831 2e36d9f 590f831 df99173 590f831 363a016 6c9686d 590f831 6c9686d 590f831 f66d6be 590f831 2e36d9f | 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 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 | <!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ruleta exoplanetaria</title>
<title>Calculadora de huella de carbono COLBOYD</title>
<link rel="icon" href="icon" type="image/png">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<style>
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(calc(360deg * 15 + var(--stop-rotation))); }
}
.wheel {
transition-timing-function: cubic-bezier(0.1, 0.7, 0.1, 1);
}
.wheel-segment {
position: absolute;
width: 50%;
height: 50%;
transform-origin: bottom right;
display: flex;
align-items: center;
justify-content: center;
clip-path: polygon(0 0, 50% 0, 100% 100%, 0 100%);
}
.wheel-text {
position: absolute;
width: 100%;
text-align: center;
transform-origin: center;
color: white;
font-weight: bold;
font-size: 0.8rem;
padding: 0 10px;
box-sizing: border-box;
}
.lg\:w-120 {
width: 30rem;
}
.lg\:h-120 {
height: 30rem;
}
.question-card {
transform: scale(0.95);
transition: all 0.3s ease;
}
.question-card:hover {
transform: scale(1);
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
</style>
</head>
<body class="bg-gradient-to-br from-purple-900 to-indigo-800 min-h-screen text-white">
<div class="container mx-auto px-4 py-10">
<header class="text-center mb-12">
<h1 class="text-4xl md:text-6xl font-bold mb-3 tracking-tight">Lepton Exploration 1</h1>
<h1 class="text-4xl md:text-3xl font-bold">Future Stars</h1>
<p class="text-xl text-purple-200">Gira la ruleta y responde 14 preguntas sobre el cortometraje</p>
</header>
<div class="flex flex-col lg:flex-row items-center justify-center gap-8 lg:gap-12">
<div class="relative w-72 h-72 md:w-96 md:h-96 lg:w-120 lg:h-120 mx-auto">
<div id="wheel" class="wheel w-full h-full rounded-full border-8 border-yellow-400 bg-white relative overflow-hidden transition-transform duration-5000">
</div>
<div class="absolute top-0 left-1/2 -translate-x-1/2 -mt-4">
<svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-yellow-400">
<path d="M12 2L12 22M12 2L22 12M12 2L2 12"></path>
</svg>
</div>
<button id="spin-btn" class="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-yellow-400 hover:bg-yellow-300 text-purple-900 font-bold w-16 h-16 rounded-full flex items-center justify-center transition-all shadow-lg hover:shadow-xl focus:outline-none focus:ring-2 focus:ring-yellow-200">
<i data-feather="rotate-cw"></i>
</button>
</div>
<div class="w-full lg:w-1/2 max-w-2xl mx-auto">
<div id="question-display" class="bg-white bg-opacity-10 backdrop-filter backdrop-blur-lg rounded-xl p-6 shadow-xl min-h-64 flex flex-col justify-center mx-4">
<p id="current-question" class="text-center text-2xl font-medium mb-6 text-purple-100">Presiona el botón para girar la ruleta y obtener una pregunta</p>
<button id="answer-btn" class="hidden mt-4 bg-purple-600 hover:bg-purple-500 text-white font-bold py-3 px-6 rounded-lg transition-all self-center">Mostrar Respuesta</button>
</div>
<div id="answer-display" class="hidden mt-6 bg-white bg-opacity-10 backdrop-filter backdrop-blur-lg rounded-xl p-6 shadow-xl">
<h3 class="text-xl font-bold text-center text-yellow-300 mb-4">Respuesta:</h3>
<p id="answer-text" class="text-center text-lg bg-purple-900 bg-opacity-50 rounded-lg p-4" style="display: block;"></p>
</div>
<div class="mt-8 grid grid-cols-1 md:grid-cols-2 gap-4 mx-auto max-w-md">
<div class="bg-indigo-700 bg-opacity-50 rounded-lg p-4 text-center mx-2">
<p class="text-sm text-purple-200">Preguntas Restantes</p>
<p id="questions-left" class="text-3xl font-bold">14</p>
</div>
<div class="bg-indigo-700 bg-opacity-50 rounded-lg p-4 text-center mx-2">
<p class="text-sm text-purple-200">Preguntas Contestadas</p>
<p id="questions-answered" class="text-3xl font-bold">0</p>
</div>
</div>
<div class="container mx-auto px-4 py-10">
</div>
</div>
</div>
<script>
feather.replace();
const questions = [
{
question: "¿Qué es un exoplaneta?",
answer: "Un exoplaneta es un planeta que orbita una estrella diferente a nuestro Sol."
},
{
question: "¿Cómo podemos identificar un exoplaneta?",
answer: "Se puede identificar mediante el método de tránsito (midiendo la disminución de brillo de una estrella cuando el planeta pasa frente a ella)."
},
{
question: "¿Qué características tiene el exoplaneta Kepler-442b?",
answer: "Kepler-442b es una supertierra rocosa con un radio 1.34 veces el de la Tierra, orbita en la zona habitable de su estrella (una enana naranja), tiene una temperatura de equilibrio estimada de -40°C, y recibe aproximadamente el 70% de la luz solar que recibe la Tierra."
},
{
question: "¿Cuál es el ambiente del exoplaneta Kepler-442b?",
answer: "Se estima que Kepler-442b tiene una superficie rocosa con alta probabilidad de contener agua líquida en su superficie debido a que orbita en la zona habitable de su estrella. Podría tener una atmósfera similar a la terrestre."
},
{
question: "¿En qué década fueron descubiertos los primeros exoplanetas?",
answer: "En la década de 1990's"
},
{
question: "¿Por qué se le llaman supertierras a los exoplanetas?",
answer: "Se les llama supertierras porque son planetas rocosos como la Tierra pero con una masa entre 2 y 10 veces mayor. Su gravedad superficial sería más fuerte y podrían tener atmósferas más densas."
},
{
question: "¿En qué constelación está el exoplaneta Kepler-442b?",
answer: "Kepler-442b se encuentra en la constelación de Lyra."
},
{
question: "¿Qué características tiene la nave Starship 4.0?",
answer: "El Starship es un cohete totalmente reutilizable de 120m de altura, con capacidad para 100 toneladas de carga o 100 pasajeros. Usa motores Raptor que queman metano y oxígeno líquido, y está diseñado para misiones a la Luna, Marte y otros destinos del sistema solar."
},
{
question: "¿Cuáles son los nombres de los personajes en el cortometraje?",
answer: "El astronauta se llama Steve y lo acompaña Lepton, un robot humanoide"
},
{
question: "¿Consideras que es importante la exploración espacial?",
answer: "(Pregunta abierta)"
},
{
question: "¿Te gustaría vivir en un exoplaneta? ¿Por qué?",
answer: "(Respuesta abierta)"
},
{
question: "¿Por qué se dice que el exoplaneta Kepler-442b se parece a la tierra?",
answer: "Kepler-442b se considera similar a la Tierra porque: 1) Es rocoso, 2) Orbita en la zona habitable de su estrella, 3) Tiene un tamaño similar (1.34 radios terrestres), 4) Probablemente tiene agua líquida, y 5) Recibe una cantidad de luz estelar similar (70% de lo que recibe la Tierra del Sol)."
},
{
question: "¿Consideras que el cortometraje te ayudo a aprender sobre los exoplanetas?",
answer: "(Pregunta abierta)"
},
{
question: "¿Qué cosas consideras que debe tener el exoplaneta Kepler-442b si queremos vivir allá?",
answer: "(Pregunta abierta)"
}
];
let remainingQuestions = [...questions];
let currentQuestion = null;
let isSpinning = false;
const wheel = document.getElementById('wheel');
const colors = [
'bg-red-500', 'bg-blue-500', 'bg-green-500', 'bg-yellow-500',
'bg-purple-500', 'bg-pink-500', 'bg-indigo-500', 'bg-teal-500',
'bg-orange-500', 'bg-amber-500', 'bg-lime-500', 'bg-cyan-500',
'bg-violet-500', 'bg-fuchsia-500', 'bg-rose-500'
];
questions.forEach((q, index) => {
const angle = (360 / questions.length) * index;
const segment = document.createElement('div');
segment.className = `wheel-segment ${colors[index]}`;
segment.style.transform = `rotate(${angle}deg)`;
const questionText = document.createElement('div');
questionText.className = 'wheel-text';
questionText.style.transform = `rotate(${angle + (360 / questions.length / 2)}deg)`;
questionText.textContent = q.question;
segment.appendChild(questionText);
wheel.appendChild(segment);
});
document.getElementById('spin-btn').addEventListener('click', () => {
if (isSpinning || remainingQuestions.length === 0) return;
isSpinning = true;
const spinBtn = document.getElementById('spin-btn');
spinBtn.disabled = true;
spinBtn.innerHTML = '<i data-feather="loader" class="animate-spin"></i>';
feather.replace();
const segmentAngle = 360 / questions.length;
const stopRotation = Math.floor(Math.random() * 360);
const selectedSegment = Math.floor(stopRotation / segmentAngle);
let adjustedIndex = selectedSegment % remainingQuestions.length;
currentQuestion = remainingQuestions[adjustedIndex];
remainingQuestions.splice(adjustedIndex, 1);
wheel.style.setProperty('--stop-rotation', `${stopRotation}deg`);
wheel.style.animation = 'spin 5s forwards';
setTimeout(() => {
wheel.style.animation = 'none';
wheel.style.transform = `rotate(${stopRotation}deg)`;
document.getElementById('current-question').textContent = `Pregunta: ${currentQuestion.question}`;
document.getElementById('answer-btn').classList.remove('hidden');
document.getElementById('answer-text').classList.add('hidden');
document.getElementById('questions-left').textContent = remainingQuestions.length;
document.getElementById('questions-answered').textContent = questions.length - remainingQuestions.length;
isSpinning = false;
spinBtn.disabled = false;
spinBtn.innerHTML = '<i data-feather="rotate-cw"></i>';
feather.replace();
}, 7000);
});
document.getElementById('answer-btn').addEventListener('click', () => {
document.getElementById('answer-text').textContent = currentQuestion.answer || "Esta pregunta no tiene una respuesta definida. ¡Piensa en tu propia respuesta!";
document.getElementById('answer-display').classList.remove('hidden');
document.getElementById('answer-btn').classList.add('hidden');
document.getElementById('answer-text').style.display = 'block';
});
document.getElementById('spin-btn').addEventListener('click', () => {
document.getElementById('answer-display').classList.add('hidden');
});
wheel.style.transform = 'rotate(0deg)';
</script>
</body>
</html> |