Skip to content

Commit

Permalink
Merge pull request mansiruhil#579 from DivyaJyothi9/main
Browse files Browse the repository at this point in the history
Fixed navigation link for contact us
  • Loading branch information
mansiruhil authored Oct 11, 2024
2 parents c502d4a + dbbce1d commit 9387532
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 41 deletions.
51 changes: 22 additions & 29 deletions script.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


// Newsletter form submission handler
document
.getElementById("newsletter-form")
Expand All @@ -25,7 +23,6 @@ document
});

// Accordion functionality

const accordions = document.querySelectorAll(".accordion");

accordions.forEach((accordion, index) => {
Expand All @@ -50,60 +47,56 @@ accordions.forEach((accordion, index) => {
ic.classList.remove("ri-subtract-fill");
}
});


});
});

// Function to handle the active state of navbar items
function changeContent(page) {
// Get all navigation links
var links = document.querySelectorAll(".menu ul li a");
// Get all navigation links
var links = document.querySelectorAll(".menu ul li a");

// Remove the active class from all links
links.forEach((link) => link.classList.remove("active"));
// Remove the active class from all links
links.forEach((link) => link.classList.remove("active"));

// Add the active class to the clicked link
document.getElementById(page + "-link").classList.add("active");
// Add the active class to the clicked link
document.getElementById(page + "-link").classList.add("active");
}

// Make "Home" the default active page on load
window.onload = function () {
document.getElementById("home-link").classList.add("active");
document.getElementById("home-link").classList.add("active");
};

//JS for dark mode fuctionality
// Select the dark mode button
// JS for dark mode functionality
// Get the dark mode button element
const darkModeButton = document.getElementById('dark-mode-button');

// Add event listener for toggle functionality
darkModeButton.addEventListener('click', () => {
document.body.classList.toggle('dark-mode');
document.body.classList.toggle('dark-mode');

// Toggle icon between moon and sun
const icon = darkModeButton.querySelector('i');
icon.classList.toggle('fa-moon');
icon.classList.toggle('fa-sun');
// Toggle icon between moon and sun
const icon = darkModeButton.querySelector('i');
icon.classList.toggle('fa-moon');
icon.classList.toggle('fa-sun');

// Log the current classes for debugging
console.log(icon.classList); // Check the classes being applied to the icon
// Log the current classes for debugging
console.log(icon.classList); // Check the classes being applied to the icon
});


// Back to top button functionality
const backToTopButton = document.getElementById('back-to-top');

// Show the button when scrolled down 100px from the top
window.onscroll = function () {
if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
backToTopButton.style.display = "block";
} else {
backToTopButton.style.display = "none";
}
if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
backToTopButton.style.display = "block";
} else {
backToTopButton.style.display = "none";
}
};

// Scroll to top when the button is clicked
backToTopButton.addEventListener('click', () => {
window.scrollTo({ top: 0, behavior: 'smooth' });

window.scrollTo({ top: 0, behavior: 'smooth' });
});
26 changes: 14 additions & 12 deletions style1.css
Original file line number Diff line number Diff line change
Expand Up @@ -217,21 +217,22 @@ h1 {
}

.contact-feature {
background-color: #f2e4aa;
padding: 20px;
display: flex;
align-items: center;
text-align: left;
border-radius: 10px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
grid-column: 1 / -1;
background-color: #f2e4aa;
padding: 20px;
display: flex;
align-items: center;
text-align: left;
border-radius: 10px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
grid-column: 1 / -1;
}


.contact-feature img {
width: 150px;
height: auto;
margin-right: 20px;
border-radius: 10px;
width: 150px;
height: auto;
margin-right: 20px;
border-radius: 10px;
}

footer {
Expand Down Expand Up @@ -268,6 +269,7 @@ footer {
padding-right: 20px; /* Adjust this value for right padding */
}


.links {
display: flex;
justify-content: center;
Expand Down
22 changes: 22 additions & 0 deletions team.html
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,26 @@ <h2>GPS Technician</h2>

<!-- Contact Section in Full Row -->
<div class="features-container">
<
<div class="contact-features">
<!-- Wrap the entire .inner div in an anchor tag to make it clickable -->
<a href="contact.html" class="contact-feature-link">
<div class="inner">
<div class="front">
<img src="images/contact-w.avif" alt="Contact Us" />
<h2>Contact Us</h2>
</div>
<div class="back">
<p>
Reach out to us for any inquiries or assistance. We're here to
help you 24/7 with our emergency services.
</p>
<span class="button">Go to Contact</span>
</div>
</div>
</a>
</div>

<div class="contact-features">
<div class="inner">
<div class="front">
Expand All @@ -323,9 +343,11 @@ <h2>Contact Us</h2>
</div>
</div>
</div>

</div>



<footer style="color: #f3f4f6; text-align: center; width: 100%; background-color: #C4D7FF; border: none;">
<div style="display: flex; justify-content: space-between; flex-wrap: wrap; max-width: 1200px; margin: 0 auto; padding: 20px 0;">

Expand Down

0 comments on commit 9387532

Please sign in to comment.