diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..9fded1e --- /dev/null +++ b/.htaccess @@ -0,0 +1 @@ +ErrorDocument 404 /404.html \ No newline at end of file diff --git a/404.html b/404.html new file mode 100644 index 0000000..fffc865 --- /dev/null +++ b/404.html @@ -0,0 +1,74 @@ + + + + + + 404 PAGE + + + + + + + + + +
+
+
+
+
+
+

404

+ + +
+ +
+

+ Look like you're lost +

+ +

The page you are looking for not available!

+ + Go to Home +
+
+
+
+
+
+ + + + \ No newline at end of file diff --git a/about.html b/about.html index 57b655f..7e74e18 100644 --- a/about.html +++ b/about.html @@ -211,16 +211,17 @@ + @@ -692,7 +692,7 @@

Book Your Ticket

const ticketList = type === 'bus' ? document.getElementById('busTicketsList') : document.getElementById('trainTicketsList'); if (filteredTickets.length === 0) { - ticketList.innerHTML = `

No ${type} tickets available.

`; + ticketList.innerHTML =

No ${type} tickets available.

; } else { filteredTickets.forEach(ticket => { const ticketElement = document.createElement('div'); @@ -711,7 +711,7 @@

${type === 'bus' ? ticket.busName : 'Train Number: ' + ticket.trainNumber} diff --git a/contactus.html b/contactus.html index 99f3fe1..eac2b3a 100644 --- a/contactus.html +++ b/contactus.html @@ -5,6 +5,21 @@ Contact Us - Trainline + + diff --git a/icon-192x192.png b/icon-192x192.png new file mode 100644 index 0000000..8ae05d1 Binary files /dev/null and b/icon-192x192.png differ diff --git a/icon-512x512.png b/icon-512x512.png new file mode 100644 index 0000000..976466f Binary files /dev/null and b/icon-512x512.png differ diff --git a/index.css b/index.css index b11ac20..bab40b2 100644 --- a/index.css +++ b/index.css @@ -4,6 +4,7 @@ body { } /* Popup Styles */ .popup { + transition: opacity 0.3s ease, visibility 0.3s ease; display: none; /* Hidden by default */ position: fixed; /* Stay in place */ left: 0; @@ -142,6 +143,8 @@ p { } .video-container video { + max-width: 100%; + width: calc(100% + 150px); /* Increase the width to crop from the right */ height: auto; /* Maintain aspect ratio */ position: relative; @@ -328,7 +331,19 @@ p { font-size: 20px; cursor: pointer; } - +@media (max-width:480px) +{ + .ticket-list { + flex-direction: column; /* Stack cards vertically on smaller screens */ + align-items: center; + } + .navbar ul { + flex-direction: column; + } + #darkModeToggle{ + margin-top: 20px; + } +} /* Dark Mode CSS */ body.dark-mode { background-color: #121212; @@ -615,7 +630,8 @@ body.dark-mode .ticket-card button:hover { @media (max-width: 500px) { .navbar .logo { - font-size: 20px; + font-size: 15px; + margin-top: -15px; } .btn { @@ -683,9 +699,10 @@ p { .nav-buttons { position: absolute; - top: 35%; - width: 100%; + top: 90%; + width: 50%; display: flex; + margin-left: 25%; justify-content: space-between; transform: translateY(-50%); } @@ -789,4 +806,4 @@ button:hover { .faq-heading { font-size: 20px; } -} +} \ No newline at end of file diff --git a/index.html b/index.html index 51ebb23..b2ce8bc 100644 --- a/index.html +++ b/index.html @@ -22,6 +22,7 @@ + @@ -591,13 +592,10 @@

What type of transportation do you prefer for your travels?

Login AI Suggestions + - - - - - - - - + + + Profile Icon + + - + + - \ No newline at end of file + + \ No newline at end of file diff --git a/main.css b/main.css index c374786..12250b4 100644 --- a/main.css +++ b/main.css @@ -153,13 +153,13 @@ body { .prev, .next { - background-color: rgb(53 48 48 / 80%); /* Semi-transparent background */ + background-color: rgba(0, 0, 0, 0.8); /* Semi-transparent background */ border: none; border-radius: 50%; cursor: pointer; outline: none; padding: 0; - font-size: 23px; + font-size: 43px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); transition: background-color 0.3s; } @@ -185,7 +185,7 @@ body { .social-sidebar { position: fixed; top: 50%; - left: 0; + left: -25px; transform: translateY(-50%); display: flex; flex-direction: column; diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..5e432f1 --- /dev/null +++ b/manifest.json @@ -0,0 +1,20 @@ +{ + "name": "Ticket-Booking", + "short_name": "Ticket-Booking", + "start_url": "/", + "display": "standalone", + "background_color": "#ffffff", + "theme_color": "#000000", + "icons": [ + { + "src": "/icon-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/icon-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ] + } diff --git a/scripts.js b/scripts.js new file mode 100644 index 0000000..8df64f9 --- /dev/null +++ b/scripts.js @@ -0,0 +1,12 @@ +// Register the service worker +if ('serviceWorker' in navigator) { + window.addEventListener('load', () => { + navigator.serviceWorker.register('/sw.js') // Pointing to the sw.js file + .then(registration => { + console.log('ServiceWorker registration successful:', registration); + }) + .catch(error => { + console.error('ServiceWorker registration failed:', error); + }); + }); +} \ No newline at end of file diff --git a/sell.html b/sell.html index 8ef950a..caf22d6 100644 --- a/sell.html +++ b/sell.html @@ -34,6 +34,21 @@ height: 40px !important; } +/* cursor animation */ + +.circle { + height: 24px; + width: 24px; + border-radius: 24px; + background-color: black; + position: fixed; + top: 0; + left: 0; + pointer-events: none; + z-index: 99999999; /* so that it stays on top of all other elements */ +} + + #myBtn:hover { background-color: #4cc6ad; } @@ -915,8 +930,14 @@

Sell Ticket

- +
+ +
@@ -969,7 +990,13 @@

Sell Bus Ticket

- + + + diff --git a/styles.css b/styles.css index f56f784..1df5df7 100644 --- a/styles.css +++ b/styles.css @@ -880,7 +880,7 @@ button:hover { height: 10px; width: 10px; margin: 0 2px; - background-color: #bbb; + background-color: #ffffff; border-radius: 50%; display: inline-block; transition: background-color 0.6s ease; @@ -898,7 +898,7 @@ button:hover { } .slider-dot-active, .dot:hover { - background-color: #717171; + background-color: #00e5ff; } .slider { diff --git a/sw.js b/sw.js new file mode 100644 index 0000000..2f85769 --- /dev/null +++ b/sw.js @@ -0,0 +1,43 @@ +const CACHE_NAME = 'my-pwa-cache-v1'; +const urlsToCache = [ + '/', + '/index.html', + '/styles.css', + '/scripts.js', + '/manifest.json', + '/icon-192x192.png', + '/icon-512x512.png' +]; + +self.addEventListener('install', (event) => { + event.waitUntil( + caches.open(CACHE_NAME) + .then((cache) => { + return cache.addAll(urlsToCache); + }) + ); +}); + +self.addEventListener('fetch', (event) => { + event.respondWith( + caches.match(event.request) + .then((response) => { + return response || fetch(event.request); + }) + ); +}); + +self.addEventListener('activate', (event) => { + const cacheWhitelist = [CACHE_NAME]; + event.waitUntil( + caches.keys().then((cacheNames) => { + return Promise.all( + cacheNames.map((cacheName) => { + if (!cacheWhitelist.includes(cacheName)) { + return caches.delete(cacheName); + } + }) + ); + }) + ); +}); \ No newline at end of file