restyle code

This commit is contained in:
Jariel Que 2022-08-03 12:53:56 +08:00 committed by GitHub
commit f0759b63ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9747 additions and 8 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +1,56 @@
!function(){"use strict";var e=document.querySelector("#mainNav");if(e){var n=function(){(void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop)>100?e.classList.add("navbar-shrink"):e.classList.remove("navbar-shrink")};n(),document.addEventListener("scroll",n)}document.getElementsByClassName("popup-gallery").length>0&&baguetteBox.run(".popup-gallery",{animation:"slideIn"}),function(){if("requestAnimationFrame"in window&&!/Mobile|Android/.test(navigator.userAgent)){var e=document.querySelectorAll("[data-bss-parallax]");if(e.length){var n,t=[];window.addEventListener("scroll",a),window.addEventListener("resize",a),a()}}function a(){t.length=0;for(var a=0;a<e.length;a++){var r=e[a].getBoundingClientRect(),i=parseFloat(e[a].getAttribute("data-bss-parallax-speed"),10)||.5;r.bottom>0&&r.top<window.innerHeight&&t.push({speed:i,node:e[a]})}cancelAnimationFrame(n),t.length&&(n=requestAnimationFrame(o))}function o(){for(var e=0;e<t.length;e++){var n=t[e].node,a=t[e].speed;n.style.transform="translate3d(0, "+-window.scrollY*a+"px, 0)"}}}()}(); !(function () {
"use strict";
var e = document.querySelector("#mainNav");
if (e) {
var n = function () {
(void 0 !== window.pageYOffset
? window.pageYOffset
: (
document.documentElement ||
document.body.parentNode ||
document.body
).scrollTop) > 100
? e.classList.add("navbar-shrink")
: e.classList.remove("navbar-shrink");
};
n(), document.addEventListener("scroll", n);
}
document.getElementsByClassName("popup-gallery").length > 0 &&
baguetteBox.run(".popup-gallery", { animation: "slideIn" }),
(function () {
if (
"requestAnimationFrame" in window &&
!/Mobile|Android/.test(navigator.userAgent)
) {
var e = document.querySelectorAll("[data-bss-parallax]");
if (e.length) {
var n,
t = [];
window.addEventListener("scroll", a),
window.addEventListener("resize", a),
a();
}
}
function a() {
t.length = 0;
for (var a = 0; a < e.length; a++) {
var r = e[a].getBoundingClientRect(),
i =
parseFloat(e[a].getAttribute("data-bss-parallax-speed"), 10) ||
0.5;
r.bottom > 0 &&
r.top < window.innerHeight &&
t.push({ speed: i, node: e[a] });
}
cancelAnimationFrame(n), t.length && (n = requestAnimationFrame(o));
}
function o() {
for (var e = 0; e < t.length; e++) {
var n = t[e].node,
a = t[e].speed;
n.style.transform =
"translate3d(0, " + -window.scrollY * a + "px, 0)";
}
}
})();
})();