Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New branch for first pr #23

Merged
merged 3 commits into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,13 @@ <h2>Ajivika</h2>
</div>
<!-- Floating Image Button -->


<!-- hamburger menu -->
<button class="hamburger" onclick="toggleMenu()">
<span class="bar"></span>
<span class="bar"></span>
<span class="bar"></span>
</button>
<!-- Navigation Links -->
<ul class="nav-links">
<li><a href="./index.html"><i class="fas fa-home"></i><span>Home</span></a></li>
<li><a href="./about.html"><i class="fas fa-address-card"></i> <span>About Us</span></a></li>
Expand Down Expand Up @@ -569,6 +575,13 @@ <h2>Ajivika</h2>

<!-- Home Page Content -->

<script>
// hamburger menu js
function toggleMenu() {
const navLinks = document.querySelector('.nav-links');
navLinks.classList.toggle('active');
}
</script>

<!-- Google Translate Script -->
<script src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
Expand Down
65 changes: 63 additions & 2 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ body {
.nav-links a {
color: #fff;
text-decoration: double;
font-size: 1.1em;
font-size: 18px;
display: flex;
align-items: center;
transition: color 0.3s ease, background-color 0.3s ease;
Expand All @@ -62,7 +62,7 @@ body {
/* Sections */
.section {
padding: 60px 20px;
max-width: 1200px;
max-width: 100%;
margin: auto;
}

Expand All @@ -75,6 +75,27 @@ body {
background-color: #f47200;
}

.hamburger {
display: none;
flex-direction: column;
cursor: pointer;
justify-content: space-between;
background: transparent;
border: none;
padding: 0;
}

.hamburger span {
height: 3px;
width: 100%;
background: #fff;
display: block;
border-radius: 10px;
margin: 8px 0;
width: 45px;
height: 6px;
}

/* Headings */
h1, h2 {
margin-bottom: 20px;
Expand Down Expand Up @@ -104,3 +125,43 @@ footer {
bottom: 0;
width: 100%;
}

@media (max-width: 956px) {
.nav-links a {
font-size: 15px;
}

}

@media (max-width: 768px) {
.nav-links {
display: none;
}

.hamburger {
display: flex;
}

.nav-links.active {
display: flex;
flex-direction: column;
position: absolute;
top: 70px;
right: 10%;
background-color: rgb(43, 43, 40);
width: 50%;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.nav-links.active li {
margin-right: 0;
text-align: center;
}

.nav-links.active a {
padding: 10px 20px;
border-radius: 0;
}

}
Loading