21 lines
810 B
JavaScript
21 lines
810 B
JavaScript
document.currentScript.insertAdjacentHTML('afterend', Array.from({ length: 48 }, (_, i) => {
|
|
const greens = ['rgba(25,112,97,.8)', 'rgba(34,145,120,.6)', 'rgba(16,80,65,.9)', 'rgba(45,160,130,.5)'];
|
|
return `<div class="dm-cell" style="background:${greens[i % 4]}"></div>`;
|
|
}).join(''));
|
|
|
|
/* FAQ toggle */
|
|
function toggleFaq(btn) {
|
|
btn.parentElement.classList.toggle('open');
|
|
}
|
|
|
|
/* Scroll reveal */
|
|
const revealEls = document.querySelectorAll('.reveal');
|
|
const io = new IntersectionObserver((entries) => {
|
|
entries.forEach(e => {
|
|
if (e.isIntersecting) {
|
|
e.target.classList.add('visible');
|
|
io.unobserve(e.target);
|
|
}
|
|
});
|
|
}, { threshold: 0.12 });
|
|
revealEls.forEach(el => io.observe(el)); |