update
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
window.COURSE_CONFIG = {
|
||||
COURSE_CONFIG_URL: 'config.json',
|
||||
DEBUG: true,
|
||||
DEBUG: false,
|
||||
SHOW_PAGINATION: false, // Bandera para mostrar/ocultar paginación
|
||||
SHOW_TITLE: false, // Bandera para mostrar/ocultar título
|
||||
SHOW_GLOSSARY: false, // Bandera para mostrar/ocultar glosario
|
||||
@@ -166,6 +166,22 @@ function animateOnScroll(selector, animationClass, options = {}) {
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
setupGlossaryListeners();
|
||||
|
||||
// Inicializar sal.js
|
||||
if (typeof sal !== 'undefined' && document.querySelectorAll('[data-sal]').length > 0) {
|
||||
setTimeout(() => {
|
||||
document.querySelectorAll('[data-sal]').forEach((el) => (el.style.visibility = 'visible'));
|
||||
sal({
|
||||
once: false,
|
||||
threshold: 0.3,
|
||||
duration: 10000,
|
||||
easing: 'cubic-bezier(0.25, 0.46, 0.45, 0.94)',
|
||||
distance: '100px',
|
||||
opacity: 0.2,
|
||||
scale: 0.85,
|
||||
});
|
||||
}, 200);
|
||||
}
|
||||
|
||||
/**
|
||||
* Evento antes de cambiar de slide.
|
||||
* @event beforeSlideChange
|
||||
@@ -188,6 +204,22 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
if (e.detail && typeof e.detail.slideIndex === 'number' && Array.isArray(e.detail.contentArray)) {
|
||||
console.log(e.detail.contentArray[e.detail.slideIndex].content);
|
||||
|
||||
// Inicializar sal.js si hay elementos con data-sal
|
||||
if (typeof sal !== 'undefined' && document.querySelectorAll('[data-sal]').length > 0) {
|
||||
setTimeout(() => {
|
||||
document.querySelectorAll('[data-sal]').forEach((el) => (el.style.visibility = 'visible'));
|
||||
sal({
|
||||
once: false,
|
||||
threshold: 0.3,
|
||||
duration: 10000,
|
||||
easing: 'cubic-bezier(0.25, 0.46, 0.45, 0.94)',
|
||||
distance: '100px',
|
||||
opacity: 0.2,
|
||||
scale: 0.85,
|
||||
});
|
||||
}, 200);
|
||||
}
|
||||
|
||||
// Paginación
|
||||
const paginationEl = document.getElementById('pagination');
|
||||
const paginacionScoEl = document.querySelector('.paginacion_sco');
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -377,7 +377,7 @@ var CourseNav = (function (COURSE_CONFIG) {
|
||||
|
||||
const link = document.createElement("a");
|
||||
link.classList.add("coursenav-link");
|
||||
link.textContent = item.title;
|
||||
link.innerHTML = item.title;
|
||||
|
||||
const idx = courseData.contentArray.findIndex((c) => c.content === item.content && c.title === item.title);
|
||||
link.dataset.coursenavindex = idx;
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -0,0 +1,2 @@
|
||||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.sal=t():e.sal=t()}(this,(function(){return(()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}e.d(t,{default:()=>j});var a="Sal was not initialised! Probably it is used in SSR.",s="Your browser does not support IntersectionObserver!\nGet a polyfill from here:\nhttps://github.com/w3c/IntersectionObserver/tree/master/polyfill",i={root:null,rootMargin:"0% 50%",threshold:.5,animateClassName:"sal-animate",disabledClassName:"sal-disabled",enterEventName:"sal:in",exitEventName:"sal:out",selector:"[data-sal]",once:!0,disabled:!1},l=[],c=null,u=function(e){e&&e!==i&&(i=r(r({},i),e))},d=function(e){e.classList.remove(i.animateClassName)},f=function(e,t){var n=new CustomEvent(e,{bubbles:!0,detail:t});t.target.dispatchEvent(n)},b=function(){document.body.classList.add(i.disabledClassName)},p=function(){c.disconnect(),c=null},m=function(){return i.disabled||"function"==typeof i.disabled&&i.disabled()},v=function(e,t){e.forEach((function(e){var n=e.target,r=void 0!==n.dataset.salRepeat,o=void 0!==n.dataset.salOnce,a=r||!(o||i.once);e.intersectionRatio>=i.threshold?(function(e){e.target.classList.add(i.animateClassName),f(i.enterEventName,e)}(e),a||t.unobserve(n)):a&&function(e){d(e.target),f(i.exitEventName,e)}(e)}))},y=function(){var e=[].filter.call(document.querySelectorAll(i.selector),(function(e){return!function(e){return e.classList.contains(i.animateClassName)}(e,i.animateClassName)}));return e.forEach((function(e){return c.observe(e)})),e},O=function(){b(),p()},h=function(){document.body.classList.remove(i.disabledClassName),c=new IntersectionObserver(v,{root:i.root,rootMargin:i.rootMargin,threshold:i.threshold}),l=y()},g=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p(),Array.from(document.querySelectorAll(i.selector)).forEach(d),u(e),h()},w=function(){var e=y();l.push(e)};const j=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;if(u(e),"undefined"==typeof window)return console.warn(a),{elements:l,disable:O,enable:h,reset:g,update:w};if(!window.IntersectionObserver)throw b(),Error(s);return m()?b():h(),{elements:l,disable:O,enable:h,reset:g,update:w}};return t.default})()}));
|
||||
//# sourceMappingURL=sal.js.map
|
||||
Reference in New Issue
Block a user