Skip to content

Commit

Permalink
tatti mvp ready
Browse files Browse the repository at this point in the history
  • Loading branch information
that-ar-guy committed Dec 16, 2024
1 parent 511da28 commit c88e85a
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Collaborative Exam Preparation</title>
<title>StudySphere</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<nav>
<div class="logo">PrepTogether</div>
<div class="logo">StudySphere</div>
<ul class="nav-links">
<li><a href="#features">Features</a></li>
<li><a href="#about">About</a></li>
Expand Down Expand Up @@ -64,5 +64,6 @@ <h2>About Us</h2>
</ul>
</div>
</footer>
<script src="script.js"></script>
</body>
</html>
42 changes: 42 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// Toggle Navigation Menu (for smaller screens)
const toggleNav = () => {
const navLinks = document.querySelector('.nav-links');
navLinks.classList.toggle('active');
};

document.addEventListener('DOMContentLoaded', () => {
// Add event listener for responsive menu toggle (if applicable)
const menuButton = document.querySelector('.menu-toggle');
if (menuButton) {
menuButton.addEventListener('click', toggleNav);
}

// Simulate Progress Bar Animation for User's Group Progress
const progressBars = document.querySelectorAll('.progress-bar');
progressBars.forEach((bar) => {
const progress = bar.dataset.progress;
bar.style.width = `${progress}%`;
bar.innerText = `${progress}%`;
});

// Interactive Modal for Group Chat Popup
const chatButton = document.querySelector('#chat-btn');
const chatModal = document.querySelector('#chat-modal');
const closeChat = document.querySelector('#close-chat');

if (chatButton && chatModal && closeChat) {
chatButton.addEventListener('click', () => {
chatModal.style.display = 'block';
});

closeChat.addEventListener('click', () => {
chatModal.style.display = 'none';
});

window.addEventListener('click', (e) => {
if (e.target === chatModal) {
chatModal.style.display = 'none';
}
});
}
});

0 comments on commit c88e85a

Please sign in to comment.