Skip to content

Commit

Permalink
Merge branch 'PriyaGhosal:main' into cks-master
Browse files Browse the repository at this point in the history
  • Loading branch information
KrishChothani authored Oct 27, 2024
2 parents 4b1d728 + 9431af2 commit 82a4999
Show file tree
Hide file tree
Showing 8 changed files with 461 additions and 185 deletions.
83 changes: 83 additions & 0 deletions Booknow.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
.book-now-button {
background-color: #4CAF50;
color: white;
padding: 12px 24px;
border: none;
cursor: pointer;
font-size: 16px;
border-radius: 5px;
}

.modal1 {
display: none;
position: fixed;
z-index: 1;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
justify-content: center;
align-items: center;
}

.modal-content1 {
background-color: white;
padding: 15px;
border-radius: 10px;
width: 600px;
text-align: center;
}

.modal-header1 {
font-size: 18px;
font-weight: bold;
margin-top: 10px;
}

.modal-body1 {
margin-top: 10px;
text-align: left;
}

.dropdown, .input-field {
margin-top: 15px;
}

.dropdown select, .input-field input {
padding: 8px;
width: 100%;
margin-top: 10px;
}

.close-btn1 {
background-color: #f44336;
color: white;
border: none;
padding: 8px 16px;
cursor: pointer;
border-radius: 5px;
/* margin-top: 15px; */
margin-bottom: 20px;
}

.form-button {
background-color: #4CAF50;
color: white;
border: none;
padding: 10px 20px;
border-radius: 5px;
margin-top: 15px;
cursor: pointer;
}

.trek-details {
margin-top: 15px;
background-color: #f4f4f4;
padding: 10px;
border-radius: 5px;
}

.trek-details p {
margin: 5px 0;
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
</tr>
<tr>
<td><img src="https://github.com/Annapoornaaradhya/BuddyTrail/blob/Video/img/gssocextd1.jpg" width="200" height="auto" loading="lazy" alt="GSSoC 24"/></td>
<td>GirlScript Summer of Code 2024</td>
<td>GirlScript Summer of Code is a three-month-long Open Source Program conducted every summer by GirlScript Foundation. It is an initiative to bring more beginners to Open-Source Software Development.</td>
<td>GirlScript Summer of Code Extended 2024</td>
<td>GirlScript Summer of Code Extended is a month-long Open Source Program conducted by GirlScript Foundation. It is an initiative to bring more beginners to Open-Source Software Development.</td>
</tr>
<tr>
<td><img src="https://github.com/Annapoornaaradhya/BuddyTrail/blob/Video/img/hacktoberfest1.png" width="200" height="auto" loading="lazy" alt="Hacktoberfest 2024"/></td>
Expand Down
119 changes: 117 additions & 2 deletions himachal.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

<!DOCTYPE html>
<html lang="en">
<head>
Expand All @@ -6,6 +7,7 @@
<title>Himachal Pradesh Adventure Treks</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="himachal.html">
<link rel="stylesheet" href="Booknow.css">
</head>
<body>
<div class="container-fluid py-5 trek-header">
Expand Down Expand Up @@ -149,12 +151,125 @@ <h4>Exclusions</h4>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Book Now</button>
<div class="book-now-container">
<button class="book-now-button" onclick="openModal()">Book Now</button>
</div>

<div id="bookingModal" class="modal1">
<div class="modal-content1">
<div class="modal-header1">Trek Booking Form</div>
<div class="modal-body1">
<p>Please fill in your details:</p>

<!-- User Details Form -->
<div class="input-field">
<label for="name">Full Name</label>
<input type="text" id="name" placeholder="Enter your name" required>
</div>

<div class="input-field">
<label for="email">Email</label>
<input type="email" id="email" placeholder="Enter your email" required>
</div>

<div class="input-field">
<label for="phone">Phone Number</label>
<input type="tel" id="phone" placeholder="Enter your phone number" required>
</div>

<div class="dropdown">
<label for="trekSelection">Select a Trek</label>
<select id="trekSelection" onchange="updateTrekDetails()">
<option value="Triund Trek">Triund Trek</option>
<option value="Hampta Pass Trek">Hampta Pass Trek</option>
<option value="Bhrigu Lake Trek">Bhrigu Lake Trek</option>
</select>
</div>

<!-- Trek Details Section -->
<div id="trekDetails" class="trek-details">
<!-- Trek details will be populated here based on the selection -->
</div>

<button class="form-button" onclick="confirmBooking()">Confirm Booking</button>
</div>
<button class="close-btn1" onclick="closeModal()">Close</button>
</div>
</div>


</div>
</div>
</div>
</div>

<script>
// Trek details for each option
const trekInfo = {
"Triund Trek": {
description: "A beautiful 2-day trek near Dharamshala with stunning views of the Dhauladhar range.",
duration: "Duration: 2 days",
difficulty: "Difficulty: Easy to Moderate",
bestTime: "Best Time: March to June, September to November"
},
"Hampta Pass Trek": {
description: "A diverse 5-day trek crossing from lush Kullu Valley to the arid Spiti region.",
duration: "Duration: 5 days",
difficulty: "Difficulty: Moderate",
bestTime: "Best Time: June to September"
},
"Bhrigu Lake Trek": {
description: "A 4-day trek to a high-altitude glacial lake near Manali with panoramic views.",
duration: "Duration: 4 days",
difficulty: "Difficulty: Moderate to Difficult",
bestTime: "Best Time: May to October"
}
};

// Function to open the modal
function openModal() {
document.getElementById("bookingModal").style.display = "flex";
updateTrekDetails(); // Update trek details for the first selected option
}

// Function to close the modal
function closeModal() {
document.getElementById("bookingModal").style.display = "none";
}

// Function to update trek details based on the selection
function updateTrekDetails() {
var selectedTrek = document.getElementById("trekSelection").value;
var trekDetails = trekInfo[selectedTrek];

var detailsHTML = `
<p><strong>${selectedTrek}</strong></p>
<p>${trekDetails.description}</p>
<p>${trekDetails.duration}</p>
<p>${trekDetails.difficulty}</p>
<p>${trekDetails.bestTime}</p>
`;

document.getElementById("trekDetails").innerHTML = detailsHTML;
}

// Function to confirm the booking based on input details
function confirmBooking() {
var name = document.getElementById("name").value;
var email = document.getElementById("email").value;
var phone = document.getElementById("phone").value;
var selectedTrek = document.getElementById("trekSelection").value;

if (name && email && phone) {
alert("Thank you " + name + "! Your booking for " + selectedTrek + " has been confirmed. We will contact you at " + email + " or " + phone + ".");
closeModal();
} else {
alert("Please fill in all the details before confirming.");
}
}
</script>


<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
</html>
8 changes: 6 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
}

.rating {
height: 50px;
height: auto;
}

.rating:hover {
Expand Down Expand Up @@ -1063,7 +1063,8 @@ <h3>Wildlife Safari in Kenya</h3>

<!-- travel itineraries -->
<section id="itineraries" class="itineraries-section" style="height: 100%;">
<h2 id="h1darkbtn">Travel Itineraries</h2>
<h2 id="h1darkbtn">TRAVEL ITINERARIES</h2>

<p id="darkbtn">
Plan your trips effortlessly with our curated travel itineraries
tailored for different types of adventures. Whether you're planning a
Expand Down Expand Up @@ -1967,6 +1968,9 @@ <h1 id="h1darkbtn">Travel Discussion Forum</h1>
h1#h1darkbtn:hover {
color: #ffcc00; /* Changes the color when hovered */
}
p#darkbtn {
font-size: large;
}

/* Navigation Styles */
nav.hi ul {
Expand Down
Loading

0 comments on commit 82a4999

Please sign in to comment.