1
0
mirror of https://github.com/tabler/tabler.git synced 2025-12-21 17:34:25 +04:00

Refactor SCSS imports, remove compile warnings (#2536)

This commit is contained in:
Paweł Kuna
2025-11-17 21:25:16 +01:00
committed by GitHub
parent 3bcd82ae9f
commit 14ed4693a5
123 changed files with 3937 additions and 1516 deletions

View File

@@ -1,23 +1,25 @@
const elements = document.querySelectorAll('[data-countup]');
const elements = document.querySelectorAll('[data-countup]')
if (elements.length) {
elements.forEach(function (element) {
let options = {};
try {
const dataOptions = element.getAttribute('data-countup') ? JSON.parse(element.getAttribute('data-countup')) : {};
options = Object.assign({
'enableScrollSpy': true
}, dataOptions);
} catch (error) {}
elements.forEach(function (element) {
let options = {}
try {
const dataOptions = element.getAttribute('data-countup') ? JSON.parse(element.getAttribute('data-countup')) : {}
options = Object.assign(
{
enableScrollSpy: true,
},
dataOptions,
)
} catch (error) {}
const value = parseInt(element.innerHTML, 10);
const value = parseInt(element.innerHTML, 10)
if (window.countUp && window.countUp.CountUp) {
const countUp = new window.countUp.CountUp(element, value, options);
if (!countUp.error) {
countUp.start();
}
}
});
if (window.countUp && window.countUp.CountUp) {
const countUp = new window.countUp.CountUp(element, value, options)
if (!countUp.error) {
countUp.start()
}
}
})
}