Skip to content

Commit f3fae5b

Browse files
2 parents 88b8c21 + 9572755 commit f3fae5b

File tree

4 files changed

+227
-34
lines changed

4 files changed

+227
-34
lines changed

ToDo.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,15 @@
1-
- [ ] incomplete task
2-
- [x] completed task
1+
- [ ] Add firebase authentication to login/signup page.
2+
- [ ] Add backend to the hackathon hosting form.
3+
- [ ] implement search functionality on the hackathons page
4+
- [ ] Add a code editor and problem statement page for a hackathon.
5+
- [ ] implement a file uploading mechanism for hackathon participants
6+
- [ ] implement join a team and create a team functionality for hackathon participants
7+
- [ ] implement a notification function
8+
- [ ] implement a chat functionality for hackathon participants
9+
10+
11+
register now -> join as team/individual -> create team/join team -> enter team details -> File upload page
12+
13+
-> code editor -> problem statement -> submit -> notification -> chat -> leaderboard -> results
14+
15+

app/public/javascripts/search.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
const searchInput = document.getElementById('searchInput');
2+
const hackathons = document.querySelectorAll('.card-container');
3+
const noProfileDiv = document.getElementById('noResults'); // Select the element for displaying "No matching results found"
4+
5+
searchInput.addEventListener('input', filterHackathons);
6+
7+
function filterHackathons() {
8+
const query = searchInput.value.toLowerCase();
9+
let hasMatchingHackathon = false;
10+
hackathons.forEach((hackathon) => {
11+
const name = hackathon.querySelector('.name').textContent.toLowerCase();
12+
const skills = hackathon.querySelector('.skills').textContent.toLowerCase();
13+
if (name.includes(query) || skills.includes(query)) {
14+
hasMatchingHackathon = true;
15+
hackathon.style.display = 'block'; // Show matching profiles
16+
} else {
17+
hackathon.style.display = 'none'; // Hide non-matching profiles
18+
}
19+
});
20+
// Show/hide "No matching results found" message based on whether there are matching hackathons
21+
if (hasMatchingHackathon) {
22+
noProfileDiv.style.display = 'none'; // Hide the message
23+
} else {
24+
noProfileDiv.style.display = 'block'; // Show the message
25+
}
26+
}

app/views/hackathon-info.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<div class="container px-5 py-24 mx-auto">
3939
<div class="lg:w-4/5 mx-auto flex flex-wrap">
4040
<div class="lg:w-1/2 w-full lg:pr-10 lg:py-6 mb-6 lg:mb-0">
41-
<h2 class="text-sm title-font text-gray-500 tracking-widest">Hackathon Name</h2>
41+
<h2 class="text-sm title-font text-gray-500 tracking-widest">Build-A-Thon</h2>
4242
<h1 class="text-gray-900 text-3xl title-font font-medium mb-4">Build, deploy, & monetize dApps. Win upto 2 lakh INR.</h1>
4343
<div class="flex mb-4">
4444
<a class="flex-grow text-indigo-500 border-b-2 border-indigo-500 py-2 text-lg px-1">Description</a>

0 commit comments

Comments
 (0)