forked from shalonjovan/VidyaGyan
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscholarship.html
More file actions
341 lines (309 loc) · 17.9 KB
/
Copy pathscholarship.html
File metadata and controls
341 lines (309 loc) · 17.9 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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Scholarships - VidyaGyan</title>
<!-- Tailwind CSS CDN -->
<script src="https://cdn.tailwindcss.com"></script>
<script src="translate.js"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
body {
font-family: 'Inter', sans-serif;
background-color: #c8d8f0;
}
/* Custom CSS for the Chatbot Button */
#chatbot-button {
position: fixed;
bottom: 50px;
right: 50px;
width: 90px;
height: 90px;
border-radius: 50%;
overflow: hidden;
box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
z-index: 9999;
display: flex;
align-items: center;
justify-content: center;
background-color: #c8d8f0;
cursor: pointer;
transition: all 0.3s ease;
border: 3px solid #6366f1;
}
#chatbot-button:hover {
transform: scale(1.1);
box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}
#chatbot-button img {
width: 90%;
height: 90%;
object-fit: contain;
border-radius: 50%;
}
.scholarship-card {
transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.scholarship-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.filter-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 1rem;
}
</style>
</head>
<body class="bg-gray-100">
<!-- Header Navigation Bar -->
<header class="relative z-20 w-full p-2 flex justify-between items-center text-white bg-gray-900">
<div class="flex items-center space-x-2">
<!-- Mobile Menu Button -->
<button id="menu-btn" class="text-white focus:outline-none md:hidden">
<svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M4 6h16M4 12h16m-7 6h7"></path>
</svg>
</button>
<!-- Logo and Site Name -->
<div class="flex items-center space-x-2">
<a href="index.html">
<img src="./assets/mainlogo.png" alt="VidyaGyan Logo" class="w-10 h-10">
</a>
<span class="text-3xl font-bold text-white">VidyaGyan</span>
</div>
</div>
<!-- Desktop Navigation Links -->
<nav class="hidden md:flex items-center space-x-4 text-base">
<a href="career_paths.html"
class="text-white px-3 py-2 rounded-lg hover:bg-gray-800 transition-colors duration-200">Career Paths</a>
<a href="roadmaps/roadmap.html"
class="text-white px-3 py-2 rounded-lg hover:bg-gray-800 transition-colors duration-200">Roadmaps</a>
<a href="colleges.html"
class="text-white px-3 py-2 rounded-lg hover:bg-gray-800 transition-colors duration-200">Colleges</a>
<a href="exams.html"
class="text-white px-3 py-2 rounded-lg hover:bg-gray-800 transition-colors duration-200">Exams</a>
<a href="resources.html"
class="text-white px-3 py-2 rounded-lg hover:bg-gray-800 transition-colors duration-200">Resources</a>
<a href="study_groups.html"
class="text-white px-3 py-2 rounded-lg hover:bg-gray-800 transition-colors duration-200">Study Groups</a>
<a href="scholarship.html"
class="text-white px-3 py-2 rounded-lg bg-gray-800 transition-colors duration-200 font-bold">Scholarships</a>
</nav>
<!-- Action Buttons (Home, Profile, and For You) -->
<div class="hidden md:flex items-center space-x-4">
<a href="home.html"
class="flex items-center space-x-2 text-white hover:text-gray-200 px-3 py-2 rounded-lg hover:bg-gray-800 transition-colors duration-200">
<!-- Home Icon -->
<img src="assets/home.png" alt="Home" class="w-8 h-8">
</a>
<a href="profile.html"
class="flex items-center space-x-2 text-white hover:text-gray-200 px-3 py-2 rounded-lg hover:bg-gray-800 transition-colors duration-200">
<!-- Profile Icon -->
<img src="assets/profile.jpg" alt="Profile" class="w-8 h-8">
</a>
<a href="foryou.html"
class="text-sm px-6 py-3 rounded-full border-2 border-blue-500 text-blue-500 hover:text-white hover:bg-blue-500 transition-colors duration-300">For You</a>
</div>
</header>
<!-- Chatbot Button -->
<a href="chat.html" id="chatbot-button" title="Chat with us!">
<img src="./assets/images/chat.jpeg" alt="Chatbot" />
</a>
<main class="w-full">
<div class="max-w-7xl mx-auto p-4 sm:p-8">
<div class="text-center mb-10">
<h1 class="text-4xl font-extrabold text-slate-800">Find Scholarships</h1>
<p class="text-lg text-slate-500 mt-2">Explore opportunities to fund your education.</p>
</div>
<div class="bg-white p-6 rounded-xl shadow-md mb-8 sticky top-4 z-10 flex flex-col gap-4">
<div class="w-full">
<input type="text" id="search-input" placeholder="Search by name or provider..." class="w-full px-4 py-3 rounded-lg border-2 border-gray-200 focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<div class="w-full filter-grid">
<select id="level-filter" class="w-full px-4 py-3 rounded-lg border-2 border-gray-200 bg-white focus:outline-none focus:ring-2 focus:ring-blue-500"><option value="">All Levels</option></select>
<select id="type-filter" class="w-full px-4 py-3 rounded-lg border-2 border-gray-200 bg-white focus:outline-none focus:ring-2 focus:ring-blue-500"><option value="">All Types</option></select>
<select id="gender-filter" class="w-full px-4 py-3 rounded-lg border-2 border-gray-200 bg-white focus:outline-none focus:ring-2 focus:ring-blue-500"><option value="">Any Gender</option></select>
<select id="community-filter" class="w-full px-4 py-3 rounded-lg border-2 border-gray-200 bg-white focus:outline-none focus:ring-2 focus:ring-blue-500"><option value="">Any Community</option></select>
<select id="income-filter" class="w-full px-4 py-3 rounded-lg border-2 border-gray-200 bg-white focus:outline-none focus:ring-2 focus:ring-blue-500"><option value="">Any Income</option></select>
<select id="disability-filter" class="w-full px-4 py-3 rounded-lg border-2 border-gray-200 bg-white focus:outline-none focus:ring-2 focus:ring-blue-500"><option value="">Disability Status</option></select>
</div>
</div>
<div id="scholarship-grid" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8"></div>
<div id="no-results" class="hidden text-center py-16">
<p class="text-xl text-slate-500">No scholarships found matching your criteria.</p>
</div>
</div>
</main>
<!-- Footer -->
<footer class="bg-gray-900 text-gray-300 p-6 pt-10 mt-16">
<div class="container mx-auto grid grid-cols-1 md:grid-cols-5 gap-8">
<!-- Logo Column (spans full height) -->
<div class="col-span-1 flex justify-center items-center">
<img src="./assets/mainlogo.png" alt="VidyaGyan Logo" class="w-75 h-60">
</div>
<!-- VidyaGyan Info Column -->
<div class="col-span-1 flex flex-col">
<h3 class="text-white font-bold text-xl mb-2">VidyaGyan</h3>
<p class="text-gray-400 text-sm mb-6">Your all-in-one platform for academic and career guidance.</p>
<div class="mb-4">
<h4 class="text-white font-semibold text-lg mb-2">Blastorz</h4>
<div class="flex space-x-2 items-center mb-2">
<svg class="w-4 h-4 text-gray-400" fill="currentColor" viewBox="0 0 24 24">
<path d="M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6zm-2 0l-8 5-8-5h16zm0 12H4V8l8 5 8-5v10z"/>
</svg>
<a href="mailto:team.blastorz@gmail.com" class="text-gray-400 hover:text-white text-sm transition-colors duration-200">
team.blastorz@gmail.com
</a>
</div>
<div class="flex space-x-2 items-center">
<svg class="w-4 h-4 text-gray-400" fill="currentColor" viewBox="0 0 24 24">
<path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/>
</svg>
<a href="members.html" class="text-gray-400 hover:text-white text-sm transition-colors duration-200">
Team Blastorz Info
</a>
</div>
</div>
</div>
<!-- Navigation Column -->
<div class="col-span-1">
<h4 class="text-white font-semibold text-lg mb-4">Navigation</h4>
<ul class="space-y-3">
<li><a href="home.html" class="text-gray-300 hover:text-white transition-colors duration-200">Home</a></li>
<li><a href="profile.html" class="text-gray-300 hover:text-white transition-colors duration-200">Profile</a></li>
<li><a href="foryou.html" class="text-gray-300 hover:text-white transition-colors duration-200">For You</a></li>
</ul>
</div>
<!-- Resources Column -->
<div class="col-span-1">
<h4 class="text-white font-semibold text-lg mb-4">Resources</h4>
<ul class="space-y-3">
<li><a href="colleges.html" class="text-gray-300 hover:text-white transition-colors duration-200">Colleges</a></li>
<li><a href="career_paths.html" class="text-gray-300 hover:text-white transition-colors duration-200">Career Paths</a></li>
<li><a href="roadmaps/roadmap.html" class="text-gray-300 hover:text-white transition-colors duration-200">Roadmaps</a></li>
<li><a href="exams.html" class="text-gray-300 hover:text-white transition-colors duration-200">Entrance Exams</a></li>
<li><a href="resources.html" class="text-gray-300 hover:text-white transition-colors duration-200">Study Materials</a></li>
<li><a href="scholarship.html" class="text-gray-300 hover:text-white transition-colors duration-200">Scholarships</a></li>
</ul>
</div>
<!-- Community & Account Column -->
<div class="col-span-1">
<h4 class="text-white font-semibold text-lg mb-4">Community & Account</h4>
<ul class="space-y-3">
<li><a href="login.html" class="text-gray-300 hover:text-white transition-colors duration-200">Login</a></li>
<li><a href="signup.html" class="text-gray-300 hover:text-white transition-colors duration-200">Sign Up</a></li>
<li><a href="study_groups.html" class="text-gray-300 hover:text-white transition-colors duration-200">Study Groups</a></li>
</ul>
</div>
</div>
<!-- Copyright -->
<div class="border-t border-gray-700 mt-6 pt-3 text-center">
<p class="text-gray-400 text-sm">
Copyright © 2025 - Team Blastorz 💥
</p>
</div>
</footer>
<script>
document.addEventListener('DOMContentLoaded', () => {
const scholarshipGrid = document.getElementById('scholarship-grid');
const searchInput = document.getElementById('search-input');
const noResults = document.getElementById('no-results');
// Filter elements
const filterSelects = {
level: document.getElementById('level-filter'),
type: document.getElementById('type-filter'),
gender: document.getElementById('gender-filter'),
community: document.getElementById('community-filter'),
income: document.getElementById('income-filter'),
disability: document.getElementById('disability-filter')
};
let allScholarships = [];
async function fetchScholarships() {
try {
const response = await fetch('./scholarships.json');
allScholarships = await response.json();
populateFilters();
renderScholarships(allScholarships);
} catch (error) {
console.error('Failed to fetch scholarships:', error);
scholarshipGrid.innerHTML = `<p class="text-red-500 col-span-full text-center">Could not load scholarship data.</p>`;
}
}
function populateFilters() {
const filtersData = {
level: [...new Set(allScholarships.map(s => s.level))],
type: [...new Set(allScholarships.map(s => s.type))],
gender: [...new Set(allScholarships.map(s => s.gender))],
community: [...new Set(allScholarships.map(s => s.community))],
income: [...new Set(allScholarships.map(s => s.income))],
disability: [...new Set(allScholarships.map(s => s.disability))]
};
for (const key in filtersData) {
filtersData[key].forEach(value => {
const option = document.createElement('option');
option.value = value;
option.textContent = value;
filterSelects[key].appendChild(option);
});
}
}
function renderScholarships(scholarships) {
scholarshipGrid.innerHTML = '';
noResults.classList.toggle('hidden', scholarships.length > 0);
scholarships.forEach(s => {
const card = document.createElement('div');
card.className = 'scholarship-card bg-white p-6 rounded-xl shadow-sm border border-gray-200 flex flex-col';
card.innerHTML = `
<div class="flex-grow">
<h3 class="text-xl font-bold text-slate-800 mb-2">${s.name}</h3>
<p class="text-md font-semibold text-blue-600 mb-4">${s.provider}</p>
<p class="text-sm text-slate-600 mb-4"><span class="font-semibold">Benefits:</span> ${s.benefits}</p>
<div class="flex flex-wrap gap-2 text-sm mb-4">
<span class="bg-blue-100 text-blue-800 px-3 py-1 rounded-full font-medium">${s.level}</span>
<span class="bg-green-100 text-green-800 px-3 py-1 rounded-full font-medium">${s.type}</span>
<span class="bg-yellow-100 text-yellow-800 px-3 py-1 rounded-full font-medium">${s.region}</span>
</div>
<p class="text-sm text-slate-500"><span class="font-semibold">Key Eligibility:</span> ${s.eligibility}</p>
</div>
<div class="mt-6">
<a href="${s.link}" target="_blank" class="block w-full text-center bg-blue-600 text-white font-bold py-3 px-4 rounded-lg hover:bg-blue-700 transition-colors">
Apply Now
</a>
</div>
`;
scholarshipGrid.appendChild(card);
});
}
function applyFilters() {
const searchTerm = searchInput.value.toLowerCase();
const selectedFilters = {
level: filterSelects.level.value,
type: filterSelects.type.value,
gender: filterSelects.gender.value,
community: filterSelects.community.value,
income: filterSelects.income.value,
disability: filterSelects.disability.value
};
const filteredScholarships = allScholarships.filter(s => {
const matchesSearch = s.name.toLowerCase().includes(searchTerm) || s.provider.toLowerCase().includes(searchTerm) || s.eligibility.toLowerCase().includes(searchTerm);
// Check every filter. If a filter is not selected (""), it should pass.
const matchesAllFilters = Object.keys(selectedFilters).every(key => {
return !selectedFilters[key] || s[key] === selectedFilters[key];
});
return matchesSearch && matchesAllFilters;
});
renderScholarships(filteredScholarships);
}
searchInput.addEventListener('keyup', applyFilters);
Object.values(filterSelects).forEach(select => {
select.addEventListener('change', applyFilters);
});
fetchScholarships();
});
</script>
</body>
</html>