test / index.html
xinghen's picture
Add 2 files
971d1d8 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LogisticsPro - Transportation Management System</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
:root {
--primary-color: #3a86ff;
--secondary-color: #8338ec;
--accent-color: #ff006e;
--danger-color: #ef233c;
--success-color: #06d6a0;
--warning-color: #ffbe0b;
--dark-color: #1a1a2e;
--light-color: #f8f9fa;
--gray-color: #6c757d;
--border-radius: 8px;
--box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
background-color: #f5f7fa;
color: var(--dark-color);
}
.app-container {
display: grid;
grid-template-columns: 250px 1fr;
min-height: 100vh;
}
/* Sidebar */
.sidebar {
background-color: var(--dark-color);
color: white;
padding: 20px 0;
height: 100vh;
position: sticky;
top: 0;
}
.logo {
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 30px;
padding: 0 20px;
}
.logo i {
font-size: 30px;
margin-right: 10px;
color: var(--primary-color);
}
.logo h1 {
font-size: 20px;
}
.menu-item {
display: flex;
align-items: center;
padding: 15px 25px;
cursor: pointer;
transition: all 0.3s;
border-left: 3px solid transparent;
}
.menu-item i {
font-size: 18px;
margin-right: 15px;
width: 20px;
text-align: center;
}
.menu-item:hover {
background-color: rgba(255, 255, 255, 0.1);
}
.menu-item.active {
background-color: rgba(58, 134, 255, 0.2);
border-left-color: var(--primary-color);
}
/* Main Content */
.main-content {
padding: 20px 30px;
}
/* Header */
.header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 30px;
padding-bottom: 15px;
border-bottom: 1px solid #e9ecef;
}
.header h2 {
font-size: 24px;
font-weight: 600;
}
.user-info {
display: flex;
align-items: center;
}
.user-avatar {
width: 40px;
height: 40px;
border-radius: 50%;
background-color: var(--primary-color);
color: white;
display: flex;
align-items: center;
justify-content: center;
margin-right: 15px;
font-weight: bold;
}
.notification-badge {
position: relative;
margin-right: 25px;
cursor: pointer;
}
.notification-badge i {
font-size: 20px;
color: var(--gray-color);
}
.badge {
position: absolute;
top: -5px;
right: -10px;
background-color: var(--danger-color);
color: white;
border-radius: 50%;
width: 16px;
height: 16px;
display: flex;
align-items: center;
justify-content: center;
font-size: 10px;
}
/* Dashboard Widgets */
.dashboard-widgets {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
gap: 20px;
margin-bottom: 30px;
}
.widget {
background-color: white;
border-radius: var(--border-radius);
padding: 20px;
box-shadow: var(--box-shadow);
display: flex;
align-items: center;
}
.widget-icon {
width: 60px;
height: 60px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin-right: 15px;
font-size: 25px;
}
.widget-content {
flex: 1;
}
.widget-title {
font-size: 14px;
color: var(--gray-color);
margin-bottom: 5px;
}
.widget-value {
font-size: 22px;
font-weight: 600;
margin-bottom: 5px;
}
.widget-change {
font-size: 12px;
display: flex;
align-items: center;
}
.up {
color: var(--success-color);
}
.down {
color: var(--danger-color);
}
/* Shipments Table */
.shipments-section {
background-color: white;
border-radius: var(--border-radius);
padding: 25px;
box-shadow: var(--box-shadow);
margin-bottom: 30px;
}
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
.section-title {
font-size: 18px;
font-weight: 600;
}
.btn {
padding: 8px 16px;
border-radius: var(--border-radius);
border: none;
cursor: pointer;
font-weight: 500;
transition: all 0.3s;
display: inline-flex;
align-items: center;
}
.btn i {
margin-right: 8px;
}
.btn-primary {
background-color: var(--primary-color);
color: white;
}
.btn-primary:hover {
background-color: #2a75e6;
}
table {
width: 100%;
border-collapse: collapse;
}
th, td {
padding: 12px 15px;
text-align: left;
border-bottom: 1px solid #e9ecef;
}
th {
font-weight: 600;
color: var(--gray-color);
background-color: #f8f9fa;
}
.status {
padding: 5px 10px;
border-radius: 20px;
font-size: 12px;
font-weight: 500;
}
.status-pending {
background-color: #fff3cd;
color: #856404;
}
.status-in-transit {
background-color: #cce5ff;
color: #004085;
}
.status-delivered {
background-color: #d4edda;
color: #155724;
}
.status-cancelled {
background-color: #f8d7da;
color: #721c24;
}
.action-btn {
background: none;
border: none;
cursor: pointer;
color: var(--primary-color);
margin-right: 10px;
font-size: 16px;
}
/* Map Section */
.map-section {
background-color: white;
border-radius: var(--border-radius);
padding: 25px;
box-shadow: var(--box-shadow);
margin-bottom: 30px;
}
.map-container {
height: 350px;
background-color: #e9ecef;
border-radius: var(--border-radius);
display: flex;
align-items: center;
justify-content: center;
margin-top: 15px;
position: relative;
overflow: hidden;
}
.map-placeholder {
text-align: center;
color: var(--gray-color);
}
.map-placeholder i {
font-size: 50px;
margin-bottom: 15px;
color: var(--primary-color);
}
/* Tracking */
.tracking-container {
display: flex;
flex-direction: column;
}
.tracking-header {
display: flex;
align-items: center;
margin-bottom: 20px;
}
.tracking-input {
flex: 1;
padding: 10px 15px;
border: 1px solid #ced4da;
border-radius: var(--border-radius);
margin-right: 10px;
font-size: 14px;
}
/* Responsive */
@media (max-width: 992px) {
.app-container {
grid-template-columns: 1fr;
}
.sidebar {
height: auto;
position: relative;
}
}
/* Animations */
@keyframes fadeIn {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
.fade-in {
animation: fadeIn 0.5s ease-out forwards;
}
</style>
</head>
<body>
<div class="app-container">
<!-- Sidebar -->
<div class="sidebar">
<div class="logo">
<i class="fas fa-truck-moving"></i>
<h1>LogisticsPro</h1>
</div>
<div class="menu-item active">
<i class="fas fa-tachometer-alt"></i>
<span>Dashboard</span>
</div>
<div class="menu-item">
<i class="fas fa-shipping-fast"></i>
<span>Shipments</span>
</div>
<div class="menu-item">
<i class="fas fa-warehouse"></i>
<span>Warehouses</span>
</div>
<div class="menu-item">
<i class="fas fa-users"></i>
<span>Drivers</span>
</div>
<div class="menu-item">
<i class="fas fa-route"></i>
<span>Routes</span>
</div>
<div class="menu-item">
<i class="fas fa-map-marked-alt"></i>
<span>Tracking</span>
</div>
<div class="menu-item">
<i class="fas fa-file-invoice-dollar"></i>
<span>Invoices</span>
</div>
<div class="menu-item">
<i class="fas fa-cog"></i>
<span>Settings</span>
</div>
</div>
<!-- Main Content -->
<div class="main-content">
<div class="header">
<h2>Transportation Dashboard</h2>
<div class="user-info">
<div class="notification-badge">
<i class="fas fa-bell"></i>
<div class="badge">3</div>
</div>
<div class="user-avatar">JD</div>
</div>
</div>
<!-- Dashboard Widgets -->
<div class="dashboard-widgets">
<div class="widget fade-in" style="animation-delay: 0.1s;">
<div class="widget-icon" style="background-color: #e3f2fd; color: var(--primary-color);">
<i class="fas fa-boxes"></i>
</div>
<div class="widget-content">
<div class="widget-title">Total Shipments</div>
<div class="widget-value">1,284</div>
<div class="widget-change up">
<i class="fas fa-arrow-up"></i> 12% from last month
</div>
</div>
</div>
<div class="widget fade-in" style="animation-delay: 0.2s;">
<div class="widget-icon" style="background-color: #fff8e1; color: var(--warning-color);">
<i class="fas fa-truck"></i>
</div>
<div class="widget-content">
<div class="widget-title">In Transit</div>
<div class="widget-value">327</div>
<div class="widget-change down">
<i class="fas fa-arrow-down"></i> 5% from last month
</div>
</div>
</div>
<div class="widget fade-in" style="animation-delay: 0.3s;">
<div class="widget-icon" style="background-color: #e8f5e9; color: var(--success-color);">
<i class="fas fa-check-circle"></i>
</div>
<div class="widget-content">
<div class="widget-title">Delivered</div>
<div class="widget-value">872</div>
<div class="widget-change up">
<i class="fas fa-arrow-up"></i> 18% from last month
</div>
</div>
</div>
<div class="widget fade-in" style="animation-delay: 0.4s;">
<div class="widget-icon" style="background-color: #ffebee; color: var(--danger-color);">
<i class="fas fa-exclamation-triangle"></i>
</div>
<div class="widget-content">
<div class="widget-title">Delayed</div>
<div class="widget-value">85</div>
<div class="widget-change down">
<i class="fas fa-arrow-down"></i> 7% from last month
</div>
</div>
</div>
</div>
<!-- Recent Shipments Section -->
<div class="shipments-section fade-in" style="animation-delay: 0.5s;">
<div class="section-header">
<div class="section-title">Recent Shipments</div>
<button class="btn btn-primary">
<i class="fas fa-plus"></i> Add New
</button>
</div>
<div class="table-responsive">
<table>
<thead>
<tr>
<th>Tracking ID</th>
<th>Origin</th>
<th>Destination</th>
<th>Carrier</th>
<th>Status</th>
<th>Est. Delivery</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr>
<td>#SH-8472</td>
<td>New York, USA</td>
<td>London, UK</td>
<td>FedEx</td>
<td><span class="status status-in-transit">In Transit</span></td>
<td>Jun 15, 2023</td>
<td>
<button class="action-btn" title="Track">
<i class="fas fa-map-marker-alt"></i>
</button>
<button class="action-btn" title="Edit">
<i class="fas fa-edit"></i>
</button>
<button class="action-btn" title="Delete">
<i class="fas fa-trash"></i>
</button>
</td>
</tr>
<tr>
<td>#SH-9265</td>
<td>Shanghai, China</td>
<td>Los Angeles, USA</td>
<td>Maersk</td>
<td><span class="status status-pending">Pending</span></td>
<td>Jun 18, 2023</td>
<td>
<button class="action-btn" title="Track">
<i class="fas fa-map-marker-alt"></i>
</button>
<button class="action-btn" title="Edit">
<i class="fas fa-edit"></i>
</button>
<button class="action-btn" title="Delete">
<i class="fas fa-trash"></i>
</button>
</td>
</tr>
<tr>
<td>#SH-7318</td>
<td>Berlin, Germany</td>
<td>Paris, France</td>
<td>DHL</td>
<td><span class="status status-delivered">Delivered</span></td>
<td>Jun 10, 2023</td>
<td>
<button class="action-btn" title="Track">
<i class="fas fa-map-marker-alt"></i>
</button>
<button class="action-btn" title="Edit">
<i class="fas fa-edit"></i>
</button>
<button class="action-btn" title="Delete">
<i class="fas fa-trash"></i>
</button>
</td>
</tr>
<tr>
<td>#SH-4592</td>
<td>Sydney, Australia</td>
<td>Tokyo, Japan</td>
<td>AAPL Logistics</td>
<td><span class="status status-cancelled">Cancelled</span></td>
<td>Jun 05, 2023</td>
<td>
<button class="action-btn" title="Track">
<i class="fas fa-map-marker-alt"></i>
</button>
<button class="action-btn" title="Edit">
<i class="fas fa-edit"></i>
</button>
<button class="action-btn" title="Delete">
<i class="fas fa-trash"></i>
</button>
</td>
</tr>
<tr>
<td>#SH-3847</td>
<td>Mumbai, India</td>
<td>Dubai, UAE</td>
<td>Amazon Logistics</td>
<td><span class="status status-in-transit">In Transit</span></td>
<td>Jun 20, 2023</td>
<td>
<button class="action-btn" title="Track">
<i class="fas fa-map-marker-alt"></i>
</button>
<button class="action-btn" title="Edit">
<i class="fas fa-edit"></i>
</button>
<button class="action-btn" title="Delete">
<i class="fas fa-trash"></i>
</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Map Section -->
<div class="map-section fade-in" style="animation-delay: 0.6s;">
<div class="section-header">
<div class="section-title">Live Tracking</div>
</div>
<div class="tracking-container">
<div class="tracking-header">
<input type="text" class="tracking-input" placeholder="Enter tracking number">
<button class="btn btn-primary">
<i class="fas fa-search"></i> Track
</button>
</div>
<div class="map-container">
<div class="map-placeholder">
<i class="fas fa-map-marked-alt"></i>
<p>Live shipment tracking map will be displayed here</p>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
// Menu item click event
const menuItems = document.querySelectorAll('.menu-item');
menuItems.forEach(item => {
item.addEventListener('click', function() {
document.querySelector('.menu-item.active').classList.remove('active');
this.classList.add('active');
});
});
// Mock data for widgets (in a real app, this would come from an API)
function updateWidgets() {
const widgets = document.querySelectorAll('.widget-value');
// Simulate data changing (would be API calls in real app)
setInterval(() => {
widgets[0].textContent = (1284 + Math.floor(Math.random() * 20)).toLocaleString();
widgets[1].textContent = (327 + Math.floor(Math.random() * 15) - 5);
widgets[2].textContent = (872 + Math.floor(Math.random() * 30));
widgets[3].textContent = (85 + Math.floor(Math.random() * 10) - 3);
}, 5000);
}
updateWidgets();
// Tracking button functionality
const trackButton = document.querySelector('.map-section .btn-primary');
trackButton.addEventListener('click', function() {
const trackingInput = document.querySelector('.tracking-input');
if (trackingInput.value.trim() === '') {
alert('Please enter a tracking number');
return;
}
// In a real app, this would make an API call to get tracking info
alert(`Tracking information for ${trackingInput.value} would be displayed here`);
trackingInput.value = '';
});
// Shipment action buttons
const actionButtons = document.querySelectorAll('.action-btn');
actionButtons.forEach(button => {
button.addEventListener('click', function() {
const shipmentId = this.closest('tr').querySelector('td').textContent;
const action = this.title;
// Would handle different actions in a real app
// For demo, we'll just show a message
const actions = {
'Track': `Would show tracking info for ${shipmentId}`,
'Edit': `Would open edit form for ${shipmentId}`,
'Delete': `Would delete shipment ${shipmentId} after confirmation`
};
alert(actions[action]);
});
});
// Animation on scroll
const fadeElements = document.querySelectorAll('.fade-in');
function checkScroll() {
fadeElements.forEach(element => {
const elementTop = element.getBoundingClientRect().top;
const windowHeight = window.innerHeight;
if (elementTop < windowHeight - 100) {
element.style.opacity = 1;
}
});
}
window.addEventListener('scroll', checkScroll);
checkScroll(); // Initialize
});
</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 <a href="https://enzostvs-deepsite.hf.space" style="color: #fff;" target="_blank" >DeepSite</a> <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;"></p></body>
</html>