diff --git a/shopfloor-dashboard/index.html b/shopfloor-dashboard/index.html index 5940de7..6e5b119 100644 --- a/shopfloor-dashboard/index.html +++ b/shopfloor-dashboard/index.html @@ -383,6 +383,42 @@ font-style: italic; } + /* Upcoming events carousel */ + .upcoming-carousel-container { + position: relative; + overflow: hidden; + min-height: 200px; + } + + .upcoming-carousel-wrapper { + position: relative; + width: 100%; + } + + .event-card.upcoming.carousel-item { + position: absolute; + width: 100%; + top: 0; + left: 0; + transition: transform 0.8s ease-in-out, opacity 0.8s ease-in-out; + } + + .event-card.upcoming.carousel-item.active { + transform: translateY(0); + opacity: 1; + position: relative; + } + + .event-card.upcoming.carousel-item.exit-up { + transform: translateY(-100%); + opacity: 0; + } + + .event-card.upcoming.carousel-item.enter-down { + transform: translateY(100%); + opacity: 0; + } + /* ============================================ */ /* RESPONSIVE SIZING FOR LOW-RES DISPLAYS (720p) */ /* ============================================ */ @@ -656,6 +692,9 @@ let clockInterval; let selectedBusinessUnit = ''; let businessUnitsLoaded = false; + let upcomingEvents = []; + let currentUpcomingIndex = 0; + let upcomingCarouselInterval = null; // Get business unit from URL parameter function getBusinessUnitFromURL() { @@ -795,7 +834,7 @@ html += ''; // Close section } - // Upcoming Events - show all in grid layout + // Upcoming Events - carousel with slide-up transition if (data.upcoming && data.upcoming.length > 0) { // Sort upcoming events by type priority, then by date const typePriority = { @@ -820,24 +859,26 @@ return dateA - dateB; }); + // Store for carousel + upcomingEvents = sortedUpcoming; + html += '
'; html += '
UPCOMING (Next 72 Hours)
'; + html += '