-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtrips.html
More file actions
134 lines (130 loc) · 4.4 KB
/
trips.html
File metadata and controls
134 lines (130 loc) · 4.4 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Trips</title>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<style>
body {
background-color: #1e293b;
color: white;
font-family: 'Poppins', sans-serif;
margin: 0;
padding: 20px;
}
.header {
font-size: 20px;
font-weight: bold;
text-align: center;
margin-bottom: 20px;
}
.trip-container {
max-width: 90%;
margin: auto;
background: #2a3b4d;
border-radius: 15px;
padding: 10px;
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.trip-card {
background: #445d78;
padding: 0px 5px 0px 15px;
margin: 6px 0;
border-radius: 10px;
cursor: pointer;
transition: background 0.3s;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
font-size: 13px;
}
.trip-card:hover {
background: #60a5fa;
}
.popup {
display: none;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: #33475b;
padding: 10px;
border-radius: 10px;
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
width: 90%;
text-align: left;
color: white;
}
.popup button {
background: #ff3b30;
border: none;
padding: 10px;
border-radius: 5px;
color: white;
cursor: pointer;
margin-top: 20px;
width: 100%;
}
.back-button {
font-size: 24px;
color: #F4F4F8;
text-decoration: none;
position: absolute;
left: 15px;
transition: transform 0.2s;
}
.back-button:hover {
transform: scale(1.1);
}
.trip-details {
margin-top: 20px;
}
.trip-details p {
margin: 10px 0;
display: flex;
align-items: center;
}
.trip-details i {
margin-right: 10px;
}
</style>
</head>
<body>
<a href="owner_profile.html" class="back-button"><i class="fas fa-arrow-left"></i></a>
<div class="header">Trip History</div>
<div class="trip-container">
<div class="trip-card" onclick="showTripDetails('26-Feb-2025', '10:30 AM', '11:15 AM', 'Maharana Pratap Chowk', 'Reay Road Railway Station', 'MH12AB1234', 85)">
<div>
<h3>Reay Road Railway Station</h3>
<p>26-Feb-2025 | 10:30 AM</p>
</div>
<span style="color:#00ff00; font-weight: bold; margin-right: 10px;">85%</span>
</div>
</div>
<div class="popup" id="tripPopup">
<h3>Trip Details</h3>
<div class="trip-details" id="tripDetails"></div>
<button onclick="closePopup()">Close</button>
</div>
<script>
function showTripDetails(date, startTime, endTime, from, to, carNumber, score) {
let details = `
<p><i class="fas fa-calendar-alt"></i> ${date}</p>
<p><i class="fas fa-clock"></i> ${startTime} - ${endTime}</p>
<p><i class="fas fa-map-marker-alt"></i> ${from}</p>
<p><i class="fas fa-map-marker-alt"></i> ${to}</p>
<p><i class="fas fa-car"></i> ${carNumber}</p>
`;
document.getElementById("tripDetails").innerHTML = details;
document.getElementById("tripPopup").style.display = "block";
}
function closePopup() {
document.getElementById("tripPopup").style.display = "none";
}
</script>
</body>
</html>