New style and added ContextWizard pages
This commit is contained in:
@@ -34,3 +34,28 @@ function getI18NText(i18n_map, key){
|
||||
|
||||
return msg
|
||||
}
|
||||
|
||||
function initRevealAnimations(){
|
||||
const animated = document.querySelectorAll('.reveal, [data-animate]');
|
||||
if(!animated || animated.length === 0){
|
||||
return;
|
||||
}
|
||||
if(!('IntersectionObserver' in globalThis)){
|
||||
for (const el of animated) {
|
||||
el.classList.add('is-visible');
|
||||
}
|
||||
return;
|
||||
}
|
||||
const observer = new IntersectionObserver(function(entries){
|
||||
for (const entry of entries) {
|
||||
if(entry.isIntersecting){
|
||||
entry.target.classList.add('is-visible');
|
||||
observer.unobserve(entry.target);
|
||||
}
|
||||
}
|
||||
}, {threshold: 0.18});
|
||||
for (const el of animated) {
|
||||
el.classList.add('reveal');
|
||||
observer.observe(el);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user