Skip to content

Commit

Permalink
The double button in Abouts page #984
Browse files Browse the repository at this point in the history
  • Loading branch information
sachinggsingh committed Nov 6, 2024
1 parent 0c11e2b commit 7db7be3
Showing 1 changed file with 25 additions and 19 deletions.
44 changes: 25 additions & 19 deletions about.html
Original file line number Diff line number Diff line change
Expand Up @@ -211,16 +211,17 @@

<!-- cursor ends -->


<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>
<!-- <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" style="display: flex; align-items: center; text-decoration: none; white-space: nowrap; margin-right: -250px;">
<!-- <div id="navLinks"> -->
<!-- <a href="index.html" style="display: flex; align-items: center; text-decoration: none; white-space: nowrap; margin-right: -250px;"> -->
<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; margin-left: 8px;">Ticket Marketplace</div>
</a><div>
Expand Down Expand Up @@ -321,21 +322,26 @@
});
}
// 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';
}
});
});
// Change icon of the dark/light mode
const menuToggle = document.querySelector('.menu-toggle');
const navLinks = document.querySelector('.nav-links');

if (menuToggle && navLinks) {
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 = '';
}
});
});
}

// Close menu when clicking outside
document.addEventListener('click', (event) => {
Expand Down

0 comments on commit 7db7be3

Please sign in to comment.