2025-04-24 18:21:28 +03:00

107 lines
2.1 KiB
Plaintext

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Tracking Info</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;
min-height: 100vh;
}
.container {
background-color: #2c2c2c;
border-radius: 15px;
padding: 40px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
max-width: 600px;
width: 90%;
}
h1, h2, h3 {
color: #fff;
text-align: center;
}
.progress-bar {
background-color: #444;
border-radius: 10px;
overflow: hidden;
height: 10px; /* Thinner bar */
margin: 20px 0;
}
.progress {
height: 100%;
background-color: #4caf50;
width: <%= latest.progress %>%;
transition: width 0.3s;
}
ul {
list-style: none;
padding: 0;
}
li {
background-color: #333;
padding: 10px;
border-radius: 8px;
margin: 5px 0;
}
.eta-box {
margin-top: 30px;
padding: 15px;
border-radius: 10px;
background-color: #333;
text-align: center;
color: #4caf50;
font-weight: bold;
}
a {
color: #4caf50;
text-decoration: none;
display: block;
text-align: center;
margin-top: 20px;
}
</style>
</head>
<body>
<div class="container">
<h1>Metsamarja Vedu</h1>
<h2>Tracking ID: <%= id %></h2>
<h3><%= latest.status %> — <%= latest.progress %>%</h3>
<div class="progress-bar">
<div class="progress"></div>
</div>
<h3>Tracking History</h3>
<ul>
<% history.forEach(u => { %>
<li>[<%= u.time %>] <%= u.status %> — <%= u.progress %>%</li>
<% }) %>
</ul>
<% if (eta) { %>
<div class="eta-box">
Estimated Delivery: <%= eta %>
</div>
<% } %>
<a href="/">Back to Home</a>
</div>
</body>
</html>