2025-12-19 13:18:34 +08:00
|
|
|
/**
|
|
|
|
|
* 智慧时间轴组件 - 横向展开式
|
|
|
|
|
* Smart Timeline Component - Horizontal Expansion
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
(function() {
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
|
|
document.addEventListener('DOMContentLoaded', initTimeline);
|
|
|
|
|
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
function forEachNode(list, callback) {
|
|
|
|
|
Array.prototype.forEach.call(list, callback);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function supportsSmoothScroll() {
|
|
|
|
|
return 'scrollBehavior' in document.documentElement.style;
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-19 13:18:34 +08:00
|
|
|
function initTimeline() {
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
var container = document.querySelector('.timeline-container');
|
2025-12-19 13:18:34 +08:00
|
|
|
if (!container) return;
|
|
|
|
|
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
var items = container.querySelectorAll('.timeline-item');
|
2025-12-19 13:18:34 +08:00
|
|
|
if (!items.length) return;
|
|
|
|
|
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
var hasIntersectionObserver = 'IntersectionObserver' in window;
|
|
|
|
|
var touchStartX = null;
|
|
|
|
|
var scrollLeft = null;
|
|
|
|
|
var isDragging = false;
|
|
|
|
|
var startX;
|
|
|
|
|
var dragScrollLeft;
|
|
|
|
|
var currentIndex = 0;
|
|
|
|
|
var autoPlayIndex = 0;
|
|
|
|
|
var autoPlayTimer = null;
|
|
|
|
|
var isUserInteracting = false;
|
|
|
|
|
var interactionTimer = null;
|
|
|
|
|
var autoPlayInterval = 3000;
|
|
|
|
|
var pauseAfterInteraction = 5000;
|
|
|
|
|
var observerOptions = {
|
2025-12-19 13:18:34 +08:00
|
|
|
threshold: 0.1,
|
|
|
|
|
rootMargin: '0px 0px -50px 0px'
|
|
|
|
|
};
|
|
|
|
|
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
function updateExpandedState(active) {
|
|
|
|
|
if (active) {
|
|
|
|
|
container.classList.add('has-auto-expanded');
|
|
|
|
|
} else {
|
|
|
|
|
container.classList.remove('has-auto-expanded');
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-12-19 13:18:34 +08:00
|
|
|
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
function clearExpandedItems() {
|
|
|
|
|
forEachNode(items, function(item) {
|
|
|
|
|
item.classList.remove('auto-expanded');
|
|
|
|
|
});
|
|
|
|
|
updateExpandedState(false);
|
|
|
|
|
}
|
2025-12-19 13:18:34 +08:00
|
|
|
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
function animateItems(useDelay) {
|
|
|
|
|
forEachNode(items, function(item, index) {
|
|
|
|
|
var delay = useDelay ? index * 80 : 0;
|
|
|
|
|
setTimeout(function() {
|
2025-12-19 13:18:34 +08:00
|
|
|
item.style.opacity = '1';
|
|
|
|
|
item.style.transform = 'translateY(0)';
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
}, delay);
|
2025-12-19 13:18:34 +08:00
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
forEachNode(items, function(item) {
|
2025-12-19 13:18:34 +08:00
|
|
|
item.style.opacity = '0';
|
|
|
|
|
item.style.transform = 'translateY(20px)';
|
|
|
|
|
item.style.transition = 'opacity 0.5s ease, transform 0.5s ease, flex 0.5s cubic-bezier(0.25, 0.1, 0.25, 1), background 0.5s ease';
|
|
|
|
|
});
|
|
|
|
|
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
if (hasIntersectionObserver) {
|
|
|
|
|
var observer = new IntersectionObserver(function(entries) {
|
|
|
|
|
for (var entryIndex = 0; entryIndex < entries.length; entryIndex += 1) {
|
|
|
|
|
if (entries[entryIndex].isIntersecting) {
|
|
|
|
|
animateItems(true);
|
|
|
|
|
observer.unobserve(entries[entryIndex].target);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, observerOptions);
|
2025-12-19 13:18:34 +08:00
|
|
|
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
observer.observe(container);
|
|
|
|
|
} else {
|
|
|
|
|
animateItems(false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
container.addEventListener('touchstart', function(e) {
|
2025-12-19 13:18:34 +08:00
|
|
|
touchStartX = e.touches[0].pageX;
|
|
|
|
|
scrollLeft = container.scrollLeft;
|
|
|
|
|
}, { passive: true });
|
|
|
|
|
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
container.addEventListener('touchmove', function(e) {
|
2025-12-19 13:18:34 +08:00
|
|
|
if (!touchStartX) return;
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
var x = e.touches[0].pageX;
|
|
|
|
|
var walk = (touchStartX - x) * 1.5;
|
2025-12-19 13:18:34 +08:00
|
|
|
container.scrollLeft = scrollLeft + walk;
|
|
|
|
|
}, { passive: true });
|
|
|
|
|
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
container.addEventListener('touchend', function() {
|
2025-12-19 13:18:34 +08:00
|
|
|
touchStartX = null;
|
|
|
|
|
});
|
|
|
|
|
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
container.addEventListener('wheel', function(e) {
|
2025-12-19 13:18:34 +08:00
|
|
|
if (container.scrollWidth > container.clientWidth) {
|
|
|
|
|
if (Math.abs(e.deltaX) < Math.abs(e.deltaY)) {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
container.scrollLeft += e.deltaY;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, { passive: false });
|
|
|
|
|
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
container.addEventListener('mousedown', function(e) {
|
2025-12-19 13:18:34 +08:00
|
|
|
if (container.scrollWidth <= container.clientWidth) return;
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
if (e.target.closest && e.target.closest('.timeline-item')) return;
|
2025-12-19 13:18:34 +08:00
|
|
|
isDragging = true;
|
|
|
|
|
container.style.cursor = 'grabbing';
|
|
|
|
|
startX = e.pageX - container.offsetLeft;
|
|
|
|
|
dragScrollLeft = container.scrollLeft;
|
|
|
|
|
});
|
|
|
|
|
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
container.addEventListener('mouseleave', function() {
|
2025-12-19 13:18:34 +08:00
|
|
|
isDragging = false;
|
|
|
|
|
container.style.cursor = '';
|
|
|
|
|
});
|
|
|
|
|
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
container.addEventListener('mouseup', function() {
|
2025-12-19 13:18:34 +08:00
|
|
|
isDragging = false;
|
|
|
|
|
container.style.cursor = '';
|
|
|
|
|
});
|
|
|
|
|
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
container.addEventListener('mousemove', function(e) {
|
2025-12-19 13:18:34 +08:00
|
|
|
if (!isDragging) return;
|
|
|
|
|
e.preventDefault();
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
var x = e.pageX - container.offsetLeft;
|
|
|
|
|
var walk = (x - startX) * 2;
|
2025-12-19 13:18:34 +08:00
|
|
|
container.scrollLeft = dragScrollLeft - walk;
|
|
|
|
|
});
|
|
|
|
|
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
forEachNode(items, function(item) {
|
|
|
|
|
item.addEventListener('click', function() {
|
|
|
|
|
var dot = item.querySelector('.dot');
|
2025-12-19 13:18:34 +08:00
|
|
|
if (dot) {
|
|
|
|
|
dot.style.transform = 'translate(-50%, -50%) scale(2)';
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
setTimeout(function() {
|
2025-12-19 13:18:34 +08:00
|
|
|
dot.style.transform = '';
|
|
|
|
|
}, 200);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
document.addEventListener('keydown', function(e) {
|
2025-12-19 13:18:34 +08:00
|
|
|
if (!isElementInViewport(container)) return;
|
|
|
|
|
|
|
|
|
|
if (e.key === 'ArrowLeft') {
|
|
|
|
|
currentIndex = Math.max(0, currentIndex - 1);
|
|
|
|
|
scrollToItem(currentIndex);
|
|
|
|
|
} else if (e.key === 'ArrowRight') {
|
|
|
|
|
currentIndex = Math.min(items.length - 1, currentIndex + 1);
|
|
|
|
|
scrollToItem(currentIndex);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function scrollToItem(index) {
|
|
|
|
|
if (container.scrollWidth <= container.clientWidth) return;
|
|
|
|
|
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
var item = items[index];
|
2025-12-19 13:18:34 +08:00
|
|
|
if (!item) return;
|
|
|
|
|
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
var containerRect = container.getBoundingClientRect();
|
|
|
|
|
var itemRect = item.getBoundingClientRect();
|
|
|
|
|
var targetScrollLeft = container.scrollLeft + (itemRect.left - containerRect.left) - (containerRect.width / 2) + (itemRect.width / 2);
|
2025-12-19 13:18:34 +08:00
|
|
|
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
if (typeof container.scrollTo === 'function' && supportsSmoothScroll()) {
|
|
|
|
|
container.scrollTo({
|
|
|
|
|
left: targetScrollLeft,
|
|
|
|
|
behavior: 'smooth'
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
2025-12-19 13:18:34 +08:00
|
|
|
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
container.scrollLeft = targetScrollLeft;
|
2025-12-19 13:18:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function expandItem(index) {
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
clearExpandedItems();
|
2025-12-19 13:18:34 +08:00
|
|
|
if (items[index]) {
|
|
|
|
|
items[index].classList.add('auto-expanded');
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
updateExpandedState(true);
|
2025-12-19 13:18:34 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function autoPlay() {
|
|
|
|
|
if (isUserInteracting) return;
|
|
|
|
|
|
|
|
|
|
expandItem(autoPlayIndex);
|
|
|
|
|
autoPlayIndex = (autoPlayIndex + 1) % items.length;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function startAutoPlay() {
|
|
|
|
|
if (autoPlayTimer) return;
|
|
|
|
|
autoPlayTimer = setInterval(autoPlay, autoPlayInterval);
|
|
|
|
|
autoPlay();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function stopAutoPlay() {
|
|
|
|
|
if (autoPlayTimer) {
|
|
|
|
|
clearInterval(autoPlayTimer);
|
|
|
|
|
autoPlayTimer = null;
|
|
|
|
|
}
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
clearExpandedItems();
|
2025-12-19 13:18:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function pauseAutoPlay() {
|
|
|
|
|
isUserInteracting = true;
|
|
|
|
|
stopAutoPlay();
|
|
|
|
|
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
if (interactionTimer) {
|
|
|
|
|
clearTimeout(interactionTimer);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
interactionTimer = setTimeout(function() {
|
2025-12-19 13:18:34 +08:00
|
|
|
isUserInteracting = false;
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
if (hasIntersectionObserver && isElementInViewport(container)) {
|
2025-12-19 13:18:34 +08:00
|
|
|
startAutoPlay();
|
|
|
|
|
}
|
|
|
|
|
}, pauseAfterInteraction);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
container.addEventListener('mouseenter', pauseAutoPlay);
|
|
|
|
|
container.addEventListener('touchstart', pauseAutoPlay, { passive: true });
|
|
|
|
|
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
if (hasIntersectionObserver) {
|
|
|
|
|
var autoPlayObserver = new IntersectionObserver(function(entries) {
|
|
|
|
|
for (var entryIndex = 0; entryIndex < entries.length; entryIndex += 1) {
|
|
|
|
|
if (entries[entryIndex].isIntersecting && !isUserInteracting) {
|
|
|
|
|
startAutoPlay();
|
|
|
|
|
} else {
|
|
|
|
|
stopAutoPlay();
|
|
|
|
|
}
|
2025-12-19 13:18:34 +08:00
|
|
|
}
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
}, { threshold: 0.3 });
|
2025-12-19 13:18:34 +08:00
|
|
|
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
autoPlayObserver.observe(container);
|
|
|
|
|
}
|
2025-12-19 13:18:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function isElementInViewport(el) {
|
Refactor and enhance various HTML pages with updated links, improved styles, and optimized JavaScript functionality
- Updated badge styles in culture.html for better visual consistency and added backdrop-filter support.
- Introduced a fallback panel for the map in index.html with enhanced styles and responsive design.
- Changed links in product_ecommerce_freight_booking.html, product_full_logistics_chain_cargo_agent.html, product_full_logistics_chain_platform.html, product_full_logistics_chain_ship_agent.html, product_port_cdi_container.html, product_shipping_boat.html, product_shipping_company.html to point to new URLs with query parameters.
- Improved scroll reveal functionality in solution_inland_river_shipping.html, solution_logistics_chain.html, solution_port_supply_chain.html, and solution_supply_chain.html by replacing forEach with a traditional for loop for better performance.
2026-04-20 15:59:09 +08:00
|
|
|
var rect = el.getBoundingClientRect();
|
2025-12-19 13:18:34 +08:00
|
|
|
return (
|
|
|
|
|
rect.top < window.innerHeight &&
|
|
|
|
|
rect.bottom > 0
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
})();
|