2025-04-23 23:17:30 +03:00

149 lines
3.0 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Track Your Package</title>
<style>
body {
font-family: 'Arial', sans-serif;
background-color: #1e1e1e;
color: #f1f1f1;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.container {
background-color: #2c2c2c;
border-radius: 15px;
padding: 40px 60px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
width: 100%;
max-width: 600px;
text-align: center;
}
h1 {
font-size: 36px;
color: #f1f1f1;
margin-bottom: 30px;
}
.status {
background-color: #333;
padding: 20px;
margin: 20px 0;
border-radius: 8px;
}
.status h3 {
margin: 0;
color: #4caf50;
}
.status p {
margin: 5px 0;
color: #ddd;
}
.status .progress-bar {
width: 100%;
height: 10px;
background-color: #444;
border-radius: 5px;
}
.progress {
height: 100%;
background-color: #4caf50;
border-radius: 5px;
}
.history {
text-align: left;
padding: 20px;
margin-top: 20px;
background-color: #444;
border-radius: 8px;
}
.history li {
margin-bottom: 10px;
}
.message {
font-size: 18px;
color: #ddd;
margin-top: 20px;
}
.message a {
color: #4caf50;
text-decoration: none;
}
button {
padding: 12px;
width: 100%;
background-color: #4caf50;
color: #fff;
border: none;
border-radius: 10px;
font-size: 16px;
cursor: pointer;
transition: background-color 0.3s;
}
button:hover {
background-color: #45a049;
}
</style>
</head>
<body>
<div class="container">
<h1>Metsamarja Vedu</h1>
<% if (package) { %>
<div class="status">
<h3>Package ID: <%= package.id %></h3>
<p>Status: <%= latest.status %></p>
<p>Progress: <%= latest.progress %>%</p>
<!-- Progress Bar -->
<div class="progress-bar">
<div class="progress" style="width: <%= latest.progress + '%' %>"></div>
</div>
</div>
<!-- Estimated Delivery Time -->
<div class="status">
<h3>Estimated Delivery Time</h3>
<p><%= estimatedDeliveryTime %></p>
</div>
<!-- Tracking History -->
<div class="history">
<h4>Tracking History:</h4>
<ul>
<% history.forEach(u => { %>
<li><strong><%= u.time %>:</strong> <%= u.status %> <%= u.progress %>%</li>
<% }) %>
</ul>
</div>
<div class="message">
<p>Want to track another package? <a href="/">Go back to Home</a></p>
</div>
<% } else { %>
<div class="message">
<p>Package not found. <a href="/">Try again</a></p>
</div>
<% } %>
</div>
</body>
</html>