mirror of
https://github.com/wahyd4/links.git
synced 2026-08-08 21:04:53 +10:00
Fix issue of ui
This commit is contained in:
@@ -438,7 +438,7 @@
|
||||
</section>
|
||||
|
||||
<!-- ============ Link Library ============ -->
|
||||
<section class="apple-card home-section reveal" aria-labelledby="links-heading">
|
||||
<section class="apple-card home-section" aria-labelledby="links-heading">
|
||||
<div class="library-header">
|
||||
<div class="library-title-group">
|
||||
<h2 id="links-heading" class="section-title">{% trans "Link List" %}</h2>
|
||||
@@ -695,6 +695,11 @@
|
||||
if (reducedMotion || !('IntersectionObserver' in window)) {
|
||||
revealEls.forEach(el => el.classList.add('in-view'));
|
||||
} else {
|
||||
// threshold: 0 fires as soon as any part of the target intersects the
|
||||
// root, regardless of the target's own size. Using a ratio-based
|
||||
// threshold (e.g. 0.08) breaks for tall elements (like a long table)
|
||||
// whose intersection ratio can never reach that fraction even when
|
||||
// most of it is on screen, leaving it permanently hidden.
|
||||
const observer = new IntersectionObserver((entries) => {
|
||||
entries.forEach(entry => {
|
||||
if (entry.isIntersecting) {
|
||||
@@ -702,7 +707,7 @@
|
||||
observer.unobserve(entry.target);
|
||||
}
|
||||
});
|
||||
}, { threshold: 0.08, rootMargin: '0px 0px -6% 0px' });
|
||||
}, { threshold: 0, rootMargin: '0px 0px -6% 0px' });
|
||||
revealEls.forEach(el => observer.observe(el));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user