Spaces:
Running
Running
Update index.html
Browse files- index.html +42 -23
index.html
CHANGED
|
@@ -222,7 +222,7 @@
|
|
| 222 |
background: rgba(0,0,0,0.6); padding: 8px 15px; border-radius: 5px; backdrop-filter: blur(5px);
|
| 223 |
}
|
| 224 |
|
| 225 |
-
/* BOT脫N PDF: ARRIBA DERECHA FIJO */
|
| 226 |
#btn-pdf {
|
| 227 |
position: fixed;
|
| 228 |
top: 30px;
|
|
@@ -233,8 +233,8 @@
|
|
| 233 |
/* LOADING OVERLAY - NEGRO S脫LIDO Y CAPA SUPERIOR ABSOLUTA */
|
| 234 |
#pdf-loading {
|
| 235 |
position: fixed; top: 0; left: 0; width: 100%; height: 100%;
|
| 236 |
-
background: #000000;
|
| 237 |
-
z-index: 99999;
|
| 238 |
display: none;
|
| 239 |
flex-direction: column;
|
| 240 |
justify-content: center;
|
|
@@ -309,10 +309,27 @@
|
|
| 309 |
.nav { bottom: 15px; right: 15px; }
|
| 310 |
.nav button { padding: 12px 18px; font-size: 0.8rem; background: rgba(0,0,0,0.8); }
|
| 311 |
.slide-counter { bottom: 15px; left: 15px; font-size: 0.8rem; background: rgba(0,0,0,0.8); padding: 10px 15px; }
|
| 312 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 313 |
|
| 314 |
.content-slide4::-webkit-scrollbar, .content-slide5::-webkit-scrollbar { width: 4px; }
|
| 315 |
.content-slide4::-webkit-scrollbar-thumb, .content-slide5::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 2px; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 316 |
}
|
| 317 |
|
| 318 |
@media (max-width: 480px) {
|
|
@@ -335,11 +352,26 @@
|
|
| 335 |
.cascada-table { font-size: 0.75rem; }
|
| 336 |
.notas-tecnicas h3 { font-size: 1.1rem; }
|
| 337 |
.nota-item { font-size: 0.75rem; }
|
| 338 |
-
|
| 339 |
.nav { bottom: 10px; right: 10px; gap: 8px; }
|
| 340 |
.nav button { padding: 10px 15px; font-size: 0.75rem; background: rgba(0,0,0,0.85); border: 2px solid rgba(255,255,255,0.6); }
|
| 341 |
.slide-counter { bottom: 10px; left: 10px; font-size: 0.75rem; background: rgba(0,0,0,0.85); padding: 8px 12px; }
|
| 342 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 343 |
}
|
| 344 |
|
| 345 |
@media (max-height: 500px) and (orientation: landscape) {
|
|
@@ -350,6 +382,7 @@
|
|
| 350 |
.nav { bottom: 10px; right: 10px; }
|
| 351 |
.nav button { padding: 8px 12px; font-size: 0.7rem; }
|
| 352 |
.slide-counter { bottom: 10px; left: 10px; font-size: 0.7rem; }
|
|
|
|
| 353 |
}
|
| 354 |
|
| 355 |
/* ===================== MODO CAPTURA PDF ===================== */
|
|
@@ -358,7 +391,7 @@
|
|
| 358 |
opacity: 1 !important;
|
| 359 |
position: fixed !important;
|
| 360 |
top: 0 !important; left: 0 !important;
|
| 361 |
-
z-index: 1 !important;
|
| 362 |
width: 1920px !important;
|
| 363 |
height: 1080px !important;
|
| 364 |
transform: none !important;
|
|
@@ -558,7 +591,7 @@
|
|
| 558 |
<div class="contacto-nombre animate-contact" style="animation-delay: 1.8s;">Contacto</div>
|
| 559 |
|
| 560 |
<div class="contacto-item animate-contact-item">
|
| 561 |
-
<span>
|
| 562 |
<a href="tel:+50248332934">+502 4833 2934</a>
|
| 563 |
</div>
|
| 564 |
|
|
@@ -587,7 +620,7 @@
|
|
| 587 |
<button id="btn-next" onclick="changeSlide(1)">NEXT</button>
|
| 588 |
</div>
|
| 589 |
|
| 590 |
-
<!-- BOT脫N PDF (ARRIBA DERECHA) -->
|
| 591 |
<button id="btn-pdf" onclick="generatePDF()">Descargar en PDF</button>
|
| 592 |
|
| 593 |
<!-- OVERLAY DE CARGA -->
|
|
@@ -634,15 +667,11 @@
|
|
| 634 |
const slides = document.querySelectorAll('.slide');
|
| 635 |
const originalSlide = currentSlide - 1;
|
| 636 |
|
| 637 |
-
// 1. Mostrar overlay INMEDIATAMENTE
|
| 638 |
loadingOverlay.style.display = 'flex';
|
| 639 |
btnPdf.disabled = true;
|
| 640 |
progressText.textContent = 'Inicializando...';
|
| 641 |
|
| 642 |
-
// 2. Ocultar TODAS las slides para que NO se vean detr谩s
|
| 643 |
slides.forEach(s => s.style.display = 'none');
|
| 644 |
-
|
| 645 |
-
// 3. Forzar repaint del navegador ANTES de procesar
|
| 646 |
await new Promise(resolve => setTimeout(resolve, 200));
|
| 647 |
|
| 648 |
try {
|
|
@@ -652,15 +681,12 @@
|
|
| 652 |
for (let i = 0; i < slides.length; i++) {
|
| 653 |
const slide = slides[i];
|
| 654 |
|
| 655 |
-
// Actualizar progreso y permitir repaint
|
| 656 |
progressText.textContent = `Procesando diapositiva ${i + 1} de ${slides.length}...`;
|
| 657 |
await new Promise(resolve => setTimeout(resolve, 50));
|
| 658 |
|
| 659 |
-
// Activar modo captura
|
| 660 |
slide.classList.add('capture-mode');
|
| 661 |
slide.style.display = 'flex';
|
| 662 |
|
| 663 |
-
// Forzar animaciones a estado final
|
| 664 |
const animatedElements = slide.querySelectorAll('[class*="animate-"]');
|
| 665 |
animatedElements.forEach(el => {
|
| 666 |
el.style.animation = 'none';
|
|
@@ -669,7 +695,6 @@
|
|
| 669 |
void el.offsetWidth;
|
| 670 |
});
|
| 671 |
|
| 672 |
-
// Recolectar links
|
| 673 |
const links = [];
|
| 674 |
slide.querySelectorAll('a[href]').forEach(link => {
|
| 675 |
const rect = link.getBoundingClientRect();
|
|
@@ -679,10 +704,8 @@
|
|
| 679 |
}
|
| 680 |
});
|
| 681 |
|
| 682 |
-
// Esperar renderizado
|
| 683 |
await new Promise(resolve => setTimeout(resolve, 1500));
|
| 684 |
|
| 685 |
-
// Convertir bg a base64
|
| 686 |
const bgStyle = window.getComputedStyle(slide).backgroundImage;
|
| 687 |
const urlMatch = bgStyle.match(/url\(["']?(.*?)["']?\)/);
|
| 688 |
if (urlMatch && urlMatch[1]) {
|
|
@@ -698,7 +721,6 @@
|
|
| 698 |
} catch (e) { console.warn("BG conversion failed:", e); }
|
| 699 |
}
|
| 700 |
|
| 701 |
-
// Capturar
|
| 702 |
const canvas = await html2canvas(slide, {
|
| 703 |
scale: 1, useCORS: false, allowTaint: false, backgroundColor: '#050505',
|
| 704 |
logging: false, width: 1920, height: 1080, windowWidth: 1920, windowHeight: 1080,
|
|
@@ -708,12 +730,10 @@
|
|
| 708 |
if (i > 0) pdf.addPage();
|
| 709 |
pdf.addImage(canvas.toDataURL('image/jpeg', 0.95), 'JPEG', 0, 0, 1920, 1080, undefined, 'FAST');
|
| 710 |
|
| 711 |
-
// Agregar links
|
| 712 |
links.forEach(link => {
|
| 713 |
pdf.link(link.x, link.y, link.width, link.height, { url: link.url });
|
| 714 |
});
|
| 715 |
|
| 716 |
-
// Ocultar slide inmediatamente despu茅s de capturar
|
| 717 |
slide.classList.remove('capture-mode');
|
| 718 |
slide.style.display = 'none';
|
| 719 |
}
|
|
@@ -722,7 +742,6 @@
|
|
| 722 |
await new Promise(resolve => setTimeout(resolve, 500));
|
| 723 |
pdf.save('MIGUEL_PitchDeck.pdf');
|
| 724 |
|
| 725 |
-
// Restaurar slide original
|
| 726 |
slides.forEach((s, idx) => {
|
| 727 |
s.style.display = idx === originalSlide ? 'flex' : 'none';
|
| 728 |
});
|
|
|
|
| 222 |
background: rgba(0,0,0,0.6); padding: 8px 15px; border-radius: 5px; backdrop-filter: blur(5px);
|
| 223 |
}
|
| 224 |
|
| 225 |
+
/* BOT脫N PDF: ARRIBA DERECHA FIJO (DESKTOP) */
|
| 226 |
#btn-pdf {
|
| 227 |
position: fixed;
|
| 228 |
top: 30px;
|
|
|
|
| 233 |
/* LOADING OVERLAY - NEGRO S脫LIDO Y CAPA SUPERIOR ABSOLUTA */
|
| 234 |
#pdf-loading {
|
| 235 |
position: fixed; top: 0; left: 0; width: 100%; height: 100%;
|
| 236 |
+
background: #000000;
|
| 237 |
+
z-index: 99999;
|
| 238 |
display: none;
|
| 239 |
flex-direction: column;
|
| 240 |
justify-content: center;
|
|
|
|
| 309 |
.nav { bottom: 15px; right: 15px; }
|
| 310 |
.nav button { padding: 12px 18px; font-size: 0.8rem; background: rgba(0,0,0,0.8); }
|
| 311 |
.slide-counter { bottom: 15px; left: 15px; font-size: 0.8rem; background: rgba(0,0,0,0.8); padding: 10px 15px; }
|
| 312 |
+
|
| 313 |
+
/* M脫VIL: Bot贸n PDF abajo, junto a navegaci贸n */
|
| 314 |
+
#btn-pdf {
|
| 315 |
+
top: auto;
|
| 316 |
+
bottom: 15px;
|
| 317 |
+
right: 160px;
|
| 318 |
+
padding: 10px 15px;
|
| 319 |
+
font-size: 0.8rem;
|
| 320 |
+
}
|
| 321 |
|
| 322 |
.content-slide4::-webkit-scrollbar, .content-slide5::-webkit-scrollbar { width: 4px; }
|
| 323 |
.content-slide4::-webkit-scrollbar-thumb, .content-slide5::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 2px; }
|
| 324 |
+
|
| 325 |
+
/* M脫VIL: Subir cr茅dito de talishte.io para no taparlo */
|
| 326 |
+
.talishte-credit {
|
| 327 |
+
bottom: 130px;
|
| 328 |
+
right: 5%;
|
| 329 |
+
left: 5%;
|
| 330 |
+
text-align: center;
|
| 331 |
+
font-size: 0.8rem;
|
| 332 |
+
}
|
| 333 |
}
|
| 334 |
|
| 335 |
@media (max-width: 480px) {
|
|
|
|
| 352 |
.cascada-table { font-size: 0.75rem; }
|
| 353 |
.notas-tecnicas h3 { font-size: 1.1rem; }
|
| 354 |
.nota-item { font-size: 0.75rem; }
|
| 355 |
+
|
| 356 |
.nav { bottom: 10px; right: 10px; gap: 8px; }
|
| 357 |
.nav button { padding: 10px 15px; font-size: 0.75rem; background: rgba(0,0,0,0.85); border: 2px solid rgba(255,255,255,0.6); }
|
| 358 |
.slide-counter { bottom: 10px; left: 10px; font-size: 0.75rem; background: rgba(0,0,0,0.85); padding: 8px 12px; }
|
| 359 |
+
|
| 360 |
+
/* M脫VIL PEQUE脩O: Ajustar posici贸n bot贸n PDF y cr茅dito */
|
| 361 |
+
#btn-pdf {
|
| 362 |
+
bottom: 10px;
|
| 363 |
+
right: 140px;
|
| 364 |
+
padding: 8px 12px;
|
| 365 |
+
font-size: 0.75rem;
|
| 366 |
+
}
|
| 367 |
+
|
| 368 |
+
.talishte-credit {
|
| 369 |
+
bottom: 110px;
|
| 370 |
+
right: 5%;
|
| 371 |
+
left: 5%;
|
| 372 |
+
text-align: center;
|
| 373 |
+
font-size: 0.7rem;
|
| 374 |
+
}
|
| 375 |
}
|
| 376 |
|
| 377 |
@media (max-height: 500px) and (orientation: landscape) {
|
|
|
|
| 382 |
.nav { bottom: 10px; right: 10px; }
|
| 383 |
.nav button { padding: 8px 12px; font-size: 0.7rem; }
|
| 384 |
.slide-counter { bottom: 10px; left: 10px; font-size: 0.7rem; }
|
| 385 |
+
#btn-pdf { top: 10px; right: 10px; padding: 8px 12px; font-size: 0.75rem; bottom: auto; }
|
| 386 |
}
|
| 387 |
|
| 388 |
/* ===================== MODO CAPTURA PDF ===================== */
|
|
|
|
| 391 |
opacity: 1 !important;
|
| 392 |
position: fixed !important;
|
| 393 |
top: 0 !important; left: 0 !important;
|
| 394 |
+
z-index: 1 !important;
|
| 395 |
width: 1920px !important;
|
| 396 |
height: 1080px !important;
|
| 397 |
transform: none !important;
|
|
|
|
| 591 |
<div class="contacto-nombre animate-contact" style="animation-delay: 1.8s;">Contacto</div>
|
| 592 |
|
| 593 |
<div class="contacto-item animate-contact-item">
|
| 594 |
+
<span></span>
|
| 595 |
<a href="tel:+50248332934">+502 4833 2934</a>
|
| 596 |
</div>
|
| 597 |
|
|
|
|
| 620 |
<button id="btn-next" onclick="changeSlide(1)">NEXT</button>
|
| 621 |
</div>
|
| 622 |
|
| 623 |
+
<!-- BOT脫N PDF (ARRIBA DERECHA EN DESKTOP, ABAJO EN M脫VIL) -->
|
| 624 |
<button id="btn-pdf" onclick="generatePDF()">Descargar en PDF</button>
|
| 625 |
|
| 626 |
<!-- OVERLAY DE CARGA -->
|
|
|
|
| 667 |
const slides = document.querySelectorAll('.slide');
|
| 668 |
const originalSlide = currentSlide - 1;
|
| 669 |
|
|
|
|
| 670 |
loadingOverlay.style.display = 'flex';
|
| 671 |
btnPdf.disabled = true;
|
| 672 |
progressText.textContent = 'Inicializando...';
|
| 673 |
|
|
|
|
| 674 |
slides.forEach(s => s.style.display = 'none');
|
|
|
|
|
|
|
| 675 |
await new Promise(resolve => setTimeout(resolve, 200));
|
| 676 |
|
| 677 |
try {
|
|
|
|
| 681 |
for (let i = 0; i < slides.length; i++) {
|
| 682 |
const slide = slides[i];
|
| 683 |
|
|
|
|
| 684 |
progressText.textContent = `Procesando diapositiva ${i + 1} de ${slides.length}...`;
|
| 685 |
await new Promise(resolve => setTimeout(resolve, 50));
|
| 686 |
|
|
|
|
| 687 |
slide.classList.add('capture-mode');
|
| 688 |
slide.style.display = 'flex';
|
| 689 |
|
|
|
|
| 690 |
const animatedElements = slide.querySelectorAll('[class*="animate-"]');
|
| 691 |
animatedElements.forEach(el => {
|
| 692 |
el.style.animation = 'none';
|
|
|
|
| 695 |
void el.offsetWidth;
|
| 696 |
});
|
| 697 |
|
|
|
|
| 698 |
const links = [];
|
| 699 |
slide.querySelectorAll('a[href]').forEach(link => {
|
| 700 |
const rect = link.getBoundingClientRect();
|
|
|
|
| 704 |
}
|
| 705 |
});
|
| 706 |
|
|
|
|
| 707 |
await new Promise(resolve => setTimeout(resolve, 1500));
|
| 708 |
|
|
|
|
| 709 |
const bgStyle = window.getComputedStyle(slide).backgroundImage;
|
| 710 |
const urlMatch = bgStyle.match(/url\(["']?(.*?)["']?\)/);
|
| 711 |
if (urlMatch && urlMatch[1]) {
|
|
|
|
| 721 |
} catch (e) { console.warn("BG conversion failed:", e); }
|
| 722 |
}
|
| 723 |
|
|
|
|
| 724 |
const canvas = await html2canvas(slide, {
|
| 725 |
scale: 1, useCORS: false, allowTaint: false, backgroundColor: '#050505',
|
| 726 |
logging: false, width: 1920, height: 1080, windowWidth: 1920, windowHeight: 1080,
|
|
|
|
| 730 |
if (i > 0) pdf.addPage();
|
| 731 |
pdf.addImage(canvas.toDataURL('image/jpeg', 0.95), 'JPEG', 0, 0, 1920, 1080, undefined, 'FAST');
|
| 732 |
|
|
|
|
| 733 |
links.forEach(link => {
|
| 734 |
pdf.link(link.x, link.y, link.width, link.height, { url: link.url });
|
| 735 |
});
|
| 736 |
|
|
|
|
| 737 |
slide.classList.remove('capture-mode');
|
| 738 |
slide.style.display = 'none';
|
| 739 |
}
|
|
|
|
| 742 |
await new Promise(resolve => setTimeout(resolve, 500));
|
| 743 |
pdf.save('MIGUEL_PitchDeck.pdf');
|
| 744 |
|
|
|
|
| 745 |
slides.forEach((s, idx) => {
|
| 746 |
s.style.display = idx === originalSlide ? 'flex' : 'none';
|
| 747 |
});
|