Curso de Entrenador Nacional de Vóley
+Material de Estudio — Versión Offline
+Contenido extraído del campus virtual
+Generado el ${fecha}
+diff --git a/descargar-curso/generar_dashboard.mjs b/descargar-curso/generar_dashboard.mjs index fdd5536..d365a80 100644 --- a/descargar-curso/generar_dashboard.mjs +++ b/descargar-curso/generar_dashboard.mjs @@ -621,23 +621,191 @@ function generarHTML(datos) { for (const s of m.secciones) totalTemas += s.temas.length; } + // Leer mapa de videos descargados si existe + const mapaVideosPath = path.join(__dirname, ".mapa_videos.json"); + let videosMap = {}; + try { + if (fs.existsSync(mapaVideosPath)) { + videosMap = JSON.parse(fs.readFileSync(mapaVideosPath, "utf-8")); + } + } catch { /* sin mapa */ } + const css = ` * { margin: 0; padding: 0; box-sizing: border-box; } + +@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap'); + +:root { + --sidebar-w: 280px; + --color-bg: #f5f3ef; + --color-surface: #ffffff; + --color-primary: #1a5276; + --color-primary-dark: #0d2b3e; + --color-accent: #2980b9; + --color-text: #2c2c2c; + --color-text-muted: #6b7280; +} + body { - font-family: 'Segoe UI', 'Georgia', 'Times New Roman', serif; - background: #f5f3ef; - color: #2c2c2c; + font-family: 'Inter', 'Segoe UI', system-ui, sans-serif; + background: var(--color-bg); + color: var(--color-text); line-height: 1.8; - font-size: 17px; + font-size: 16px; +} + +/* ── LAYOUT ── */ +.app-layout { + display: flex; + min-height: 100vh; +} + +/* ── SIDEBAR ── */ +.sidebar { + width: var(--sidebar-w); + background: var(--color-primary-dark); + color: rgba(255,255,255,0.85); + position: fixed; + top: 0; + left: 0; + bottom: 0; + overflow-y: auto; + z-index: 100; + display: flex; + flex-direction: column; + transition: transform 0.3s ease; +} + +.sidebar-header { + padding: 1.5rem 1.2rem 1rem; + border-bottom: 1px solid rgba(255,255,255,0.08); + flex-shrink: 0; +} + +.sidebar-header .logo { + font-size: 1.8rem; + margin-bottom: 0.3rem; +} + +.sidebar-header h1 { + font-size: 0.95rem; + font-weight: 700; + line-height: 1.3; + margin-bottom: 0.2rem; +} + +.sidebar-header p { + font-size: 0.72rem; + opacity: 0.5; + font-weight: 400; +} + +.sidebar-stats { + display: flex; + gap: 0.5rem; + padding: 0.8rem 1.2rem; + border-bottom: 1px solid rgba(255,255,255,0.08); + flex-shrink: 0; +} + +.sidebar-stats .stat { + background: rgba(255,255,255,0.08); + padding: 0.3rem 0.6rem; + border-radius: 6px; + font-size: 0.7rem; + font-weight: 500; + flex: 1; + text-align: center; +} + +.sidebar-nav { + flex: 1; + overflow-y: auto; + padding: 0.8rem 0; +} + +.sidebar-nav .nav-modulo { + padding: 0.6rem 1.2rem 0.3rem; + font-size: 0.68rem; + font-weight: 700; + text-transform: uppercase; + letter-spacing: 1px; + color: rgba(255,255,255,0.4); +} + +.sidebar-nav a { + display: block; + padding: 0.45rem 1.2rem 0.45rem 1.6rem; + color: rgba(255,255,255,0.7); + text-decoration: none; + font-size: 0.82rem; + font-weight: 400; + transition: all 0.2s; + border-left: 3px solid transparent; +} + +.sidebar-nav a:hover { + background: rgba(255,255,255,0.06); + color: white; + border-left-color: var(--color-accent); +} + +.sidebar-nav a.active { + background: rgba(41,128,185,0.15); + color: white; + border-left-color: var(--color-accent); + font-weight: 600; +} + +.sidebar-nav .nav-count { + font-size: 0.65rem; + opacity: 0.4; + margin-left: 0.3rem; +} + +/* ── HAMBURGER ── */ +.hamburger { + display: none; + position: fixed; + top: 1rem; + left: 1rem; + z-index: 200; + background: var(--color-primary-dark); + border: none; + color: white; + width: 44px; + height: 44px; + border-radius: 10px; + font-size: 1.4rem; + cursor: pointer; + box-shadow: 0 4px 12px rgba(0,0,0,0.2); + transition: transform 0.2s; +} + +.hamburger:hover { transform: scale(1.05); } + +.sidebar-overlay { + display: none; + position: fixed; + inset: 0; + background: rgba(0,0,0,0.4); + z-index: 99; +} + +/* ── MAIN CONTENT ── */ +.main-content { + flex: 1; + margin-left: var(--sidebar-w); + min-width: 0; } /* ── PORTADA ── */ .portada { - background: linear-gradient(135deg, #0d2b3e 0%, #1a5276 50%, #2980b9 100%); + background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 50%, var(--color-accent) 100%); color: white; - padding: 5rem 2rem; + padding: 4rem 2rem; text-align: center; - min-height: 70vh; + min-height: 50vh; display: flex; flex-direction: column; justify-content: center; @@ -645,141 +813,102 @@ body { position: relative; overflow: hidden; } + .portada::before { content: ''; position: absolute; - top: -50%; - left: -50%; - width: 200%; - height: 200%; + top: -50%; left: -50%; + width: 200%; height: 200%; background: radial-gradient(circle at 30% 70%, rgba(255,255,255,0.05) 0%, transparent 50%); pointer-events: none; } -.portada h1 { font-size: 2.6rem; margin-bottom: 0.6rem; font-weight: 700; letter-spacing: -0.5px; } -.portada h2 { font-size: 1.3rem; font-weight: 300; opacity: 0.9; margin-bottom: 1.5rem; } -.portada p { opacity: 0.7; font-size: 0.95rem; } -.portada .stats { - margin-top: 2rem; - display: flex; - gap: 1.5rem; - flex-wrap: wrap; - justify-content: center; -} -.portada .stat { - background: rgba(255,255,255,0.12); - backdrop-filter: blur(4px); - padding: 0.6rem 1.4rem; - border-radius: 8px; - font-size: 0.9rem; - border: 1px solid rgba(255,255,255,0.08); -} -.portada .icono-grande { - font-size: 4rem; - margin-bottom: 1rem; - opacity: 0.3; -} -/* ── ÍNDICE ── */ -.indice { - background: white; - padding: 2.5rem; - max-width: 820px; - margin: 0 auto; - border-bottom: 1px solid #e8e4df; -} -.indice h2 { - color: #0d2b3e; - margin-bottom: 1.5rem; - font-size: 1.3rem; - display: flex; - align-items: center; - gap: 0.5rem; -} -.indice ul { list-style: none; } -.indice li { padding: 0.35rem 0; } -.indice a { - color: #1a5276; - text-decoration: none; - border-bottom: 1px solid transparent; - transition: border-color 0.2s; -} -.indice a:hover { border-bottom-color: #2980b9; } -.indice .modulo-titulo { - font-weight: 600; - font-size: 1.05rem; - margin-top: 1rem; - padding-top: 0.8rem; - border-top: 1px solid #eee; - color: #0d2b3e; -} -.indice .modulo-titulo:first-child { border-top: none; margin-top: 0; padding-top: 0; } -.indice .seccion-link { padding-left: 1.2rem; font-size: 0.93rem; } +.portada .icono-grande { font-size: 4rem; margin-bottom: 1rem; opacity: 0.3; } +.portada h1 { font-size: 2.4rem; margin-bottom: 0.5rem; font-weight: 800; letter-spacing: -1px; } +.portada h2 { font-size: 1.15rem; font-weight: 300; opacity: 0.8; margin-bottom: 1rem; } +.portada p { opacity: 0.6; font-size: 0.9rem; } /* ── CONTENIDO ── */ .contenido { max-width: 820px; margin: 0 auto; padding: 2.5rem; - background: white; + background: var(--color-surface); + min-height: 60vh; } + .contenido h1.modulo-titulo { - color: #0d2b3e; - font-size: 2rem; - border-bottom: 3px solid #2980b9; + color: var(--color-primary-dark); + font-size: 1.8rem; + font-weight: 800; + border-bottom: 3px solid var(--color-accent); padding-bottom: 0.5rem; margin: 3rem 0 1.5rem; + letter-spacing: -0.5px; } + .contenido h2.seccion-titulo { - color: #1a5276; - font-size: 1.5rem; + color: var(--color-primary); + font-size: 1.35rem; + font-weight: 700; margin: 2.5rem 0 1rem; - border-left: 4px solid #2980b9; + border-left: 4px solid var(--color-accent); padding-left: 0.8rem; + scroll-margin-top: 1rem; } + .contenido h3.tema-titulo { color: #2c3e50; - font-size: 1.15rem; + font-size: 1.1rem; margin: 1.8rem 0 0.8rem; font-weight: 600; } + .contenido h4 { color: #34495e; - font-size: 1.05rem; + font-size: 1rem; margin: 1.3rem 0 0.6rem; font-weight: 600; } + .contenido p { margin: 0.8rem 0; text-align: justify; } .contenido ul, .contenido ol { margin: 0.8rem 0; padding-left: 1.8rem; } .contenido li { margin: 0.4rem 0; } .contenido strong { color: #1a3a4a; font-weight: 600; } + .contenido hr { border: none; border-top: 1px solid #e8e4df; margin: 1.8rem 0; } + .contenido table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; - font-size: 0.9rem; + font-size: 0.88rem; overflow-x: auto; display: block; } + .contenido th, .contenido td { border: 1px solid #ddd; padding: 0.6rem 0.8rem; text-align: left; vertical-align: top; } + .contenido th { - background: #0d2b3e; + background: var(--color-primary-dark); color: white; font-weight: 600; } + .contenido tr:nth-child(even) { background: #f8f6f3; } .contenido tr:hover { background: #efece7; } + .contenido blockquote { - border-left: 4px solid #2980b9; + border-left: 4px solid var(--color-accent); margin: 1rem 0; padding: 0.8rem 1.2rem; background: #f0f5fa; @@ -787,6 +916,20 @@ body { border-radius: 0 4px 4px 0; } +/* ── VIDEO PLAYER ── */ +.video-container { + margin: 1rem 0; + border-radius: 10px; + overflow: hidden; + background: #000; + box-shadow: 0 4px 20px rgba(0,0,0,0.15); +} + +.video-container video { + width: 100%; + display: block; +} + /* ── NOTAS ESPECIALES ── */ .nota-video { background: #fef9e7; @@ -795,26 +938,26 @@ body { padding: 0.6rem 1rem; margin: 0.8rem 0; border-radius: 0 4px 4px 0; - font-size: 0.9rem; + font-size: 0.88rem; color: #7d6608; } .nota-recurso { background: #eaf2f8; border: 1px solid #aed6f1; - border-left: 4px solid #2980b9; + border-left: 4px solid var(--color-accent); padding: 0.6rem 1rem; margin: 0.8rem 0; border-radius: 0 4px 4px 0; - font-size: 0.9rem; + font-size: 0.88rem; } .nota-recurso a { - color: #1a5276; + color: var(--color-primary); font-weight: 600; } .nota-vacio { - color: #999; + color: var(--color-text-muted); font-style: italic; - font-size: 0.9rem; + font-size: 0.88rem; margin: 0.5rem 0; } .contenido .tema-separador { @@ -825,35 +968,38 @@ body { /* ── PIE DE PÁGINA ── */ .footer { text-align: center; - padding: 3rem 2rem; - color: #999; - font-size: 0.85rem; + padding: 2rem; + color: var(--color-text-muted); + font-size: 0.8rem; max-width: 820px; margin: 0 auto; border-top: 1px solid #e8e4df; - background: white; + background: var(--color-surface); } /* ── RESPONSIVE ── */ -@media (max-width: 600px) { - body { font-size: 15px; } - .portada { padding: 2rem 1rem; min-height: 50vh; } +@media (max-width: 900px) { + .sidebar { transform: translateX(-100%); } + .sidebar.open { transform: translateX(0); } + .sidebar-overlay.open { display: block; } + .hamburger { display: block; } + .main-content { margin-left: 0; } + .portada { padding: 3rem 1rem 2rem; min-height: 40vh; } .portada h1 { font-size: 1.6rem; } - .portada h2 { font-size: 1rem; } - .contenido { padding: 1rem; } - .indice { padding: 1.5rem; } + .portada h2 { font-size: 0.95rem; } + .contenido { padding: 1.5rem 1rem; } } `; - // ─── ÍNDICE ─── - let indiceHTML = '
Contenido extraído del campus virtual
-Generado el ${fecha}
+ + + + +Contenido extraído del campus virtual
+Generado el ${fecha}
+