diff --git a/docs/info_monitor_autoswitch.html b/docs/info_monitor_autoswitch.html index b4474ccb2036519f9db7bd26cf4914ac779911f4..9ab254da14e468dd6528385c45a6fe65872c291f 100644 --- a/docs/info_monitor_autoswitch.html +++ b/docs/info_monitor_autoswitch.html @@ -174,9 +174,9 @@ var page2 = document.getElementById('page2'); var page3 = document.getElementById('page3'); - // Initialize pages correctly - page1.style.display = 'block'; - page1.style.opacity = 1; + // Start with page 2 visible initially + page2.style.display = 'block'; + page2.style.opacity = 1; function switchPage(currentPage, nextPage) { nextPage.style.display = 'block'; // Ensure next page is ready to fade in @@ -192,17 +192,17 @@ }, 1100); // Set this to slightly longer than the CSS transition to ensure it completes } - // Function to cycle through the pages + // Function to cycle through the pages according to the new order function cyclePages() { - setTimeout(function () { switchPage(page1, page2); }, 12000); // Page 1 to 2 after 12 seconds - setTimeout(function () { switchPage(page2, page3); }, 18000); // Page 2 to 3 after 6 seconds + setTimeout(function () { switchPage(page2, page1); }, 6000); // Page 2 to 1 after 6 seconds + setTimeout(function () { switchPage(page1, page3); }, 18000); // Page 1 to 3 after 12 seconds setTimeout(function () { switchPage(page3, page1); }, 24000); // Page 3 to 1 after 6 seconds } cyclePages(); // Start the cycle - setInterval(cyclePages, 24000); // Repeat every 24 seconds (12s + 6s + 6s) + setInterval(cyclePages, 30000); // Repeat every 30 seconds (6s + 12s + 6s + 6s from the second cycle of page 1) }); </script> -</body> + </body> </html> \ No newline at end of file diff --git a/public/info_monitor_autoswitch.html b/public/info_monitor_autoswitch.html index b4474ccb2036519f9db7bd26cf4914ac779911f4..9ab254da14e468dd6528385c45a6fe65872c291f 100644 --- a/public/info_monitor_autoswitch.html +++ b/public/info_monitor_autoswitch.html @@ -174,9 +174,9 @@ var page2 = document.getElementById('page2'); var page3 = document.getElementById('page3'); - // Initialize pages correctly - page1.style.display = 'block'; - page1.style.opacity = 1; + // Start with page 2 visible initially + page2.style.display = 'block'; + page2.style.opacity = 1; function switchPage(currentPage, nextPage) { nextPage.style.display = 'block'; // Ensure next page is ready to fade in @@ -192,17 +192,17 @@ }, 1100); // Set this to slightly longer than the CSS transition to ensure it completes } - // Function to cycle through the pages + // Function to cycle through the pages according to the new order function cyclePages() { - setTimeout(function () { switchPage(page1, page2); }, 12000); // Page 1 to 2 after 12 seconds - setTimeout(function () { switchPage(page2, page3); }, 18000); // Page 2 to 3 after 6 seconds + setTimeout(function () { switchPage(page2, page1); }, 6000); // Page 2 to 1 after 6 seconds + setTimeout(function () { switchPage(page1, page3); }, 18000); // Page 1 to 3 after 12 seconds setTimeout(function () { switchPage(page3, page1); }, 24000); // Page 3 to 1 after 6 seconds } cyclePages(); // Start the cycle - setInterval(cyclePages, 24000); // Repeat every 24 seconds (12s + 6s + 6s) + setInterval(cyclePages, 30000); // Repeat every 30 seconds (6s + 12s + 6s + 6s from the second cycle of page 1) }); </script> -</body> + </body> </html> \ No newline at end of file