Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into AboutUs-Redirection
Browse files Browse the repository at this point in the history
  • Loading branch information
Zubaida0113 committed Nov 3, 2024
2 parents 49edd6a + f9f33fe commit 73f4836
Show file tree
Hide file tree
Showing 7 changed files with 326 additions and 43 deletions.
29 changes: 22 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ <h1>TourGuide . . .</h1>
<div style="display: flex; align-items: center;">
<img src="favicon.ico" class="sitelogo">
<a href="#" class="nav__logo" data-aos="fade-right">Tourguide<span>.</span></a>
</div>
</div>

<ul class="navLinks">
<li class="link" id="View-link" data-aos=""><a href="mapa.html">View</a></li>
Expand All @@ -555,11 +555,11 @@ <h1>TourGuide . . .</h1>
<li class="link dropdown" data-aos="">
<a href="#Services" class="dropdown">Services</a>
<ul class="dropdown-menu">
<li><a href="#Destinations">Destination</a></li>
<li><a href="#trip">Prices</a></li>
<li><a href="#ReviewGallery">Trip Gallery</a></li>
<li><a href="#tourist">Tourist Guide</a></li>
<li><a href="#hotel">Hotel & Resort</a></li>
<li><a href="/trending.html">Destination</a></li>
<li><a href="/packages.html">Prices</a></li>
<li><a href="/index.html">Trip Gallery</a></li>
<li><a href="/index.html">Tourist Guide</a></li>
<li><a href="/hotel.html">Hotel & Resort</a></li>
</ul>
</li>
<li class="link" data-aos=""><a href="./topdeals/topdeals.html">Top Deals</a></li>
Expand Down Expand Up @@ -2459,7 +2459,7 @@ <h4>Contact Us</h4>


<script>
let hamburger = document.querySelector('.hamburger');
hamburger = document.querySelector('.hamburger');
hamburger.addEventListener('click', () => {
let list = document.querySelector('.navLinks');
list.classList.toggle('activeHamburger');
Expand Down Expand Up @@ -3000,6 +3000,21 @@ <h4>Contact Us</h4>

</script>

<!-- Offline Status Indicator -->
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('/service-worker.js')
.then(registration => {
console.log('ServiceWorker registration successful');
})
.catch(err => {
console.log('ServiceWorker registration failed: ', err);
});
});
}
</script>




Expand Down
196 changes: 196 additions & 0 deletions offline.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>You're Offline - Travel Website</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
background-color: #f9fafb;
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
}

.offline-container {
background: white;
padding: 3rem;
border-radius: 1rem;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
text-align: center;
max-width: 32rem;
width: 100%;
}

.icon-container {
background-color: #eef2ff;
width: 5rem;
height: 5rem;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto 2rem;
transition: transform 0.2s;
}

.icon-container:hover {
transform: scale(1.05);
}

.icon {
width: 3rem;
height: 3rem;
color: #4f46e5;
}

h1 {
color: #1f2937;
font-size: 2rem;
margin-bottom: 1rem;
font-weight: 800;
}

p {
color: #6b7280;
margin-bottom: 2rem;
line-height: 1.7;
font-size: 1.1rem;
}

.button-container {
display: flex;
gap: 1rem;
justify-content: center;
}

.primary-button {
background-color: #4f46e5;
color: white;
border: none;
padding: 0.75rem 2rem;
border-radius: 0.5rem;
font-weight: 500;
cursor: pointer;
transition: all 0.2s;
font-size: 0.875rem;
}

.primary-button:hover {
background-color: #4338ca;
transform: translateY(-1px);
}

.secondary-button {
background-color: white;
color: #4f46e5;
border: 1px solid #e5e7eb;
padding: 0.75rem 2rem;
border-radius: 0.5rem;
font-weight: 500;
cursor: pointer;
transition: all 0.2s;
font-size: 0.875rem;
}

.secondary-button:hover {
background-color: #f9fafb;
color: #4338ca;
transform: translateY(-1px);
}

.status-text {
margin-top: 2rem;
font-size: 0.875rem;
color: #9ca3af;
}

.pulse {
display: inline-block;
width: 0.5rem;
height: 0.5rem;
background-color: #4f46e5;
border-radius: 50%;
margin-right: 0.5rem;
animation: pulse 2s infinite;
}

@keyframes pulse {
0% {
transform: scale(0.95);
opacity: 0.5;
}
50% {
transform: scale(1);
opacity: 1;
}
100% {
transform: scale(0.95);
opacity: 0.5;
}
}

@media (max-width: 640px) {
.offline-container {
padding: 2rem;
}

.button-container {
flex-direction: column;
}

h1 {
font-size: 1.5rem;
}

p {
font-size: 1rem;
}
}
</style>
</head>
<body>
<div class="offline-container">
<div class="icon-container">
<svg class="icon" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M18.364 5.636a9 9 0 010 12.728m0 0l-2.829-2.829m2.829 2.829L21 21M15.536 8.464a5 5 0 010 7.072m0 0l-2.829-2.829m-4.243 2.829a4.978 4.978 0 01-1.414-2.83m-1.414 5.658a9 9 0 01-2.167-9.238m7.824 2.167a1 1 0 111.414 1.414m-1.414-1.414L3 3m8.293 8.293l1.414 1.414" />
</svg>
</div>
<h1>You're Currently Offline</h1>
<p>Don't worry! You can still access previously loaded content. We'll automatically reconnect when your internet connection is restored.</p>
<div class="button-container">
<button onclick="window.location.reload()" class="primary-button">
Try Again
</button>
<button onclick="window.history.back()" class="secondary-button">
Go Back
</button>
</div>
<div class="status-text">
<span class="pulse"></span>
Checking connection status...
</div>
</div>
<script>
// Check if we're back online
window.addEventListener('online', function() {
window.location.reload();
});

// Update status text when offline
window.addEventListener('offline', function() {
document.querySelector('.status-text').innerHTML = '<span class="pulse"></span>Waiting for connection...';
});
</script>
</body>
</html>
15 changes: 12 additions & 3 deletions packages.html
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,10 @@ <h3>Basic Plan</h3>
<li><i class="fas fa-check"></i> Hotel Accommodation</li>
<li><i class="fas fa-check"></i> Guided Tours</li>
</ul>
<button class="btn">Book Now</button>
<a href="payment.html">
<button class="btn">Book Now</button>
</a>

</div>
<div class="pricing-card">
<h3>Premium Plan</h3>
Expand All @@ -510,7 +513,10 @@ <h3>Premium Plan</h3>
<li><i class="fas fa-check"></i> Hotel Accommodation</li>
<li><i class="fas fa-check"></i> All Meals Included</li>
</ul>
<button class="btn">Book Now</button>
<a href="payment.html">
<button class="btn">Book Now</button>
</a>

</div>
<div class="pricing-card">
<h3>Luxury Plan</h3>
Expand All @@ -520,7 +526,10 @@ <h3>Luxury Plan</h3>
<li><i class="fas fa-check"></i> 5 Star Hotel Accommodation</li>
<li><i class="fas fa-check"></i> All Meals & Drinks Included</li>
</ul>
<button class="btn">Book Now</button>
<a href="payment.html">
<button class="btn">Book Now</button>
</a>

</div>
</div>
</section>
Expand Down
12 changes: 6 additions & 6 deletions payment.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@
<li class="link" data-aos=""><a href="index.html#cnt-form">Contact Us</a></li>
</ul>

<a href="newLogin.html" class="contact-btn" id="nav-login-btn"><button class="btn login" id="btn-style"
data-aos="fade-down">Login/SignUp</button></a>
<a href="mapa.html" class="contact-btn" id="nav-view-btn"><button class="btn" id="btn-style" style="margin: 0;"
data-aos="fade-down">view <map name=""></map></button></a>
<a href="newLogin.html" class="contact-btn" id="nav-login-btn"><button class="btn login" id="btn-style"
data-aos="fade-down">Login/SignUp</button></a>
<a href="mapa.html" class="contact-btn" id="nav-view-btn"><button class="btn" id="btn-style" style="margin: 0;"
data-aos="fade-down">view <map name=""></map></button></a>

<a href="loginPage.html" class="contact-btn"><button class="btn" id="logout-btn"
style="margin: 0; display: none;" data-aos="fade-down" disabled>Log Out</button></a>
<a href="loginPage.html" class="contact-btn"><button class="btn" id="logout-btn"
style="margin: 0; display: none;" data-aos="fade-down" disabled>Log Out</button></a>

<!-- <a href="login-modified.html" class="contact-btn"><button class="btn" id="btn-style"
style="margin: 0; box-shadow:1.5px 1.5px 6px red;" data-aos="fade-down">Login</button></a> -->
Expand Down
22 changes: 16 additions & 6 deletions plantrip.html
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
<div style="display: flex; flex-direction: row; align-items: center;">
<img src="./img/tour1.png" class="sitelogo">

<a href="#" class="nav__logo aos-init aos-animate" data-aos="fade-right">Tourguide<span>.</span></a>
<a href="index.html" class="nav__logo aos-init aos-animate" data-aos="fade-right">Tourguide<span>.</span></a>
</div>

<ul class="navLinks">
Expand Down Expand Up @@ -315,8 +315,8 @@ <h3>Thailand</h3>
</div>
</div>
<div class="carousel-controls">
<button class="carousel-button" onclick="prevSlide()">&#9664;</button>
<button class="carousel-button" onclick="nextSlide()">&#9654;</button>
<button class="carousel-button" id = "prev-btn" onclick="prevSlide()">&#9664;</button>
<button class="carousel-button" id = "next-btn" onclick="nextSlide()">&#9654;</button>
</div>
</div>
<script>
Expand All @@ -330,24 +330,34 @@ <h3>Thailand</h3>
let currentSlide = 0;
const slides = document.querySelectorAll('.trip-card');
const totalSlides = slides.length;
const slidesInView = 3.5; // Set this to the number of visible slides in the container
const slideWidth = slides[0].offsetWidth + 20; // Including margin
const maxTranslateX = (totalSlides - slidesInView) * slideWidth;

function updateCarousel() {
const carousel = document.getElementById('trip-carousel');
const slideWidth = slides[0].offsetWidth + 20; // Including margin
carousel.style.transform = `translateX(-${currentSlide * slideWidth}px)`;
const translateX = -currentSlide * slideWidth;
carousel.style.transform = `translateX(${Math.max(translateX, -maxTranslateX)}px)`;
}

function updateArrows() {
document.getElementById('prev-btn').disabled = currentSlide === 0;
document.getElementById('next-btn').disabled = currentSlide >= totalSlides - slidesInView;
}

function prevSlide() {
if (currentSlide > 0) {
currentSlide--;
updateCarousel();
updateArrows();
}
}

function nextSlide() {
if (currentSlide < totalSlides - 1) {
if (currentSlide < totalSlides - slidesInView) {
currentSlide++;
updateCarousel();
updateArrows();
}
}

Expand Down
Loading

0 comments on commit 73f4836

Please sign in to comment.