File size: 27,400 Bytes
43beaef | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Global Port Health Dashboard</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">
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: '#0056b3',
secondary: '#003366',
dark: '#1a1a2e',
light: '#f8f9fa'
}
}
}
}
</script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
body {
font-family: 'Inter', sans-serif;
background-color: #f8f9fa;
}
.chat-container {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
border: 1px solid #e0e0e0;
}
.message-bubble {
max-width: 80%;
animation: fadeIn 0.3s ease-in-out;
border-radius: 8px;
}
.user-bubble {
background-color: #0056b3;
color: white;
}
.bot-bubble {
background-color: #ffffff;
border: 1px solid #e0e0e0;
color: #333;
}
.typing-indicator {
display: flex;
justify-content: center;
padding: 8px;
}
.typing-dot {
width: 8px;
height: 8px;
margin: 0 3px;
background-color: #94a3b8;
border-radius: 50%;
display: inline-block;
animation: typing 1.4s infinite ease-in-out;
}
.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
0%, 60%, 100% { transform: translateY(0); }
30% { transform: translateY(-5px); }
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
.send-btn {
transition: all 0.2s ease;
}
.send-btn:hover {
transform: translateY(-2px);
box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3), 0 2px 4px -1px rgba(99, 102, 241, 0.1);
}
</style>
</head>
<body class="min-h-screen bg-gray-50">
<div class="container mx-auto p-4">
<div class="flex flex-col lg:flex-row gap-6">
<!-- Main Dashboard -->
<div class="flex-1">
<div class="bg-white shadow rounded-lg p-6">
<div class="flex justify-between items-center mb-6">
<h2 class="text-2xl font-bold text-gray-800">Global Port Health Monitor</h2>
<div class="relative">
<input
type="text"
placeholder="Search ports..."
class="pl-10 pr-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
>
<i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
</div>
</div>
<!-- Health Overview Cards -->
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6">
<div class="bg-green-50 p-4 rounded-lg border border-green-100">
<div class="flex items-center">
<div class="w-12 h-12 bg-green-100 rounded-full flex items-center justify-center mr-3">
<i class="fas fa-check-circle text-green-600 text-xl"></i>
</div>
<div>
<p class="text-gray-500">Operational</p>
<p class="text-2xl font-bold">287</p>
</div>
</div>
</div>
<div class="bg-yellow-50 p-4 rounded-lg border border-yellow-100">
<div class="flex items-center">
<div class="w-12 h-12 bg-yellow-100 rounded-full flex items-center justify-center mr-3">
<i class="fas fa-exclamation-triangle text-yellow-500 text-xl"></i>
</div>
<div>
<p class="text-gray-500">Under Inspection</p>
<p class="text-2xl font-bold">43</p>
</div>
</div>
</div>
<div class="bg-red-50 p-4 rounded-lg border border-red-100">
<div class="flex items-center">
<div class="w-12 h-12 bg-red-100 rounded-full flex items-center justify-center mr-3">
<i class="fas fa-times-circle text-red-600 text-xl"></i>
</div>
<div>
<p class="text-gray-500">Restricted</p>
<p class="text-2xl font-bold">19</p>
</div>
</div>
</div>
</div>
<!-- Supply Chain Dashboard -->
<div class="bg-white p-6 rounded-lg border mb-6">
<h3 class="text-xl font-semibold mb-4 text-gray-800">Major Global Supply Chains</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<!-- Route 1 -->
<div class="border rounded-lg p-4 hover:bg-gray-50">
<div class="flex justify-between items-start mb-2">
<h4 class="font-medium text-blue-700">Asia-Europe Trade Lane</h4>
<span class="bg-green-100 text-green-800 text-xs px-2 py-1 rounded-full">Operational</span>
</div>
<div class="flex items-center justify-between text-sm text-gray-600">
<div class="flex items-center">
<i class="fas fa-ship mr-1 text-blue-500"></i>
<span>Shanghai →</span>
</div>
<div class="flex items-center">
<i class="fas fa-ship mr-1 text-blue-500"></i>
<span>Singapore →</span>
</div>
<div class="flex items-center">
<i class="fas fa-ship mr-1 text-blue-500"></i>
<span>Hamburg</span>
</div>
</div>
<p class="mt-3 text-sm text-gray-500">Current status: All ports operational, no delays</p>
</div>
<!-- Route 2 -->
<div class="border rounded-lg p-4 hover:bg-gray-50">
<div class="flex justify-between items-start mb-2">
<h4 class="font-medium text-blue-700">Trans-Pacific Route</h4>
<span class="bg-yellow-100 text-yellow-800 text-xs px-2 py-1 rounded-full">Monitoring</span>
</div>
<div class="flex items-center justify-between text-sm text-gray-600">
<div class="flex items-center">
<i class="fas fa-ship mr-1 text-blue-500"></i>
<span>Los Angeles →</span>
</div>
<div class="flex items-center">
<i class="fas fa-ship mr-1 text-blue-500"></i>
<span>Yokohama →</span>
</div>
<div class="flex items-center">
<i class="fas fa-ship mr-1 text-blue-500"></i>
<span>Busan</span>
</div>
</div>
<p class="mt-3 text-sm text-gray-500">Potential delays: LA port experiencing 12hr delays</p>
</div>
<!-- More routes would go here -->
</div>
<div class="mt-4 flex justify-between items-center">
<p class="text-sm text-gray-500">Last updated: May 25, 2023</p>
<button class="text-blue-600 text-sm font-medium hover:text-blue-800">
<i class="fas fa-plus-circle mr-1"></i> View all trade routes
</button>
</div>
</div>
<!-- Port Table -->
<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">Port Name</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Location</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Last Inspection</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<!-- Example port data rows -->
<tr class="hover:bg-gray-50">
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center mr-3">
<i class="fas fa-anchor text-blue-600"></i>
</div>
<div>
<p class="font-medium">Port of Shanghai</p>
<p class="text-sm text-gray-500">China</p>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<p>31.23°N, 121.47°E</p>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-3 py-1 rounded-full text-xs font-semibold bg-green-100 text-green-800">Operational</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-gray-500">
May 12, 2023
</td>
</tr>
<tr class="hover:bg-gray-50">
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center mr-3">
<i class="fas fa-anchor text-blue-600"></i>
</div>
<div>
<p class="font-medium">Port of Los Angeles</p>
<p class="text-sm text-gray-500">USA</p>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<p>33.72°N, 118.26°W</p>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-3 py-1 rounded-full text-xs font-semibold bg-yellow-100 text-yellow-800">Under Inspection</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-gray-500">
April 28, 2023
</td>
</tr>
<tr class="hover:bg-gray-50">
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center mr-3">
<i class="fas fa-anchor text-blue-600"></i>
</div>
<div>
<p class="font-medium">Port of Hamburg</p>
<p class="text-sm text-gray-500">Germany</p>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<p>53.54°N, 9.98°E</p>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-3 py-1 rounded-full text-xs font-semibold bg-red-100 text-red-800">Restricted</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-gray-500">
March 15, 2023
</td>
</tr>
<!-- Add the rest of your port data here -->
</tbody>
</table>
</div>
</div>
</div>
<!-- Chat Assistant Sidebar -->
<div class="lg:w-96">
<div class="h-[80vh] flex flex-col bg-white rounded-lg shadow-lg overflow-hidden">
<!-- Header -->
<div class="bg-blue-800 p-4 text-white">
<div class="flex items-center">
<div class="w-10 h-10 rounded-full bg-white/10 flex items-center justify-center mr-3">
<i class="fas fa-robot text-xl"></i>
</div>
<div>
<h1 class="text-xl font-bold">Port Health Assistant</h1>
<p class="text-xs opacity-80">Powered by IMO & WHO Data</p>
</div>
<div class="ml-auto flex space-x-2">
<button class="w-8 h-8 rounded-full bg-white/10 flex items-center justify-center hover:bg-white/20">
<i class="fas fa-question-circle"></i>
</button>
</div>
</div>
</div>
<!-- Chat Messages -->
<div id="chat-messages" class="flex-1 overflow-y-auto p-4 bg-gray-50">
<!-- Welcome message -->
<div class="message-bubble bot-bubble p-4 mb-4">
<div class="flex items-start">
<div class="w-8 h-8 rounded-full bg-blue-800 flex items-center justify-center mr-3 flex-shrink-0">
<i class="fas fa-robot text-white"></i>
</div>
<div>
<p class="font-medium text-gray-800">Welcome to the Port Health Assistant</p>
<p class="mt-1 text-gray-700">I can help you understand port health statuses and supply chain implications. Ask me about any port's current status, inspection reports, or regulations.</p>
<div class="mt-3 flex flex-wrap gap-2">
<span class="px-2 py-1 bg-gray-100 rounded text-xs text-gray-600 border border-gray-200">Try: Status of Shanghai Port</span>
<span class="px-2 py-1 bg-gray-100 rounded text-xs text-gray-600 border border-gray-200">Try: Import restrictions in USA</span>
<span class="px-2 py-1 bg-gray-100 rounded text-xs text-gray-600 border border-gray-200">Try: What does restricted mean?</span>
</div>
</div>
</div>
</div>
<!-- Example messages -->
<div class="message-bubble user-bubble p-4 mb-4 ml-auto text-white">
<div class="flex items-start">
<div class="ml-3">
<p>Hi there! What can you help me with?</p>
</div>
<div class="w-8 h-8 rounded-full bg-white/20 flex items-center justify-center ml-3 flex-shrink-0">
<i class="fas fa-user"></i>
</div>
</div>
</div>
<div class="message-bubble bot-bubble p-4 mb-4">
<div class="flex items-start">
<div class="w-8 h-8 rounded-full bg-primary flex items-center justify-center mr-3 flex-shrink-0">
<i class="fas fa-robot text-white"></i>
</div>
<div>
<p class="font-medium text-gray-800">I can assist with many things!</p>
<p class="mt-1 text-gray-700">Here are some examples:</p>
<ul class="mt-2 text-gray-700 list-disc list-inside space-y-1">
<li>Answering general knowledge questions</li>
<li>Helping with writing and editing</li>
<li>Providing explanations on various topics</li>
<li>Generating creative ideas</li>
<li>And much more!</li>
</ul>
</div>
</div>
</div>
</div>
<!-- Typing indicator (hidden by default) -->
<div id="typing-indicator" class="typing-indicator hidden">
<div class="flex items-center bg-gray-100 px-4 py-2 rounded-full">
<div class="typing-dot"></div>
<div class="typing-dot"></div>
<div class="typing-dot"></div>
<span class="ml-2 text-sm text-gray-500">Assistant is typing...</span>
</div>
</div>
<!-- Input Area -->
<div class="p-4 border-t border-gray-200 bg-white">
<div class="flex items-center">
<div class="flex-1 relative">
<input
id="message-input"
type="text"
placeholder="Ask about economic data or policy insights..."
class="w-full py-3 px-4 bg-gray-100 rounded focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500"
>
</div>
<button id="send-btn" class="send-btn w-12 h-12 rounded bg-blue-800 flex items-center justify-center ml-3 text-white hover:bg-blue-900">
<i class="fas fa-paper-plane"></i>
</button>
</div>
<div class="mt-2 flex justify-center text-xs text-gray-500">
<span>This service provides general information only. For official reports, visit imo.org or who.int</span>
</div>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const chatMessages = document.getElementById('chat-messages');
const messageInput = document.getElementById('message-input');
const sendBtn = document.getElementById('send-btn');
const typingIndicator = document.getElementById('typing-indicator');
// Function to add a message to the chat
function addMessage(message, isUser = false) {
const messageDiv = document.createElement('div');
messageDiv.classList.add('message-bubble', 'p-4', 'mb-4');
if (isUser) {
messageDiv.classList.add('user-bubble', 'ml-auto', 'text-white');
messageDiv.innerHTML = `
<div class="flex items-start">
<div class="ml-3">
<p>${message}</p>
</div>
<div class="w-8 h-8 rounded-full bg-white/20 flex items-center justify-center ml-3 flex-shrink-0">
<i class="fas fa-user"></i>
</div>
</div>
`;
} else {
messageDiv.classList.add('bot-bubble');
messageDiv.innerHTML = `
<div class="flex items-start">
<div class="w-8 h-8 rounded-full bg-primary flex items-center justify-center mr-3 flex-shrink-0">
<i class="fas fa-robot text-white"></i>
</div>
<div>
<p class="text-gray-700">${message}</p>
</div>
</div>
`;
}
chatMessages.appendChild(messageDiv);
// Scroll to the bottom
chatMessages.scrollTop = chatMessages.scrollHeight;
}
// Function to simulate bot response
function botResponse(userMessage) {
// Show typing indicator
typingIndicator.classList.remove('hidden');
chatMessages.scrollTop = chatMessages.scrollHeight;
// Simulate thinking time
setTimeout(() => {
typingIndicator.classList.add('hidden');
// Simple responses based on user input
let response;
userMessage = userMessage.toLowerCase();
if (userMessage.includes('hello') || userMessage.includes('hi') || userMessage.includes('hey')) {
response = "Hello there! How can I assist you today?";
} else if (userMessage.includes('how are you')) {
response = "I'm just a bot, but I'm functioning perfectly! How can I help you?";
} else if (userMessage.includes('thank')) {
response = "You're welcome! Is there anything else I can help with?";
} else if (userMessage.includes('joke')) {
response = "Why don't scientists trust atoms?<br>Because they make up everything! 😄";
} else if (userMessage.includes('name')) {
response = "I'm your friendly AI assistant! You can call me whatever you like.";
} else if (userMessage.includes('weather')) {
response = "I don't have access to real-time weather data, but I can help you find weather information if you tell me your location!";
} else if (userMessage.includes('help')) {
response = "I can help with answering questions, providing information, generating ideas, explaining concepts, and much more! What do you need assistance with?";
} else {
// Default response
response = "Thanks for your message! I'm an AI assistant designed to help with various tasks. How can I assist you today?";
}
addMessage(response, false);
}, 1500);
}
// Send message function
function sendMessage() {
const message = messageInput.value.trim();
if (message) {
addMessage(message, true);
messageInput.value = '';
botResponse(message);
}
}
// Event listeners
sendBtn.addEventListener('click', sendMessage);
messageInput.addEventListener('keypress', function(e) {
if (e.key === 'Enter' && !e.shiftKey) {
e.preventDefault();
sendMessage();
}
});
// Initial scroll to bottom
chatMessages.scrollTop = chatMessages.scrollHeight;
});
</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=barshbub/port" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |