更新网站架构

This commit is contained in:
2026-03-09 16:35:17 +08:00
parent 4cbc52c51b
commit bf0daf987b
180 changed files with 60682 additions and 491 deletions
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
function counterUp(t){"use strict";this.defaults={duration:3e3,prepend:"",append:"%",selector:".countup",start:0,end:100,intvalues:!1,interval:100};var e=this;this.upating=!1,this.intervalID=null,this.props={};for(var r in this.defaults)"undefined"!=typeof r&&(e.props[r]=e.defaults[r],t.hasOwnProperty(r)&&e.props.hasOwnProperty(r)&&(e.props[r]=t[r]));this.domelems=document.querySelectorAll(this.props.selector),this.elems=[];var n={};this.domelems.forEach(function(t){n.obj=t;var r=parseInt(t.getAttribute("cup-start"));isNaN(r)?n.start=e.props.start:n.start=r;var p=parseInt(t.getAttribute("cup-end"));isNaN(p)?n.end=e.props.end:n.end=p;var a=parseInt(t.getAttribute("cup-duration"));isNaN(a)?n.duration=e.props.duration:n.duration=a;var s=t.getAttribute("cup-prepend");null==s?n.prepend=e.props.prepend:n.prepend=s;var i=t.getAttribute("cup-append");null==i?n.append=e.props.append:n.append=i;var o=t.getAttribute("cup-intval");null==o?n.intvalues=e.props.intvalues:n.intvalues=o,n.step=(n.end-n.start)/(n.duration/e.props.interval),n.val=n.start,e.elems.push(n),n={}})}counterUp.prototype.start=function(){"use strict";var t=this;this.intervalID=setInterval(function(){t.updating||t.update()},t.props.interval)},counterUp.prototype.update=function(){"use strict";this.updating=!0;var t=!0;this.elems.forEach(function(e){e.val+=e.step,e.val<e.end?(1==e.intvalues?e.obj.innerHTML=e.prepend+Math.floor(e.val).toString()+e.append:e.obj.innerHTML=e.prepend+(Math.round(100*e.val)/100).toString()+e.append,t=!1):e.obj.innerHTML=e.prepend+e.end.toString()+e.append}),1==t&&clearInterval(this.intervalID),this.updating=!1};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+104
View File
@@ -0,0 +1,104 @@
(function() {
/* ====================
Preloader
======================= */
window.onload = function () {
window.setTimeout(fadeout, 300);
}
function fadeout() {
document.querySelector('.preloader').style.opacity = '0';
document.querySelector('.preloader').style.display = 'none';
}
// =========== sticky menu
window.onscroll = function () {
var header_navbar = document.querySelector(".hero-section-wrapper-5 .header");
var sticky = header_navbar.offsetTop;
if (window.pageYOffset > sticky) {
header_navbar.classList.add("sticky");
} else {
header_navbar.classList.remove("sticky");
}
// show or hide the back-top-top button
var backToTo = document.querySelector(".scroll-top");
if (document.body.scrollTop > 50 || document.documentElement.scrollTop > 50) {
backToTo.style.display = "flex";
} else {
backToTo.style.display = "none";
}
};
// header-6 toggler-icon
let navbarToggler6 = document.querySelector(".header-6 .navbar-toggler");
var navbarCollapse6 = document.querySelector(".header-6 .navbar-collapse");
document.querySelectorAll(".header-6 .page-scroll").forEach(e =>
e.addEventListener("click", () => {
navbarToggler6.classList.remove("active");
navbarCollapse6.classList.remove('show')
})
);
navbarToggler6.addEventListener('click', function() {
navbarToggler6.classList.toggle("active");
})
// section menu active
function onScroll(event) {
var sections = document.querySelectorAll('.page-scroll');
var scrollPos = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
for (var i = 0; i < sections.length; i++) {
var currLink = sections[i];
var val = currLink.getAttribute('href');
var refElement = document.querySelector(val);
var scrollTopMinus = scrollPos + 73;
if (refElement.offsetTop <= scrollTopMinus && (refElement.offsetTop + refElement.offsetHeight > scrollTopMinus)) {
document.querySelector('.page-scroll').classList.remove('active');
currLink.classList.add('active');
} else {
currLink.classList.remove('active');
}
}
};
window.document.addEventListener('scroll', onScroll);
// ===== pricing-style-4 slider
tns({
container: '.pricing-active',
autoplay: false,
mouseDrag: true,
gutter: 0,
nav: false,
controls: true,
controlsText: [
'<i class="lni lni-chevron-left prev"></i>',
'<i class="lni lni-chevron-right prev"></i>',
],
responsive: {
0: {
items: 1,
},
768: {
items: 2,
},
992: {
items: 1.2,
},
1200: {
items: 2,
}
}
});
// WOW active
new WOW().init();
})();
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long