Skip to content

Commit 4ad536b

Browse files
feat: align portal style, integrate ecosystem grid and interactive course explorer with brand identity
1 parent 987b42b commit 4ad536b

3 files changed

Lines changed: 686 additions & 84 deletions

File tree

app.js

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ document.addEventListener('DOMContentLoaded', () => {
131131
setTimeout(() => {
132132
card.innerHTML = `
133133
<div style="text-align: center; padding: 2rem 0;">
134-
<div style="width: 80px; height: 80px; background: rgba(16, 185, 129, 0.1); border: 2px solid var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 2rem; color: var(--primary); font-size: 2.5rem; animation: pulse-glow 2s infinite;">
134+
<div style="width: 80px; height: 80px; background: rgba(98, 196, 49, 0.1); border: 2px solid var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 2rem; color: var(--primary); font-size: 2.5rem; animation: pulse-glow 2s infinite;">
135135
<i class="fa-solid fa-check"></i>
136136
</div>
137137
<h3 style="font-size: 1.8rem; margin-bottom: 1rem; color: var(--text-primary);">Đăng Ký Thành Công!</h3>
@@ -158,20 +158,46 @@ document.addEventListener('DOMContentLoaded', () => {
158158
}
159159
});
160160
}
161+
162+
// 6. Course Tabs Filter Logic
163+
const courseTabs = document.querySelectorAll('.course-tab');
164+
const courseCards = document.querySelectorAll('.course-card');
165+
166+
if (courseTabs.length > 0 && courseCards.length > 0) {
167+
courseTabs.forEach(tab => {
168+
tab.addEventListener('click', () => {
169+
// Toggle active state
170+
courseTabs.forEach(t => t.classList.remove('active'));
171+
tab.classList.add('active');
172+
173+
// Filter logic
174+
const filter = tab.getAttribute('data-filter');
175+
176+
courseCards.forEach(card => {
177+
const category = card.getAttribute('data-category');
178+
if (filter === 'all' || category === filter) {
179+
card.classList.remove('hide');
180+
} else {
181+
card.classList.add('hide');
182+
}
183+
});
184+
});
185+
});
186+
}
161187
});
162188

163189
// Extra style animation definition
164190
const styleSheet = document.createElement("style");
165191
styleSheet.textContent = `
166192
@keyframes pulse-glow {
167193
0% {
168-
box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
194+
box-shadow: 0 0 0 0 rgba(98, 196, 49, 0.4);
169195
}
170196
70% {
171-
box-shadow: 0 0 0 15px rgba(16, 185, 129, 0);
197+
box-shadow: 0 0 0 15px rgba(98, 196, 49, 0);
172198
}
173199
100% {
174-
box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
200+
box-shadow: 0 0 0 0 rgba(98, 196, 49, 0);
175201
}
176202
}
177203
`;

0 commit comments

Comments
 (0)