fix layout mobile

This commit is contained in:
cw
2026-06-04 20:40:37 +07:00
parent 141eeeb629
commit dfc84bcbe9
3 changed files with 94 additions and 74 deletions
+6 -1
View File
@@ -570,13 +570,18 @@ function buildProjFilterOptions() {
function filterProjects() {
const q = projFilter.search.toLowerCase();
return projects.filter(p => {
const result = projects.filter(p => {
const matchSearch = !q || [p.title, p.studentName, p.description, ...p.categories]
.some(s => (s || '').toLowerCase().includes(q));
const matchCat = !projFilter.cat || p.categories.includes(projFilter.cat);
const matchYear = !projFilter.year || String(p.year) === projFilter.year;
return matchSearch && matchCat && matchYear;
});
// Sort descending by year
result.sort((a, b) => (b.year || 0) - (a.year || 0));
return result;
}
function renderProjects() {