Conversación con Gemini
Has dicho
genera una pagina web responsiva en html para el sitio web "voto lab", las imagenes estan en un folder llamado "imagenes". utiliza el logotipo logo.png y el background sea el video b.mp4. en la pagina principal ponemos 2 opciones "mapas" y "analisis" que llevan a nuevas paginas
Gemini ha dicho
Python
import os
# Create HTML content for index.html (Homepage)
index_html = """<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Voto Lab - Inicio</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
body, html {
height: 100%;
width: 100%;
overflow-x: hidden;
color: #ffffff;
}
/* Video de fondo */
.video-background {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -2;
object-fit: cover;
}
/* Capa superpuesta para mejorar el contraste */
.overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(10, 20, 35, 0.65);
backdrop-filter: blur(3px);
z-index: -1;
}
/* Encabezado / Navbar */
header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px 8%;
background: rgba(0, 0, 0, 0.3);
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.logo-container img {
height: 50px;
width: auto;
object-fit: contain;
filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.5));
}
nav a {
color: #ffffff;
text-decoration: none;
margin-left: 25px;
font-size: 1.05rem;
font-weight: 500;
transition: color 0.3s ease;
}
nav a:hover {
color: #00d2ff;
}
/* Contenido Principal / Hero */
main {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
min-height: calc(100vh - 150px);
text-align: center;
padding: 40px 20px;
}
.hero-title {
font-size: 3rem;
font-weight: 800;
margin-bottom: 15px;
letter-spacing: 1px;
text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
background: linear-gradient(135deg, #ffffff 0%, #a5c0ee 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.hero-subtitle {
font-size: 1.25rem;
max-width: 650px;
margin-bottom: 50px;
color: #e0e6ed;
line-height: 1.6;
text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}
/* Seccion de Opciones / Tarjetas */
.cards-container {
display: flex;
gap: 30px;
justify-content: center;
align-items: center;
flex-wrap: wrap;
width: 100%;
max-width: 900px;
}
.card {
background: rgba(255, 255, 255, 0.08);
border: 1px solid rgba(255, 255, 255, 0.18);
border-radius: 16px;
padding: 40px 30px;
width: 320px;
text-decoration: none;
color: #ffffff;
backdrop-filter: blur(10px);
transition: all 0.4s ease;
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
display: flex;
flex-direction: column;
align-items: center;
}
.card:hover {
transform: translateY(-10px);
background: rgba(255, 255, 255, 0.15);
border-color: rgba(0, 210, 255, 0.5);
box-shadow: 0 15px 35px rgba(0, 210, 255, 0.2);
}
.card-icon {
font-size: 3rem;
margin-bottom: 20px;
}
.card h2 {
font-size: 1.8rem;
margin-bottom: 12px;
font-weight: 600;
}
.card p {
font-size: 0.95rem;
color: #cbd5e1;
line-height: 1.5;
}
.btn-action {
margin-top: 25px;
padding: 10px 24px;
background: linear-gradient(135deg, #00d2ff 0%, #0066ff 100%);
border: none;
border-radius: 20px;
color: white;
font-weight: 600;
font-size: 0.9rem;
cursor: pointer;
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover .btn-action {
box-shadow: 0 4px 15px rgba(0, 210, 255, 0.4);
}
/* Footer */
footer {
text-align: center;
padding: 20px;
font-size: 0.85rem;
color: #94a3b8;
background: rgba(0, 0, 0, 0.4);
}
/* Adaptabilidad / Responsive */
@media (max-width: 768px) {
header {
flex-direction: column;
gap: 15px;
}
nav a {
margin: 0 10px;
}
.hero-title {
font-size: 2.2rem;
}
.hero-subtitle {
font-size: 1rem;
}
.cards-container {
flex-direction: column;
}
.card {
width: 100%;
max-width: 350px;
}
}
</style>
</head>
<body>
<!-- Fondo de Video -->
<video autoplay loop muted playsinline class="video-background">
<source src="b.mp4" type="video/mp4">
Tu navegador no soporta videos en HTML5.
</video>
<!-- Capa Oscura Overlay -->
<div class="overlay"></div>
<!-- Encabezado / Logo -->
<header>
<div class="logo-container">
<a href="index.html">
<img src="imagenes/logo.png" alt="Voto Lab Logo">
</a>
</div>
<nav>
<a href="index.html">Inicio</a>
<a href="mapas.html">Mapas</a>
<a href="analisis.html">Análisis</a>
</nav>
</header>
<!-- Contenido Principal -->
<main>
<h1 class="hero-title">VOTO LAB</h1>
<p class="hero-subtitle">Plataforma de inteligencia electoral y análisis de datos. Explora mapas interactivos y métricas analíticas detalladas.</p>
<div class="cards-container">
<!-- Opción 1: Mapas -->
<a href="mapas.html" class="card">
<div class="card-icon">🗺️</div>
<h2>Mapas</h2>
<p>Visualiza geolocalización electoral, cartografía interactiva y distribución territorial del voto.</p>
<button class="btn-action">Explorar Mapas</button>
</a>
<!-- Opción 2: Análisis -->
<a href="analisis.html" class="card">
<div class="card-icon">📊</div>
<h2>Análisis</h2>
<p>Accede a estadísticas detalladas, modelos predictivos y comportamiento histórico de tendencias.</p>
<button class="btn-action">Ver Análisis</button>
</a>
</div>
</main>
<footer>
© 2026 Voto Lab. Todos los derechos reservados.
</footer>
</body>
</html>
"""
# Create placeholder HTML content for mapas.html
mapas_html = """<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Voto Lab - Mapas</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }
body { background: #0f172a; color: #ffffff; padding: 20px; }
header { display: flex; justify-content: space-between; align-items: center; padding: 10px 5%; border-bottom: 1px solid #334155; }
header img { height: 45px; }
nav a { color: #94a3b8; text-decoration: none; margin-left: 20px; font-weight: 500; }
nav a.active, nav a:hover { color: #00d2ff; }
.container { max-width: 1100px; margin: 40px auto; text-align: center; }
h1 { font-size: 2.5rem; margin-bottom: 15px; color: #00d2ff; }
p { color: #94a3b8; font-size: 1.1rem; margin-bottom: 30px; }
.map-placeholder { width: 100%; height: 450px; background: #1e293b; border-radius: 12px; border: 2px dashed #334155; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: #64748b; }
</style>
</head>
<body>
<header>
<a href="index.html"><img src="imagenes/logo.png" alt="Voto Lab Logo"></a>
<nav>
<a href="index.html">Inicio</a>
<a href="mapas.html" class="active">Mapas</a>
<a href="analisis.html">Análisis</a>
</nav>
</header>
<div class="container">
<h1>Módulo de Mapas Electorales</h1>
<p>Explora la distribución territorial y zonas electorales en tiempo real.</p>
<div class="map-placeholder">
[ Espacio reservado para el visor de Mapas e Información Geográfica ]
</div>
</div>
</body>
</html>
"""
# Create placeholder HTML content for analisis.html
analisis_html = """<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Voto Lab - Análisis</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }
body { background: #0f172a; color: #ffffff; padding: 20px; }
header { display: flex; justify-content: space-between; align-items: center; padding: 10px 5%; border-bottom: 1px solid #334155; }
header img { height: 45px; }
nav a { color: #94a3b8; text-decoration: none; margin-left: 20px; font-weight: 500; }
nav a.active, nav a:hover { color: #00d2ff; }
.container { max-width: 1100px; margin: 40px auto; text-align: center; }
h1 { font-size: 2.5rem; margin-bottom: 15px; color: #00d2ff; }
p { color: #94a3b8; font-size: 1.1rem; margin-bottom: 30px; }
.dashboard-placeholder { width: 100%; height: 450px; background: #1e293b; border-radius: 12px; border: 2px dashed #334155; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: #64748b; }
</style>
</head>
<body>
<header>
<a href="index.html"><img src="imagenes/logo.png" alt="Voto Lab Logo"></a>
<nav>
<a href="index.html">Inicio</a>
<a href="mapas.html">Mapas</a>
<a href="analisis.html" class="active">Análisis</a>
</nav>
</header>
<div class="container">
<h1>Panel de Análisis y Estadísticas</h1>
<p>Métricas avanzadas, tendencias históricas y proyecciones de voto.</p>
<div class="dashboard-placeholder">
[ Espacio reservado para Gráficas, Tablas y Dashboard de Datos ]
</div>
</div>
</body>
</html>
"""
# Save files
with open("index.html", "w", encoding="utf-8") as f:
f.write(index_html)
with open("mapas.html", "w", encoding="utf-8") as f:
f.write(mapas_html)
with open("analisis.html", "w", encoding="utf-8") as f:
f.write(analisis_html)
print("Files generated successfully.")
Salida de código
Files generated successfully.
He creado los archivos HTML para el sitio web "Voto Lab" completamente responsivos y adaptados a tus especificaciones:
(Página principal / Inicio)
index
HTML
(Página de Mapas)
mapas
HTML
(Página de Análisis)
analisis
HTML
🛠️ Estructura del proyecto
Para que la página web funcione correctamente con los recursos multimedia, asegúrate de organizar los archivos en tu carpeta raíz de la siguiente manera:
Plaintext
📁 tu-proyecto/
├── 📄 index.html
├── 📄 mapas.html
├── 📄 analisis.html
├── 🎥 b.mp4 <-- Video de fondo
└── 📁 imagenes/
└── 🖼️ logo.png <-- Logotipo de Voto Lab
💻 Código Fuente HTML de la página principal (index.html)
HTML
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Voto Lab - Inicio</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
body, html {
height: 100%;
width: 100%;
overflow-x: hidden;
color: #ffffff;
}
/* Video de fondo */
.video-background {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -2;
object-fit: cover;
}
/* Capa superpuesta para legibilidad del texto */
.overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(10, 20, 35, 0.65);
backdrop-filter: blur(3px);
z-index: -1;
}
/* Encabezado / Navbar */
header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px 8%;
background: rgba(0, 0, 0, 0.3);
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.logo-container img {
height: 50px;
width: auto;
object-fit: contain;
filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.5));
}
nav a {
color: #ffffff;
text-decoration: none;
margin-left: 25px;
font-size: 1.05rem;
font-weight: 500;
transition: color 0.3s ease;
}
nav a:hover {
color: #00d2ff;
}
/* Contenido Principal */
main {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
min-height: calc(100vh - 150px);
text-align: center;
padding: 40px 20px;
}
.hero-title {
font-size: 3rem;
font-weight: 800;
margin-bottom: 15px;
letter-spacing: 1px;
background: linear-gradient(135deg, #ffffff 0%, #a5c0ee 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.hero-subtitle {
font-size: 1.25rem;
max-width: 650px;
margin-bottom: 50px;
color: #e0e6ed;
line-height: 1.6;
text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}
/* Tarjetas de Selección (Mapas y Análisis) */
.cards-container {
display: flex;
gap: 30px;
justify-content: center;
align-items: center;
flex-wrap: wrap;
width: 100%;
max-width: 900px;
}
.card {
background: rgba(255, 255, 255, 0.08);
border: 1px solid rgba(255, 255, 255, 0.18);
border-radius: 16px;
padding: 40px 30px;
width: 320px;
text-decoration: none;
color: #ffffff;
backdrop-filter: blur(10px);
transition: all 0.4s ease;
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
display: flex;
flex-direction: column;
align-items: center;
}
.card:hover {
transform: translateY(-10px);
background: rgba(255, 255, 255, 0.15);
border-color: rgba(0, 210, 255, 0.5);
box-shadow: 0 15px 35px rgba(0, 210, 255, 0.2);
}
.card-icon {
font-size: 3rem;
margin-bottom: 20px;
}
.card h2 {
font-size: 1.8rem;
margin-bottom: 12px;
font-weight: 600;
}
.card p {
font-size: 0.95rem;
color: #cbd5e1;
line-height: 1.5;
}
.btn-action {
margin-top: 25px;
padding: 10px 24px;
background: linear-gradient(135deg, #00d2ff 0%, #0066ff 100%);
border: none;
border-radius: 20px;
color: white;
font-weight: 600;
font-size: 0.9rem;
cursor: pointer;
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
/* Footer */
footer {
text-align: center;
padding: 20px;
font-size: 0.85rem;
color: #94a3b8;
background: rgba(0, 0, 0, 0.4);
}
/* Diseño Responsivo para Móviles y Tablets */
@media (max-width: 768px) {
header {
flex-direction: column;
gap: 15px;
}
nav a {
margin: 0 10px;
}
.hero-title {
font-size: 2.2rem;
}
.hero-subtitle {
font-size: 1rem;
}
.cards-container {
flex-direction: column;
}
.card {
width: 100%;
max-width: 350px;
}
}
</style>
</head>
<body>
<!-- Fondo de Video -->
<video autoplay loop muted playsinline class="video-background">
<source src="b.mp4" type="video/mp4">
Tu navegador no soporta videos en HTML5.
</video>
<!-- Overlay de oscurecimiento -->
<div class="overlay"></div>
<!-- Encabezado / Logo -->
<header>
<div class="logo-container">
<a href="index.html">
<img src="imagenes/logo.png" alt="Voto Lab Logo">
</a>
</div>
<nav>
<a href="index.html">Inicio</a>
<a href="mapas.html">Mapas</a>
<a href="analisis.html">Análisis</a>
</nav>
</header>
<!-- Contenido Principal -->
<main>
<h1 class="hero-title">VOTO LAB</h1>
<p class="hero-subtitle">Plataforma de inteligencia electoral y análisis de datos. Explora mapas interactivos y métricas analíticas detalladas.</p>
<div class="cards-container">
<!-- Opción 1: Mapas -->
<a href="mapas.html" class="card">
<div class="card-icon">🗺️</div>
<h2>Mapas</h2>
<p>Visualiza geolocalización electoral, cartografía interactiva y distribución territorial del voto.</p>
<button class="btn-action">Explorar Mapas</button>
</a>
<!-- Opción 2: Análisis -->
<a href="analisis.html" class="card">
<div class="card-icon">📊</div>
<h2>Análisis</h2>
<p>Accede a estadísticas detalladas, modelos predictivos y comportamiento histórico de tendencias.</p>
<button class="btn-action">Ver Análisis</button>
</a>
</div>
</main>
<footer>
© 2026 Voto Lab. Todos los derechos reservados.
</footer>
</body>
</html>
✨ Características implementadas:
Video de fondo (
b.mp4): Ocupa toda la pantalla conobject-fit: covere incluye la propiedadplaysinlineymutedpara asegurar su reproducción automática en dispositivos móviles.Capa Glassmorphism: Incluye un overlay semitransparente con desenfoque (
backdrop-filter) para asegurar una legibilidad impecable del texto sobre el video.Logotipo (
imagenes/logo.png): Ubicado en el header y vinculado para regresar a la página principal.Diseño Responsivo: Se adapta de forma fluida a pantallas de teléfonos, tabletas y ordenadores mediante CSS Flexbox y Media Queries.
Navegación: Enlaces claros a
mapas.htmlyanalisis.html.
.jpg)
Tus conversaciones de Semantiq no se usan para mejorar nuestros modelos. Gemini es una IA y puede cometer errores. Tu privacidad y GeminiSe abre en una ventana nueva
