diff --git a/css/dark-style.css b/css/dark-style.css index 5315df6c7..a14f85309 100644 --- a/css/dark-style.css +++ b/css/dark-style.css @@ -469,17 +469,30 @@ footer { flex: 1 1 300px; } -/* Animation Classes */ -.fade-in { +/* Animation Classes - Updated for better compatibility */ +.fade-in, .slide-up { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; + will-change: opacity, transform; /* Performance hint for browser */ } .slide-up { - opacity: 0; - transform: translateY(40px); - transition: opacity 0.8s ease-out, transform 0.8s ease-out; + transform: translateY(40px); /* More pronounced effect */ +} + +.fade-in.animated, .slide-up.animated { + opacity: 1; + transform: translateY(0); +} + +/* Always show animations on mobile devices to avoid issues */ +@media (max-width: 768px) { + .fade-in, .slide-up { + opacity: 1; + transform: translateY(0); + transition: none; + } } /* Responsive Design */ diff --git a/index.html b/index.html index 6bf42d9ed..14cb0e55c 100644 --- a/index.html +++ b/index.html @@ -84,37 +84,37 @@

Ombi transforms how you manage your media server with these essential features:

-
+

User Management

Connect to your Plex or Emby server and automatically sync users, giving them a personalized request experience.

-
+

Smart Search

Powerful search capabilities to find TV shows and movies across multiple providers with rich metadata.

-
+

Automation

Seamless integration with Sonarr, Radarr, CouchPotato, SickRage, and more to automatically fulfill requests.

-
+

Notifications

Customizable notifications through various channels to keep users updated on their requests.

-
+

Request Approval

Optional approval system for admins to manage and control what content gets added to your server.

-
+

Mobile Apps

Native mobile applications for iOS and Android for on-the-go request management.

@@ -224,6 +224,18 @@ + + diff --git a/js/javascript.js b/js/javascript.js index 6b80348f3..7e8911437 100644 --- a/js/javascript.js +++ b/js/javascript.js @@ -60,7 +60,7 @@ $(document).ready(function() { // showCounter: false // }); - // Scroll animations for elements with animation classes + // Improved scroll animations for elements with animation classes function revealOnScroll() { var scrolled = $(window).scrollTop(); var windowHeight = $(window).height(); @@ -69,20 +69,29 @@ $(document).ready(function() { var $this = $(this); var offsetTop = $this.offset().top; - if (scrolled + windowHeight - 100 > offsetTop) { - $this.css({ - 'opacity': 1, - 'transform': 'translateY(0)' - }); + // Trigger animation when element is 200px from entering viewport + if (scrolled + windowHeight > offsetTop - 200) { + $this.addClass('animated'); } }); } - // Run once on page load + // Run once immediately to show elements above the fold + revealOnScroll(); + + // Run again after a short delay to catch all elements setTimeout(revealOnScroll, 100); - // Run on scroll - $(window).on('scroll', revealOnScroll); + // Run on scroll with throttling for performance + var scrollThrottleTimeout; + $(window).on('scroll', function() { + if (!scrollThrottleTimeout) { + scrollThrottleTimeout = setTimeout(function() { + revealOnScroll(); + scrollThrottleTimeout = null; + }, 50); + } + }); // Navbar scroll effect $(window).scroll(function() {