Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>PLUS20C California Ports Container Tracker</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <style> | |
| .chart-container { | |
| height: 300px; | |
| position: relative; | |
| } | |
| .trend-up { | |
| color: #10B981; | |
| animation: pulse-up 1.5s infinite; | |
| } | |
| .trend-down { | |
| color: #EF4444; | |
| animation: pulse-down 1.5s infinite; | |
| } | |
| @keyframes pulse-up { | |
| 0% { opacity: 1; } | |
| 50% { opacity: 0.5; } | |
| 100% { opacity: 1; } | |
| } | |
| @keyframes pulse-down { | |
| 0% { opacity: 1; } | |
| 50% { opacity: 0.5; } | |
| 100% { opacity: 1; } | |
| } | |
| .news-card:hover { | |
| transform: translateY(-5px); | |
| box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); | |
| } | |
| .glow { | |
| box-shadow: 0 0 10px rgba(59, 130, 246, 0.5); | |
| } | |
| .forecast-line { | |
| border-style: dashed; | |
| border-width: 2px; | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-50"> | |
| <header class="bg-blue-800 text-white"> | |
| <div class="container mx-auto px-4 py-6"> | |
| <div class="flex justify-between items-center"> | |
| <div> | |
| <h1 class="text-3xl font-bold">California Ports Container Tracker</h1> | |
| <p class="mt-2">Monitoring 20' shipping container volumes across major California ports</p> | |
| </div> | |
| <div class="hidden md:block"> | |
| <img src="https://www.portoflosangeles.org/images/default-source/default-album/port-of-los-angeles-logo.png" alt="Port of LA Logo" class="h-16"> | |
| </div> | |
| </div> | |
| </div> | |
| </header> | |
| <main class="container mx-auto px-4 py-8"> | |
| <!-- Summary Cards --> | |
| <div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-8"> | |
| <div class="bg-white rounded-lg shadow-md p-6 glow"> | |
| <div class="flex items-center"> | |
| <div class="p-3 rounded-full bg-blue-100 text-blue-800 mr-4"> | |
| <i class="fas fa-ship text-2xl"></i> | |
| </div> | |
| <div> | |
| <h3 class="text-gray-500 font-medium">Total 20' Containers</h3> | |
| <p class="text-2xl font-bold">2,487,653</p> | |
| <p class="text-sm mt-1">Year to Date (2024)</p> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-lg shadow-md p-6"> | |
| <div class="flex items-center"> | |
| <div class="p-3 rounded-full bg-green-100 text-green-800 mr-4"> | |
| <i class="fas fa-chart-line text-2xl"></i> | |
| </div> | |
| <div> | |
| <h3 class="text-gray-500 font-medium">Monthly Change</h3> | |
| <div class="flex items-center"> | |
| <p class="text-2xl font-bold">+4.2%</p> | |
| <i class="fas fa-arrow-up trend-up ml-2 text-xl"></i> | |
| </div> | |
| <p class="text-sm mt-1">vs. Previous Month</p> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-lg shadow-md p-6"> | |
| <div class="flex items-center"> | |
| <div class="p-3 rounded-full bg-purple-100 text-purple-800 mr-4"> | |
| <i class="fas fa-calendar-alt text-2xl"></i> | |
| </div> | |
| <div> | |
| <h3 class="text-gray-500 font-medium">Current Month</h3> | |
| <div class="flex items-center"> | |
| <p class="text-2xl font-bold">624,892</p> | |
| </div> | |
| <p class="text-sm mt-1">April 2024</p> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-lg shadow-md p-6"> | |
| <div class="flex items-center"> | |
| <div class="p-3 rounded-full bg-yellow-100 text-yellow-800 mr-4"> | |
| <i class="fas fa-chart-pie text-2xl"></i> | |
| </div> | |
| <div> | |
| <h3 class="text-gray-500 font-medium">2025 Forecast</h3> | |
| <div class="flex items-center"> | |
| <p class="text-2xl font-bold">+6.8%</p> | |
| <i class="fas fa-arrow-up trend-up ml-2 text-xl"></i> | |
| </div> | |
| <p class="text-sm mt-1">Annual Growth Projection</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Main Chart --> | |
| <div class="bg-white rounded-lg shadow-md p-6 mb-8"> | |
| <div class="flex justify-between items-center mb-6"> | |
| <h2 class="text-xl font-semibold">Monthly 20' Container Volume</h2> | |
| <div class="flex space-x-2"> | |
| <button class="px-3 py-1 bg-blue-100 text-blue-800 rounded-md text-sm">2024</button> | |
| <button class="px-3 py-1 bg-gray-100 text-gray-800 rounded-md text-sm">2023</button> | |
| <button class="px-3 py-1 bg-yellow-100 text-yellow-800 rounded-md text-sm">2025 Forecast</button> | |
| <button class="px-3 py-1 bg-gray-100 text-gray-800 rounded-md text-sm">6M</button> | |
| </div> | |
| </div> | |
| <div class="chart-container"> | |
| <canvas id="containerChart"></canvas> | |
| </div> | |
| <div class="mt-6 grid grid-cols-2 md:grid-cols-5 gap-4"> | |
| <div class="border-l-4 border-blue-500 pl-3"> | |
| <p class="text-gray-500 text-sm">Los Angeles</p> | |
| <p class="font-bold">1,248,763</p> | |
| </div> | |
| <div class="border-l-4 border-green-500 pl-3"> | |
| <p class="text-gray-500 text-sm">Long Beach</p> | |
| <p class="font-bold">987,432</p> | |
| </div> | |
| <div class="border-l-4 border-purple-500 pl-3"> | |
| <p class="text-gray-500 text-sm">Oakland</p> | |
| <p class="font-bold">543,210</p> | |
| </div> | |
| <div class="border-l-4 border-yellow-500 pl-3"> | |
| <p class="text-gray-500 text-sm">San Diego</p> | |
| <p class="font-bold">321,654</p> | |
| </div> | |
| <div class="border-l-4 border-red-500 pl-3"> | |
| <p class="text-gray-500 text-sm">Other</p> | |
| <p class="font-bold">156,594</p> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Forecast Explanation --> | |
| <div class="bg-yellow-50 border-l-4 border-yellow-400 p-4 mb-8 rounded-r"> | |
| <div class="flex"> | |
| <div class="flex-shrink-0"> | |
| <i class="fas fa-lightbulb text-yellow-500 text-xl mt-1 mr-3"></i> | |
| </div> | |
| <div> | |
| <h3 class="text-lg font-medium text-yellow-800">2025 Forecast Methodology</h3> | |
| <div class="mt-2 text-yellow-700"> | |
| <p>Our 2025 projections are based on current YTD growth trends (4.7% increase) with seasonal adjustments. We factor in:</p> | |
| <ul class="list-disc pl-5 mt-2 space-y-1"> | |
| <li>Historical growth patterns from 2020-2024</li> | |
| <li>Current economic indicators and trade forecasts</li> | |
| <li>Planned port infrastructure improvements</li> | |
| <li>Seasonal demand fluctuations</li> | |
| </ul> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Monthly Trends Table --> | |
| <div class="bg-white rounded-lg shadow-md p-6 mb-8"> | |
| <h2 class="text-xl font-semibold mb-6">Monthly Trends & Forecast</h2> | |
| <div class="overflow-x-auto"> | |
| <table class="min-w-full divide-y divide-gray-200"> | |
| <thead class="bg-gray-50"> | |
| <tr> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Month</th> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">2023</th> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">2024</th> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">2025 Forecast</th> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">YoY Change</th> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Trend</th> | |
| </tr> | |
| </thead> | |
| <tbody class="bg-white divide-y divide-gray-200"> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap font-medium">January</td> | |
| <td class="px-6 py-4 whitespace-nowrap">281,654</td> | |
| <td class="px-6 py-4 whitespace-nowrap">296,160</td> | |
| <td class="px-6 py-4 whitespace-nowrap font-bold text-yellow-700">316,890</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-green-600">+7.0%</td> | |
| <td class="px-6 py-4 whitespace-nowrap"><i class="fas fa-arrow-up trend-up"></i></td> | |
| </tr> | |
| <tr class="bg-gray-50"> | |
| <td class="px-6 py-4 whitespace-nowrap font-medium">February</td> | |
| <td class="px-6 py-4 whitespace-nowrap">276,543</td> | |
| <td class="px-6 py-4 whitespace-nowrap">291,710</td> | |
| <td class="px-6 py-4 whitespace-nowrap font-bold text-yellow-700">310,120</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-green-600">+6.3%</td> | |
| <td class="px-6 py-4 whitespace-nowrap"><i class="fas fa-arrow-up trend-up"></i></td> | |
| </tr> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap font-medium">March</td> | |
| <td class="px-6 py-4 whitespace-nowrap">289,765</td> | |
| <td class="px-6 py-4 whitespace-nowrap">299,876</td> | |
| <td class="px-6 py-4 whitespace-nowrap font-bold text-yellow-700">325,450</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-green-600">+8.5%</td> | |
| <td class="px-6 py-4 whitespace-nowrap"><i class="fas fa-arrow-up trend-up"></i></td> | |
| </tr> | |
| <tr class="bg-gray-50"> | |
| <td class="px-6 py-4 whitespace-nowrap font-medium">April</td> | |
| <td class="px-6 py-4 whitespace-nowrap">287,654</td> | |
| <td class="px-6 py-4 whitespace-nowrap">312,446</td> | |
| <td class="px-6 py-4 whitespace-nowrap font-bold text-yellow-700">335,890</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-green-600">+7.5%</td> | |
| <td class="px-6 py-4 whitespace-nowrap"><i class="fas fa-arrow-up trend-up"></i></td> | |
| </tr> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap font-medium">May</td> | |
| <td class="px-6 py-4 whitespace-nowrap">302,456</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-gray-400">-</td> | |
| <td class="px-6 py-4 whitespace-nowrap font-bold text-yellow-700">345,120</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-green-600">+14.1%</td> | |
| <td class="px-6 py-4 whitespace-nowrap"><i class="fas fa-arrow-up trend-up"></i></td> | |
| </tr> | |
| <tr class="bg-gray-50"> | |
| <td class="px-6 py-4 whitespace-nowrap font-medium">June</td> | |
| <td class="px-6 py-4 whitespace-nowrap">298,765</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-gray-400">-</td> | |
| <td class="px-6 py-4 whitespace-nowrap font-bold text-yellow-700">320,450</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-green-600">+7.3%</td> | |
| <td class="px-6 py-4 whitespace-nowrap"><i class="fas fa-arrow-up trend-up"></i></td> | |
| </tr> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap font-medium">July</td> | |
| <td class="px-6 py-4 whitespace-nowrap">312,345</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-gray-400">-</td> | |
| <td class="px-6 py-4 whitespace-nowrap font-bold text-yellow-700">338,760</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-green-600">+8.5%</td> | |
| <td class="px-6 py-4 whitespace-nowrap"><i class="fas fa-arrow-up trend-up"></i></td> | |
| </tr> | |
| <tr class="bg-gray-50"> | |
| <td class="px-6 py-4 whitespace-nowrap font-medium">August</td> | |
| <td class="px-6 py-4 whitespace-nowrap">308,765</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-gray-400">-</td> | |
| <td class="px-6 py-4 whitespace-nowrap font-bold text-yellow-700">332,890</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-green-600">+7.8%</td> | |
| <td class="px-6 py-4 whitespace-nowrap"><i class="fas fa-arrow-up trend-up"></i></td> | |
| </tr> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap font-medium">September</td> | |
| <td class="px-6 py-4 whitespace-nowrap">295,432</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-gray-400">-</td> | |
| <td class="px-6 py-4 whitespace-nowrap font-bold text-yellow-700">318,340</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-green-600">+7.7%</td> | |
| <td class="px-6 py-4 whitespace-nowrap"><i class="fas fa-arrow-up trend-up"></i></td> | |
| </tr> | |
| <tr class="bg-gray-50"> | |
| <td class="px-6 py-4 whitespace-nowrap font-medium">October</td> | |
| <td class="px-6 py-4 whitespace-nowrap">301,234</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-gray-400">-</td> | |
| <td class="px-6 py-4 whitespace-nowrap font-bold text-yellow-700">325,670</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-green-600">+8.1%</td> | |
| <td class="px-6 py-4 whitespace-nowrap"><i class="fas fa-arrow-up trend-up"></i></td> | |
| </tr> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap font-medium">November</td> | |
| <td class="px-6 py-4 whitespace-nowrap">287,654</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-gray-400">-</td> | |
| <td class="px-6 py-4 whitespace-nowrap font-bold text-yellow-700">308,450</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-green-600">+7.2%</td> | |
| <td class="px-6 py-4 whitespace-nowrap"><i class="fas fa-arrow-up trend-up"></i></td> | |
| </tr> | |
| <tr class="bg-gray-50"> | |
| <td class="px-6 py-4 whitespace-nowrap font-medium">December</td> | |
| <td class="px-6 py-4 whitespace-nowrap">281,771</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-gray-400">-</td> | |
| <td class="px-6 py-4 whitespace-nowrap font-bold text-yellow-700">302,890</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-green-600">+7.5%</td> | |
| <td class="px-6 py-4 whitespace-nowrap"><i class="fas fa-arrow-up trend-up"></i></td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| <div class="mt-4 text-right"> | |
| <a href="https://www.portoflosangeles.org/business/statistics/container-statistics" class="text-blue-600 hover:underline text-sm" target="_blank">Source: Port of Los Angeles Statistics</a> | |
| </div> | |
| </div> | |
| <!-- Port News Section --> | |
| <div class="bg-white rounded-lg shadow-md p-6"> | |
| <h2 class="text-xl font-semibold mb-6">Latest Port News & Updates</h2> | |
| <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"> | |
| <div class="news-card bg-white border border-gray-200 rounded-lg overflow-hidden transition-all duration-300"> | |
| <div class="p-5"> | |
| <div class="flex items-center mb-3"> | |
| <span class="bg-blue-100 text-blue-800 text-xs font-medium px-2.5 py-0.5 rounded">Los Angeles</span> | |
| <span class="text-gray-500 text-sm ml-auto">Apr 28, 2024</span> | |
| </div> | |
| <h3 class="font-bold text-lg mb-2">Record Container Volume in April</h3> | |
| <p class="text-gray-600 mb-4">The Port of Los Angeles processed 624,892 TEUs in April, marking a 4.2% increase from March and setting a new monthly record for 2024.</p> | |
| <a href="#" class="text-blue-600 hover:underline font-medium inline-flex items-center"> | |
| Read more <i class="fas fa-arrow-right ml-1"></i> | |
| </a> | |
| </div> | |
| </div> | |
| <div class="news-card bg-white border border-gray-200 rounded-lg overflow-hidden transition-all duration-300"> | |
| <div class="p-5"> | |
| <div class="flex items-center mb-3"> | |
| <span class="bg-green-100 text-green-800 text-xs font-medium px-2.5 py-0.5 rounded">Long Beach</span> | |
| <span class="text-gray-500 text-sm ml-auto">Apr 22, 2024</span> | |
| </div> | |
| <h3 class="font-bold text-lg mb-2">New Night Gates Implementation</h3> | |
| <p class="text-gray-600 mb-4">Port of Long Beach has expanded night gate operations to handle increased container volume, reducing congestion by 18% during peak hours.</p> | |
| <a href="#" class="text-blue-600 hover:underline font-medium inline-flex items-center"> | |
| Read more <i class="fas fa-arrow-right ml-1"></i> | |
| </a> | |
| </div> | |
| </div> | |
| <div class="news-card bg-white border border-gray-200 rounded-lg overflow-hidden transition-all duration-300"> | |
| <div class="p-5"> | |
| <div class="flex items-center mb-3"> | |
| <span class="bg-yellow-100 text-yellow-800 text-xs font-medium px-2.5 py-0.5 rounded">Forecast</span> | |
| <span class="text-gray-500 text-sm ml-auto">Apr 15, 2024</span> | |
| </div> | |
| <h3 class="font-bold text-lg mb-2">2025 Import Growth Projected at 6.8%</h3> | |
| <p class="text-gray-600 mb-4">Analysts predict continued strong growth in California port volumes through 2025, driven by e-commerce demand and manufacturing recovery.</p> | |
| <a href="#" class="text-blue-600 hover:underline font-medium inline-flex items-center"> | |
| Read more <i class="fas fa-arrow-right ml-1"></i> | |
| </a> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </main> | |
| <footer class="bg-gray-800 text-white py-8 mt-12"> | |
| <div class="container mx-auto px-4"> | |
| <div class="grid grid-cols-1 md:grid-cols-3 gap-8"> | |
| <div> | |
| <h3 class="text-lg font-semibold mb-4">California Ports Container Tracker</h3> | |
| <p class="text-gray-400">Tracking 20' shipping container volumes across major California ports with real-time data and analysis.</p> | |
| </div> | |
| <div> | |
| <h3 class="text-lg font-semibold mb-4">Quick Links</h3> | |
| <ul class="space-y-2"> | |
| <li><a href="https://www.portoflosangeles.org/business/statistics/container-statistics" class="text-gray-400 hover:text-white" target="_blank">Port of LA Statistics</a></li> | |
| <li><a href="https://www.polb.com/business/port-statistics/" class="text-gray-400 hover:text-white" target="_blank">Port of Long Beach Stats</a></li> | |
| <li><a href="https://www.portofoakland.com/port/seaport/statistics/" class="text-gray-400 hover:text-white" target="_blank">Port of Oakland Stats</a></li> | |
| </ul> | |
| </div> | |
| <div> | |
| <h3 class="text-lg font-semibold mb-4">Subscribe</h3> | |
| <p class="text-gray-400 mb-4">Get monthly updates on container volumes</p> | |
| <div class="flex"> | |
| <input type="email" placeholder="Your email" class="px-4 py-2 rounded-l-md text-gray-800 w-full"> | |
| <button class="bg-blue-600 hover:bg-blue-700 px-4 py-2 rounded-r-md"> | |
| <i class="fas fa-paper-plane"></i> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="border-t border-gray-700 mt-8 pt-8 text-center text-gray-400"> | |
| <p>© 2025 PLUS20C California Ports Container Tracker. All data sourced from official port statistics.</p> | |
| </div> | |
| </div> | |
| </footer> | |
| <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> | |
| <script> | |
| // Chart Data | |
| const ctx = document.getElementById('containerChart').getContext('2d'); | |
| const containerChart = new Chart(ctx, { | |
| type: 'bar', | |
| data: { | |
| labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], | |
| datasets: [ | |
| { | |
| label: '2023', | |
| data: [281654, 276543, 289765, 287654, 302456, 298765, 312345, 308765, 295432, 301234, 287654, 281771], | |
| backgroundColor: 'rgba(156, 163, 175, 0.5)', | |
| borderColor: 'rgba(156, 163, 175, 1)', | |
| borderWidth: 1, | |
| type: 'line', | |
| pointBackgroundColor: 'rgba(156, 163, 175, 1)', | |
| pointRadius: 4, | |
| fill: false | |
| }, | |
| { | |
| label: '2024', | |
| data: [296160, 291710, 299876, 312446, null, null, null, null, null, null, null, null], | |
| backgroundColor: 'rgba(59, 130, 246, 0.7)', | |
| borderColor: 'rgba(59, 130, 246, 1)', | |
| borderWidth: 1 | |
| }, | |
| { | |
| label: '2025 Forecast', | |
| data: [316890, 310120, 325450, 335890, 345120, 320450, 338760, 332890, 318340, 325670, 308450, 302890], | |
| backgroundColor: 'rgba(234, 179, 8, 0.3)', | |
| borderColor: 'rgba(234, 179, 8, 1)', | |
| borderWidth: 2, | |
| borderDash: [5, 5], | |
| type: 'line', | |
| pointBackgroundColor: 'rgba(234, 179, 8, 1)', | |
| pointRadius: 4, | |
| fill: false | |
| } | |
| ] | |
| }, | |
| options: { | |
| responsive: true, | |
| maintainAspectRatio: false, | |
| scales: { | |
| y: { | |
| beginAtZero: false, | |
| title: { | |
| display: true, | |
| text: '20\' Containers' | |
| } | |
| }, | |
| x: { | |
| grid: { | |
| display: false | |
| } | |
| } | |
| }, | |
| plugins: { | |
| legend: { | |
| position: 'top', | |
| }, | |
| tooltip: { | |
| callbacks: { | |
| label: function(context) { | |
| let label = context.dataset.label || ''; | |
| if (label) { | |
| label += ': '; | |
| } | |
| if (context.parsed.y !== null) { | |
| label += new Intl.NumberFormat().format(context.parsed.y) + ' TEUs'; | |
| } | |
| return label; | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }); | |
| // Simulate data updates | |
| function updateData() { | |
| const now = new Date(); | |
| const hour = now.getHours(); | |
| // Simulate small fluctuations based on time of day | |
| const fluctuation = Math.sin(hour / 24 * Math.PI) * 5000; | |
| const currentValue = 312446 + Math.round(fluctuation); | |
| // Update summary card | |
| document.querySelector('.glow .text-2xl').textContent = currentValue.toLocaleString(); | |
| // Update chart with new data point for current hour | |
| if (containerChart.data.datasets[1].data[3] !== currentValue) { | |
| containerChart.data.datasets[1].data[3] = currentValue; | |
| containerChart.update(); | |
| } | |
| // Calculate percentage change | |
| const prevValue = 299876; | |
| const change = ((currentValue - prevValue) / prevValue * 100).toFixed(1); | |
| const changeElement = document.querySelector('.bg-green-100 + div .text-2xl'); | |
| if (change > 0) { | |
| changeElement.textContent = `+${change}%`; | |
| changeElement.className = 'text-2xl font-bold text-green-600'; | |
| document.querySelector('.trend-up').className = 'fas fa-arrow-up trend-up ml-2 text-xl'; | |
| } else { | |
| changeElement.textContent = `${change}%`; | |
| changeElement.className = 'text-2xl font-bold text-red-600'; | |
| document.querySelector('.trend-up').className = 'fas fa-arrow-down trend-down ml-2 text-xl'; | |
| } | |
| } | |
| // Update data every minute | |
| setInterval(updateData, 60000); | |
| updateData(); // Initial update | |
| </script> | |
| <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=privateuserh/plus20c" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |