forked from ankit071105/Ticket-Booking
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sell.html
371 lines (316 loc) · 13.5 KB
/
sell.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sell Bus Ticket</title>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<link href="https://cdnjs.cloudflare.com/ajax/libs/aos/2.3.4/aos.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" href="index.css">
<link rel="stylesheet" href="about.css">
<link rel="stylesheet" href="main.css">
<link rel="stylesheet" href="footer.css">
<link rel="stylesheet" href="faq.css">
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" href="index.css">
<link rel="stylesheet" href="why-us.css">
<link rel="stylesheet" href="navbar.css">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
color: #333;
}
header {
background-color: #333;
padding: 1em 0;
}
header nav ul {
list-style: none;
display: flex;
justify-content: center;
}
header nav ul li {
margin: 0 1em;
}
header nav ul li a {
color: #fff;
text-decoration: none;
font-weight: bold;
}
main {
max-width: 600px;
margin: 2em auto;
padding: 1em;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
h1 {
text-align: center;
margin-bottom: 1em;
}
form label {
display: block;
margin-top: 1em;
font-weight: bold;
}
form input, form select {
width: 100%;
padding: 0.5em;
margin-top: 0.5em;
border: 1px solid #ccc;
border-radius: 4px;
}
button[type="submit"] {
width: 100%;
padding: 0.75em;
background-color: #28a745;
color: #fff;
border: none;
border-radius: 4px;
font-size: 1em;
cursor: pointer;
margin-top: 1.5em;
}
button[type="submit"]:hover {
background-color: #218838;
}
</style>
</head>
<body>
<header>
<nav class="navbar">
<img src="https://ticket-booking-blue.vercel.app/images/4.jpeg" alt="" style="border-radius: 50%; height: 35px; width: 35px;">
<div class="logo" style="font-size: 20px;">Ticket Marketplace</div>
<!-- Toggle Button (Visible on Small Screens) -->
<button id="navToggle">☰</button>
<!-- Navbar Links -->
<div id="navLinks">
<a href="index.html"><i class="fas fa-home"></i> Home</a>
<a href="about.html"><i class="fas fa-info-circle"></i> About</a>
<a href="buy.html"><i class="fas fa-ticket-alt"></i> Buy Ticket</a>
<a href="sell.html"><i class="fas fa-tags"></i> Sell</a>
<a href="contactus.html"><i class="fas fa-envelope"></i> Contact</a>
<a href="contributor.html"><i class="fas fa-users"></i> Contributors</a>
<a href="client/login.html"><i class="fas fa-sign-in-alt"></i> Login</a>
</div>
<!-- Dark Mode Button -->
<button id="darkModeToggle" style="width: 40px; height: 40px;">🌙</button>
</nav>
</header>
<main>
<button onclick="document.getElementById('chatbot-container').classList.toggle('chatbot-show')" id="chatbotBtn"
title="chat bot"></button>
<div class="chatbot-container" id="chatbot-container">
<div class="chatbot-title">not Bot</div>
<div class="chatbot-chat" id="chatbot-chat"></div>
<input type="text" class="chatbot-input" id="chatbot-input" placeholder="Type your message here...." />
<button class="chatbot-button" id="chatbot-button"><i class="fa-brands fa-telegram"></i></button>
</div>
<button onclick="moveToTop()" id="topBtn" title="Go to top" style="display:flex; position: fixed; right: 30px; z-index: 100000;">
<i class="fa fa-arrow-up" aria-hidden="true"></i>
</button>
<h1>Sell Bus Ticket</h1>
<form id="ticketForm">
<label for="name">Name:</label>
<input type="text" id="name" name="name" required>
<label for="phone">Phone Number:</label>
<input type="tel" id="phone" name="phone" required pattern="[0-9]{10}">
<label for="email">Email:</label>
<input type="email" id="email" name="email" required>
<label for="ticketNo">Ticket No:</label>
<input type="text" id="ticketNo" name="ticketNo" required>
<label for="busNo">Bus No:</label>
<input type="text" id="busNo" name="busNo" required>
<label for="departureLocation">Departure Location:</label>
<input type="text" id="departureLocation" name="departureLocation" required>
<label for="arrivalLocation">Arrival Location:</label>
<input type="text" id="arrivalLocation" name="arrivalLocation" required>
<label for="departureTime">Departure Time:</label>
<input type="time" id="departureTime" name="departureTime" required>
<label for="date">Date:</label>
<input type="date" id="date" name="date" required>
<label for="seatNo">Seat Number:</label>
<input type="text" id="seatNo" name="seatNo" required>
<label for="acClass">AC Class:</label>
<select id="acClass" name="acClass" required>
<option value="Non-AC">Non-AC</option>
<option value="AC">AC</option>
</select>
<label for="price">Original Price:</label>
<input type="number" id="price" name="price" required min="0" step="0.01">
<button type="submit">Submit Ticket</button>
</form>
</main>
<footer class="footer-container">
<div class="footer-top">
<div class="footer-logo-section">
<a href="#"> <img src="./images/3.jpeg" alt="easyJet holidays logo" class="footer-logo"></a>
<p style="color: #b5fdf4;">Affordable adventures, unforgettable memories—explore with ease.</p>
<p style="color: #dcfffa;" class="follow-us">FOLLOW US ON HERE:</p>
<div class="social-icons">
<a href="#"><i class="fab fa-facebook"></i></a>
<a href="#"><i class="fab fa-instagram"></i></a>
<a href="#"><i class="fa-brands fa-x-twitter"></i></a>
<a href="#"><i class="fab fa-linkedin"></i></a>
<a href="#"><i class="fab fa-youtube"></i></a>
</div>
</div>
<div class="footer-links">
<div class="footer-column">
<h4>HELPFUL LINKS</h4>
<ul>
<li><a href="#">Help Centre</a></li>
<li><a href="#">Special Assistance</a></li>
<li><a href="#">Download The App</a></li>
<li><a href="#">Booking Conditions</a></li>
</ul>
</div>
<div class="footer-column">
<h4>ABOUT US</h4>
<ul>
<li><a href="#">Media Center</a></li>
<li><a href="#">Investors</a></li>
<li><a href="ModernSlaveryAct.html">Modern Slavery Act</a></li>
<li><a href="terms.html">Terms Of Use</a></li>
</ul>
</div>
<div class="footer-column">
<h4>KEEPING SAFE</h4>
<ul>
<li><a href="#">ATOL Protected</a></li>
<li><a href="./travelawares.html">Travel Aware</a></li>
<li><a href="fcdoTravel.html">FCDO Travel Advice</a></li>
<li><a href="#">ABTA</a></li>
</ul>
</div>
<div class="footer-column">
<h4>FIND US</h4>
<ul>
<li><a href="contactus.html">Contact
<li><a href="GroupCookieNotice.html">Group Cookie Notice</a></li>
<li><a href="privacy.html">Privacy And Policy</a></li>
<li><a href="sitemap.html">Sitemap</a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="footer-bottom">
<ul>
<li><a href="#">Holiday Type</a></li>
<li><a href="#">Holiday Deals</a></li>
<li><a href="#">Popular Counters</a></li>
<!-- <li><a href="#">Flight Only</a></li> -->
<li><a href="#">Top Hotels</a></li>
</ul>
</div>
</footer>
<script>
// When the user scrolls down 100px from the top, show the button
window.onscroll = function () { scrollFunction() };
function scrollFunction() {
const topBtn = document.getElementById("topBtn");
if (document.body.scrollTop > 30 || document.documentElement.scrollTop > 30) {
topBtn.style.display = "block"; // Show button
} else {
topBtn.style.display = "none"; // Hide button
}
}
// When the user clicks on the button, scroll to the top of the document
function moveToTop() {
window.scrollTo({ top: 0, behavior: 'smooth' }); // Smooth scroll to top
}
const darkModeToggle = document.getElementById('darkModeToggle');
const body = document.querySelector('body');
if (darkModeToggle) {
darkModeToggle.addEventListener('click', () => {
document.body.classList.toggle('dark-mode');
if (body.classList.contains('dark-mode')) {
darkModeToggle.innerHTML = "🔆";
}
else {
darkModeToggle.innerHTML = "🌙";
}
});
}
// change icon of the dark/light mode
const menuToggle = document.querySelector('.menu-toggle');
const navLinks = document.querySelector('.nav-links');
menuToggle.addEventListener('click', () => {
navLinks.classList.toggle('active');
menuToggle.classList.toggle('active');
// Special effect for hamburger icon
const bars = menuToggle.querySelectorAll('.bar');
bars.forEach((bar, index) => {
if (menuToggle.classList.contains('active')) {
bar.style.transform = index === 1 ? 'scale(0)' : `rotate(${index === 0 ? '45deg' : '-45deg'})`;
} else {
bar.style.transform = 'none';
}
});
});
document.getElementById('ticketForm').addEventListener('submit', function(event) {
event.preventDefault();
const name = document.getElementById('name').value;
const phone = document.getElementById('phone').value;
const email = document.getElementById('email').value;
const ticketNo = document.getElementById('ticketNo').value;
const busNo = document.getElementById('busNo').value;
if (!name || !phone || !email || !ticketNo || !busNo) {
alert("Please fill in all required fields.");
return;
}
alert("Ticket submitted successfully!");
this.reset();
});
// Close menu when clicking outside
document.addEventListener('click', (event) => {
if (!navLinks.contains(event.target) && !menuToggle.contains(event.target)) {
navLinks.classList.remove('active');
menuToggle.classList.remove('active');
menuToggle.querySelectorAll('.bar').forEach(bar => {
bar.style.transform = 'none';
});
}
});
</script>
<script>
//toggle chatbot function
function toggleChatbot() {
const chatbotContainer = document.getElementById("chatbot-container");
chatbotContainer.classList.toggle("chatbot-show");
}
// Toggle Navbar Links
const navToggle = document.getElementById('navToggle');
const navlinks = document.getElementById('navLinks');
navToggle.addEventListener('click', () => {
navlinks.style.display = navlinks.style.display === 'flex' ? 'none' : 'flex';
});
// Ensure navbar links are visible on large screens
window.addEventListener('resize', () => {
if (window.innerWidth > 768) {
navlinks.style.display = 'flex'; // Show links on large screens
} else {
navlinks.style.display = 'none'; // Hide links on small screens
}
});
// Set initial state based on the current window size
if (window.innerWidth > 768) {
navlinks.style.display = 'flex'; // Show links if starting on a large screen
} else {
navlinks.style.display = 'none'; // Hide links if starting on a small screen
}
</script>
<script src="chatbot.js"></script>
</body>
</html>