修复移动端目录悬浮球,修复文章页布局,优化画廊
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
---
|
||||
---
|
||||
|
||||
<script is:inline>
|
||||
(function(){
|
||||
var enabled = !document.documentElement.classList.contains("wi-no-animations");
|
||||
if (!enabled) {
|
||||
document.querySelectorAll(".wi-reveal").forEach(function(el) {
|
||||
el.classList.add("wi-revealed");
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!("IntersectionObserver" in window)) {
|
||||
document.querySelectorAll(".wi-reveal").forEach(function(el) {
|
||||
el.classList.add("wi-revealed");
|
||||
});
|
||||
return;
|
||||
}
|
||||
var observer = new IntersectionObserver(function(entries) {
|
||||
entries.forEach(function(entry) {
|
||||
if (entry.isIntersecting) {
|
||||
entry.target.classList.add("wi-revealed");
|
||||
observer.unobserve(entry.target);
|
||||
}
|
||||
});
|
||||
}, { threshold: 0.1, rootMargin: "0px 0px -40px 0px" });
|
||||
document.querySelectorAll(".wi-reveal").forEach(function(el) {
|
||||
observer.observe(el);
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
Reference in New Issue
Block a user