Spaces:
Running
Running
Update index.html
Browse files- index.html +71 -36
index.html
CHANGED
|
@@ -166,6 +166,8 @@
|
|
| 166 |
.roi-excellent { color: #4ade80; } .roi-good { color: #22c55e; } .roi-ok { color: #fbbf24; } .roi-risk { color: #fb923c; } .roi-low { color: #f87171; }
|
| 167 |
|
| 168 |
.overlay-slide5 { background: linear-gradient(to right, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 55%, rgba(0,0,0,0.0) 100%); }
|
|
|
|
|
|
|
| 169 |
.content-slide5 {
|
| 170 |
position: absolute;
|
| 171 |
top: 20px;
|
|
@@ -178,7 +180,7 @@
|
|
| 178 |
}
|
| 179 |
.titulo-slide5 {
|
| 180 |
font-family: 'EB Garamond', serif;
|
| 181 |
-
font-size: 2.2rem;
|
| 182 |
font-weight: 600;
|
| 183 |
letter-spacing: 1px;
|
| 184 |
margin-bottom: 12px;
|
|
@@ -200,7 +202,7 @@
|
|
| 200 |
.cascada-table .fase3-row .col-monto { color: #fbbf24; }
|
| 201 |
.notas-tecnicas {
|
| 202 |
background: rgba(0,0,0,0.8); border-left: 3px solid rgba(255,255,255,0.3);
|
| 203 |
-
padding: 15px; margin-top: 45px;
|
| 204 |
}
|
| 205 |
.notas-tecnicas h3 { font-family: 'EB Garamond', serif; font-size: 1.2rem; margin-bottom: 10px; color: #fff; font-weight: 600; }
|
| 206 |
.nota-item { margin-bottom: 12px; font-size: 0.8rem; line-height: 1.5; color: #ccc; }
|
|
@@ -291,23 +293,6 @@
|
|
| 291 |
margin-top: 10px;
|
| 292 |
}
|
| 293 |
|
| 294 |
-
/* ===================== MODO CAPTURA PDF (FUERZA DESKTOP) ===================== */
|
| 295 |
-
body.pdf-capture-mode {
|
| 296 |
-
min-width: 1920px !important;
|
| 297 |
-
width: 1920px !important;
|
| 298 |
-
overflow-x: hidden !important;
|
| 299 |
-
}
|
| 300 |
-
body.pdf-capture-mode .content-slide5 {
|
| 301 |
-
max-height: none !important;
|
| 302 |
-
overflow: visible !important;
|
| 303 |
-
padding-bottom: 0 !important;
|
| 304 |
-
}
|
| 305 |
-
body.pdf-capture-mode .titulo-slide5 { font-size: 2.2rem !important; margin-bottom: 12px !important; }
|
| 306 |
-
body.pdf-capture-mode .slide5-desc { font-size: 0.95rem !important; margin-bottom: 18px !important; }
|
| 307 |
-
body.pdf-capture-mode .notas-tecnicas { margin-top: 45px !important; }
|
| 308 |
-
body.pdf-capture-mode .cascada-table { font-size: 0.9rem !important; }
|
| 309 |
-
body.pdf-capture-mode .nota-item { font-size: 0.8rem !important; }
|
| 310 |
-
|
| 311 |
/* ===================== RESPONSIVE ===================== */
|
| 312 |
@media (max-width: 1024px) {
|
| 313 |
.titulo-main { font-size: 6rem; letter-spacing: 15px; }
|
|
@@ -433,6 +418,61 @@
|
|
| 433 |
#btn-pdf { top: 10px; right: 10px; padding: 8px 12px; font-size: 0.75rem; bottom: auto; }
|
| 434 |
}
|
| 435 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 436 |
/* ===================== MODO CAPTURA PDF ===================== */
|
| 437 |
.slide.capture-mode {
|
| 438 |
display: flex !important;
|
|
@@ -710,7 +750,7 @@
|
|
| 710 |
if (e.key === 'ArrowLeft') changeSlide(-1);
|
| 711 |
});
|
| 712 |
|
| 713 |
-
// ===================== GENERADOR DE PDF -
|
| 714 |
async function generatePDF() {
|
| 715 |
const loadingOverlay = document.getElementById('pdf-loading');
|
| 716 |
const progressText = document.getElementById('progress-text');
|
|
@@ -722,11 +762,13 @@
|
|
| 722 |
btnPdf.disabled = true;
|
| 723 |
progressText.textContent = 'Inicializando...';
|
| 724 |
|
| 725 |
-
// 1.
|
| 726 |
-
document.body.classList.add('
|
| 727 |
-
document.body.style.width = '1920px';
|
| 728 |
-
document.body.style.overflow = 'hidden';
|
| 729 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 730 |
slides.forEach(s => s.style.display = 'none');
|
| 731 |
await new Promise(resolve => setTimeout(resolve, 200));
|
| 732 |
|
|
@@ -762,7 +804,6 @@
|
|
| 762 |
}
|
| 763 |
});
|
| 764 |
|
| 765 |
-
// Esperar renderizado desktop
|
| 766 |
await new Promise(resolve => setTimeout(resolve, 1500));
|
| 767 |
|
| 768 |
// Convertir bg a base64
|
|
@@ -781,7 +822,7 @@
|
|
| 781 |
} catch (e) { console.warn("BG conversion failed:", e); }
|
| 782 |
}
|
| 783 |
|
| 784 |
-
// Capturar
|
| 785 |
const canvas = await html2canvas(slide, {
|
| 786 |
scale: 1,
|
| 787 |
useCORS: false,
|
|
@@ -790,7 +831,7 @@
|
|
| 790 |
logging: false,
|
| 791 |
width: 1920,
|
| 792 |
height: 1080,
|
| 793 |
-
windowWidth: 1920, //
|
| 794 |
windowHeight: 1080,
|
| 795 |
scrollX: 0,
|
| 796 |
scrollY: 0,
|
|
@@ -819,11 +860,8 @@
|
|
| 819 |
s.style.display = idx === originalSlide ? 'flex' : 'none';
|
| 820 |
});
|
| 821 |
|
| 822 |
-
//
|
| 823 |
-
document.body.classList.remove('
|
| 824 |
-
document.body.style.width = '';
|
| 825 |
-
document.body.style.overflow = '';
|
| 826 |
-
|
| 827 |
setTimeout(() => location.reload(), 1000);
|
| 828 |
|
| 829 |
} catch (err) {
|
|
@@ -832,10 +870,7 @@
|
|
| 832 |
} finally {
|
| 833 |
loadingOverlay.style.display = 'none';
|
| 834 |
btnPdf.disabled = false;
|
| 835 |
-
|
| 836 |
-
document.body.classList.remove('pdf-capture-mode');
|
| 837 |
-
document.body.style.width = '';
|
| 838 |
-
document.body.style.overflow = '';
|
| 839 |
}
|
| 840 |
}
|
| 841 |
|
|
|
|
| 166 |
.roi-excellent { color: #4ade80; } .roi-good { color: #22c55e; } .roi-ok { color: #fbbf24; } .roi-risk { color: #fb923c; } .roi-low { color: #f87171; }
|
| 167 |
|
| 168 |
.overlay-slide5 { background: linear-gradient(to right, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 55%, rgba(0,0,0,0.0) 100%); }
|
| 169 |
+
|
| 170 |
+
/* ESTILOS DE PANTALLA PARA SLIDE 5 (COMPACTO) */
|
| 171 |
.content-slide5 {
|
| 172 |
position: absolute;
|
| 173 |
top: 20px;
|
|
|
|
| 180 |
}
|
| 181 |
.titulo-slide5 {
|
| 182 |
font-family: 'EB Garamond', serif;
|
| 183 |
+
font-size: 2.2rem; /* Compacto para pantalla */
|
| 184 |
font-weight: 600;
|
| 185 |
letter-spacing: 1px;
|
| 186 |
margin-bottom: 12px;
|
|
|
|
| 202 |
.cascada-table .fase3-row .col-monto { color: #fbbf24; }
|
| 203 |
.notas-tecnicas {
|
| 204 |
background: rgba(0,0,0,0.8); border-left: 3px solid rgba(255,255,255,0.3);
|
| 205 |
+
padding: 15px; margin-top: 45px;
|
| 206 |
}
|
| 207 |
.notas-tecnicas h3 { font-family: 'EB Garamond', serif; font-size: 1.2rem; margin-bottom: 10px; color: #fff; font-weight: 600; }
|
| 208 |
.nota-item { margin-bottom: 12px; font-size: 0.8rem; line-height: 1.5; color: #ccc; }
|
|
|
|
| 293 |
margin-top: 10px;
|
| 294 |
}
|
| 295 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 296 |
/* ===================== RESPONSIVE ===================== */
|
| 297 |
@media (max-width: 1024px) {
|
| 298 |
.titulo-main { font-size: 6rem; letter-spacing: 15px; }
|
|
|
|
| 418 |
#btn-pdf { top: 10px; right: 10px; padding: 8px 12px; font-size: 0.75rem; bottom: auto; }
|
| 419 |
}
|
| 420 |
|
| 421 |
+
/* ===================== MODO CAPTURA PDF (GHOST MODE) ===================== */
|
| 422 |
+
body.generating-pdf {
|
| 423 |
+
width: 1920px !important;
|
| 424 |
+
min-width: 1920px !important;
|
| 425 |
+
overflow: hidden !important;
|
| 426 |
+
}
|
| 427 |
+
body.generating-pdf .slide {
|
| 428 |
+
width: 1920px !important;
|
| 429 |
+
height: 1080px !important;
|
| 430 |
+
}
|
| 431 |
+
|
| 432 |
+
/* Forzar Slide 5 grande en PDF */
|
| 433 |
+
body.generating-pdf .content-slide5 {
|
| 434 |
+
max-height: none !important;
|
| 435 |
+
overflow: visible !important;
|
| 436 |
+
padding-bottom: 0 !important;
|
| 437 |
+
}
|
| 438 |
+
body.generating-pdf .titulo-slide5 {
|
| 439 |
+
font-size: 3.2rem !important; /* Vuelve a ser grande para el PDF */
|
| 440 |
+
margin-bottom: 15px !important;
|
| 441 |
+
}
|
| 442 |
+
body.generating-pdf .slide5-desc {
|
| 443 |
+
font-size: 1.1rem !important;
|
| 444 |
+
margin-bottom: 20px !important;
|
| 445 |
+
}
|
| 446 |
+
body.generating-pdf .notas-tecnicas {
|
| 447 |
+
margin-top: 45px !important;
|
| 448 |
+
}
|
| 449 |
+
|
| 450 |
+
/* Anular Mobile Styles durante captura */
|
| 451 |
+
body.generating-pdf .bottom-controls,
|
| 452 |
+
body.generating-pdf .slide-counter,
|
| 453 |
+
body.generating-pdf .nav,
|
| 454 |
+
body.generating-pdf #btn-pdf {
|
| 455 |
+
display: none !important;
|
| 456 |
+
}
|
| 457 |
+
body.generating-pdf .content-slide5,
|
| 458 |
+
body.generating-pdf .content-slide4,
|
| 459 |
+
body.generating-pdf .content-slide6 {
|
| 460 |
+
max-height: none !important;
|
| 461 |
+
overflow: visible !important;
|
| 462 |
+
width: 65% !important; /* Desktop width */
|
| 463 |
+
top: 40px !important;
|
| 464 |
+
left: 5% !important;
|
| 465 |
+
transform: none !important;
|
| 466 |
+
}
|
| 467 |
+
body.generating-pdf .titulo-slide5,
|
| 468 |
+
body.generating-pdf .titulo-slide4 {
|
| 469 |
+
font-size: 3.2rem !important;
|
| 470 |
+
}
|
| 471 |
+
body.generating-pdf .equipo-container {
|
| 472 |
+
grid-template-columns: 1fr 1fr 1fr !important;
|
| 473 |
+
display: grid !important;
|
| 474 |
+
}
|
| 475 |
+
|
| 476 |
/* ===================== MODO CAPTURA PDF ===================== */
|
| 477 |
.slide.capture-mode {
|
| 478 |
display: flex !important;
|
|
|
|
| 750 |
if (e.key === 'ArrowLeft') changeSlide(-1);
|
| 751 |
});
|
| 752 |
|
| 753 |
+
// ===================== GENERADOR DE PDF - FORZADO DESKTOP =====================
|
| 754 |
async function generatePDF() {
|
| 755 |
const loadingOverlay = document.getElementById('pdf-loading');
|
| 756 |
const progressText = document.getElementById('progress-text');
|
|
|
|
| 762 |
btnPdf.disabled = true;
|
| 763 |
progressText.textContent = 'Inicializando...';
|
| 764 |
|
| 765 |
+
// 1. ACTIVAR MODO GHOST (Fuerza estilos desktop y tamaño de fuente)
|
| 766 |
+
document.body.classList.add('generating-pdf');
|
|
|
|
|
|
|
| 767 |
|
| 768 |
+
// Esperar a que el CSS tome efecto antes de ocultar
|
| 769 |
+
await new Promise(resolve => setTimeout(resolve, 500));
|
| 770 |
+
|
| 771 |
+
// 2. Ocultar slides
|
| 772 |
slides.forEach(s => s.style.display = 'none');
|
| 773 |
await new Promise(resolve => setTimeout(resolve, 200));
|
| 774 |
|
|
|
|
| 804 |
}
|
| 805 |
});
|
| 806 |
|
|
|
|
| 807 |
await new Promise(resolve => setTimeout(resolve, 1500));
|
| 808 |
|
| 809 |
// Convertir bg a base64
|
|
|
|
| 822 |
} catch (e) { console.warn("BG conversion failed:", e); }
|
| 823 |
}
|
| 824 |
|
| 825 |
+
// Capturar
|
| 826 |
const canvas = await html2canvas(slide, {
|
| 827 |
scale: 1,
|
| 828 |
useCORS: false,
|
|
|
|
| 831 |
logging: false,
|
| 832 |
width: 1920,
|
| 833 |
height: 1080,
|
| 834 |
+
windowWidth: 1920, // Fuerza ancho de ventana para evitar media queries de móvil
|
| 835 |
windowHeight: 1080,
|
| 836 |
scrollX: 0,
|
| 837 |
scrollY: 0,
|
|
|
|
| 860 |
s.style.display = idx === originalSlide ? 'flex' : 'none';
|
| 861 |
});
|
| 862 |
|
| 863 |
+
// Desactivar modo ghost
|
| 864 |
+
document.body.classList.remove('generating-pdf');
|
|
|
|
|
|
|
|
|
|
| 865 |
setTimeout(() => location.reload(), 1000);
|
| 866 |
|
| 867 |
} catch (err) {
|
|
|
|
| 870 |
} finally {
|
| 871 |
loadingOverlay.style.display = 'none';
|
| 872 |
btnPdf.disabled = false;
|
| 873 |
+
document.body.classList.remove('generating-pdf');
|
|
|
|
|
|
|
|
|
|
| 874 |
}
|
| 875 |
}
|
| 876 |
|