-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathThread.html
More file actions
210 lines (185 loc) · 8.42 KB
/
Copy pathThread.html
File metadata and controls
210 lines (185 loc) · 8.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Threads - Assemble Here</title>
<link rel="stylesheet" href="thread.css">
</head>
<body>
<!-- Header -->
<header class="header">
<nav class="nav-container">
<div class="logo">ASSEMBLE<br>HERE</div>
<ul class="nav-links">
<li><a href="Index.html">EVENTS</a></li>
<li><a href="People.html">PEOPLE</a></li>
<li><a href="Thread.html">THREADS</a></li>
</ul>
<div class="profile-icon"><a href="Profile.html">👤</a></div>
</nav>
</header>
<!-- Main Content -->
<main class="main-content">
<!-- Post Requirement Section -->
<section class="post-section">
<h2 class="post-title">Post Requirement</h2>
<div class="success-message" id="successMessage">
Your requirement has been posted successfully!
</div>
<textarea
class="post-input"
id="requirementInput"
placeholder="Describe the role you're looking for, required skills, event details, and any other relevant information... Example: Looking for a Frontend Developer for SIH hackathon Skills required: React, JavaScript, UI/UX Event: Smart India Hackathon 2025 Team: Code Warriors"
></textarea>
<div class="clearfix">
<button class="ask-btn" id="postBtn">Ask</button>
</div>
</section>
<!-- Recent Requirements Section -->
<section class="recent-section">
<h2 class="section-title">RECENT REQUIREMENT</h2>
<!-- Requirement Card 1 -->
<div class="requirement-card">
<div class="requirement-header">
<span class="role-tag">Designer</span>
<span class="event-info">For SIH</span>
</div>
<div class="team-name">Team Buffering...</div>
<div class="clearfix">
<button class="join-btn">Ask to Join</button>
</div>
</div>
<!-- Requirement Card 2 -->
<div class="requirement-card">
<div class="requirement-header">
<span class="role-tag">Web Dev</span>
<span class="event-info">For SIH</span>
</div>
<div class="team-name">Team 404</div>
<div class="clearfix">
<button class="join-btn">Ask to Join</button>
</div>
</div>
</section>
</main>
<!-- Footer -->
<footer class="footer">
<div class="footer-content">
<div class="footer-logo">ASSEMBLE<br>HERE</div>
<div class="footer-bottom">
AssembleHere © 2025 | Built with <span class="heart">❤️</span> by Team Buffering
</div>
</div>
</footer>
<script>
// Post requirement functionality
document.getElementById('postBtn').addEventListener('click', function() {
const input = document.getElementById('requirementInput');
const successMessage = document.getElementById('successMessage');
if (input.value.trim() === '') {
alert('Please enter your requirement before posting.');
return;
}
// Show success message
successMessage.style.display = 'block';
// Create new requirement card
const requirementText = input.value.trim();
const lines = requirementText.split('\n');
const firstLine = lines[0];
// Extract role and event info from the first line (basic parsing)
let role = 'Team Member';
let event = 'Event';
// Simple parsing logic
if (firstLine.toLowerCase().includes('designer')) role = 'Designer';
else if (firstLine.toLowerCase().includes('developer') || firstLine.toLowerCase().includes('dev')) role = 'Web Dev';
else if (firstLine.toLowerCase().includes('frontend')) role = 'Frontend Dev';
else if (firstLine.toLowerCase().includes('backend')) role = 'Backend Dev';
else if (firstLine.toLowerCase().includes('ai') || firstLine.toLowerCase().includes('ml')) role = 'AI/ML Engineer';
if (firstLine.toLowerCase().includes('sih')) event = 'For SIH';
else if (firstLine.toLowerCase().includes('cyhi')) event = 'For CYHI';
else if (firstLine.toLowerCase().includes('hackathon')) event = 'For Hackathon';
// Create new card
const newCard = document.createElement('div');
newCard.className = 'requirement-card';
newCard.style.opacity = '0';
newCard.style.transform = 'translateY(20px)';
newCard.innerHTML = `
<div class="requirement-header">
<span class="role-tag">${role}</span>
<span class="event-info">${event}</span>
</div>
<div class="team-name">Your Team</div>
<div class="clearfix">
<button class="join-btn">Ask to Join</button>
</div>
`;
// Add to recent requirements
const recentSection = document.querySelector('.recent-section');
const firstCard = document.querySelector('.requirement-card');
if (firstCard) {
recentSection.insertBefore(newCard, firstCard);
} else {
recentSection.appendChild(newCard);
}
// Animate in
setTimeout(() => {
newCard.style.transition = 'opacity 0.3s, transform 0.3s';
newCard.style.opacity = '1';
newCard.style.transform = 'translateY(0)';
}, 100);
// Add event listener to new join button
newCard.querySelector('.join-btn').addEventListener('click', function() {
alert('Join request sent!');
this.textContent = 'Request Sent';
this.style.backgroundColor = '#27ae60';
this.disabled = true;
});
// Clear input and hide success message after delay
input.value = '';
setTimeout(() => {
successMessage.style.display = 'none';
}, 3000);
});
// Add event listeners to existing join buttons
document.querySelectorAll('.join-btn').forEach(button => {
button.addEventListener('click', function() {
const teamName = this.parentElement.parentElement.querySelector('.team-name').textContent;
const role = this.parentElement.parentElement.querySelector('.role-tag').textContent;
alert(`Join request sent to ${teamName} for ${role} position!`);
// Change button state
this.textContent = 'Request Sent';
this.style.backgroundColor = '#27ae60';
this.disabled = true;
});
});
// Auto-resize textarea
document.getElementById('requirementInput').addEventListener('input', function() {
this.style.height = 'auto';
this.style.height = Math.max(120, this.scrollHeight) + 'px';
});
// Add entrance animation for existing cards
window.addEventListener('load', function() {
const cards = document.querySelectorAll('.requirement-card');
cards.forEach((card, index) => {
card.style.opacity = '0';
card.style.transform = 'translateY(20px)';
setTimeout(() => {
card.style.transition = 'opacity 0.6s, transform 0.6s';
card.style.opacity = '1';
card.style.transform = 'translateY(0)';
}, index * 200 + 500);
});
});
</script>
</body>
</html>, initial-scale=1.0">
<title>Document</title>
</head>
<body>
</body>
</html>