From 630c9f962817dbf11bcdbfe6b0a42dd32d81c15f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Torben=20B=C3=B6hnke?= <torben.boehnke-makerspace@rub.de>
Date: Mon, 9 Sep 2024 15:21:47 +0200
Subject: [PATCH] update autoswitch

---
 docs/info_monitor_autoswitch.html   | 16 ++++++++--------
 public/info_monitor_autoswitch.html | 16 ++++++++--------
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/docs/info_monitor_autoswitch.html b/docs/info_monitor_autoswitch.html
index b4474ccb2..9ab254da1 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 b4474ccb2..9ab254da1 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
-- 
GitLab