Spaces:
Running
Running
generate the topics from resours making it works - Follow Up Deployment
Browse files- index.html +38 -4
index.html
CHANGED
@@ -168,8 +168,16 @@
|
|
168 |
|
169 |
<div class="bg-white rounded-xl shadow-md p-6 mb-6">
|
170 |
<h2 class="text-xl font-bold text-dark mb-4 heading">Premium Resources</h2>
|
171 |
-
<div class="
|
172 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
<div class="bg-primary bg-opacity-10 p-2 rounded-lg">
|
174 |
<i class="fas fa-book-medical text-primary text-lg"></i>
|
175 |
</div>
|
@@ -178,7 +186,7 @@
|
|
178 |
<div class="text-sm text-gray-600 mt-1">Comprehensive review</div>
|
179 |
</div>
|
180 |
</a>
|
181 |
-
<a href="#" class="flex items-center p-3 hover:bg-gray-50 rounded-lg transition">
|
182 |
<div class="bg-accent bg-opacity-10 p-2 rounded-lg">
|
183 |
<i class="fas fa-book-open text-accent text-lg"></i>
|
184 |
</div>
|
@@ -187,7 +195,7 @@
|
|
187 |
<div class="text-sm text-gray-600 mt-1">Practical guidance</div>
|
188 |
</div>
|
189 |
</a>
|
190 |
-
<a href="#" class="flex items-center p-3 hover:bg-gray-50 rounded-lg transition">
|
191 |
<div class="bg-success bg-opacity-10 p-2 rounded-lg">
|
192 |
<i class="fas fa-heartbeat text-success text-lg"></i>
|
193 |
</div>
|
@@ -590,6 +598,32 @@
|
|
590 |
</footer>
|
591 |
|
592 |
<script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
593 |
// Tab functionality
|
594 |
document.getElementById('overviewTab').addEventListener('click', function() {
|
595 |
openTab('overviewSection');
|
|
|
168 |
|
169 |
<div class="bg-white rounded-xl shadow-md p-6 mb-6">
|
170 |
<h2 class="text-xl font-bold text-dark mb-4 heading">Premium Resources</h2>
|
171 |
+
<div class="flex flex-wrap gap-2 mb-4">
|
172 |
+
<button class="filter-btn px-3 py-1 text-sm rounded-full bg-primary text-white" data-filter="all">All</button>
|
173 |
+
<button class="filter-btn px-3 py-1 text-sm rounded-full bg-gray-200 hover:bg-gray-300" data-filter="cardiology">Cardiology</button>
|
174 |
+
<button class="filter-btn px-3 py-1 text-sm rounded-full bg-gray-200 hover:bg-gray-300" data-filter="pathology">Pathology</button>
|
175 |
+
<button class="filter-btn px-3 py-1 text-sm rounded-full bg-gray-200 hover:bg-gray-300" data-filter="general">General</button>
|
176 |
+
<button class="filter-btn px-3 py-1 text-sm rounded-full bg-gray-200 hover:bg-gray-300" data-filter="book">Books</button>
|
177 |
+
<button class="filter-btn px-3 py-1 text-sm rounded-full bg-gray-200 hover:bg-gray-300" data-filter="video">Videos</button>
|
178 |
+
</div>
|
179 |
+
<div class="space-y-4" id="resourcesList">
|
180 |
+
<a href="#" class="resource-item flex items-center p-3 hover:bg-gray-50 rounded-lg transition" data-topic="cardiology" data-type="book">
|
181 |
<div class="bg-primary bg-opacity-10 p-2 rounded-lg">
|
182 |
<i class="fas fa-book-medical text-primary text-lg"></i>
|
183 |
</div>
|
|
|
186 |
<div class="text-sm text-gray-600 mt-1">Comprehensive review</div>
|
187 |
</div>
|
188 |
</a>
|
189 |
+
<a href="#" class="resource-item flex items-center p-3 hover:bg-gray-50 rounded-lg transition" data-topic="general" data-type="handbook">
|
190 |
<div class="bg-accent bg-opacity-10 p-2 rounded-lg">
|
191 |
<i class="fas fa-book-open text-accent text-lg"></i>
|
192 |
</div>
|
|
|
195 |
<div class="text-sm text-gray-600 mt-1">Practical guidance</div>
|
196 |
</div>
|
197 |
</a>
|
198 |
+
<a href="#" class="resource-item flex items-center p-3 hover:bg-gray-50 rounded-lg transition" data-topic="pathology" data-type="video">
|
199 |
<div class="bg-success bg-opacity-10 p-2 rounded-lg">
|
200 |
<i class="fas fa-heartbeat text-success text-lg"></i>
|
201 |
</div>
|
|
|
598 |
</footer>
|
599 |
|
600 |
<script>
|
601 |
+
// Resource filtering functionality
|
602 |
+
document.querySelectorAll('.filter-btn').forEach(btn => {
|
603 |
+
btn.addEventListener('click', function() {
|
604 |
+
// Update active filter button
|
605 |
+
document.querySelectorAll('.filter-btn').forEach(b => {
|
606 |
+
b.classList.remove('bg-primary', 'text-white');
|
607 |
+
b.classList.add('bg-gray-200');
|
608 |
+
});
|
609 |
+
this.classList.remove('bg-gray-200');
|
610 |
+
this.classList.add('bg-primary', 'text-white');
|
611 |
+
|
612 |
+
const filter = this.dataset.filter;
|
613 |
+
const resources = document.querySelectorAll('.resource-item');
|
614 |
+
|
615 |
+
resources.forEach(resource => {
|
616 |
+
if (filter === 'all' ||
|
617 |
+
resource.dataset.topic === filter ||
|
618 |
+
resource.dataset.type === filter) {
|
619 |
+
resource.style.display = 'flex';
|
620 |
+
} else {
|
621 |
+
resource.style.display = 'none';
|
622 |
+
}
|
623 |
+
});
|
624 |
+
});
|
625 |
+
});
|
626 |
+
|
627 |
// Tab functionality
|
628 |
document.getElementById('overviewTab').addEventListener('click', function() {
|
629 |
openTab('overviewSection');
|