This commit is contained in:
2026-02-04 16:25:30 +04:00
parent fa6b4fbff9
commit 74cc476f90
19 changed files with 72 additions and 79 deletions

View File

@@ -50,10 +50,18 @@ export const getProjectStats = () => {
// Get projects by category
export const getProjectsByCategory = (category?: string) => {
let filteredProjects: Project[];
if (!category || category === "all") {
return projectsData;
filteredProjects = projectsData;
} else {
filteredProjects = projectsData.filter((p) => p.category === category);
}
return projectsData.filter((p) => p.category === category);
// Sort by startDate in descending order (newest first)
return filteredProjects.sort((a, b) => {
const dateA = new Date(a.startDate).getTime();
const dateB = new Date(b.startDate).getTime();
return dateB - dateA;
});
};
// Get featured projects

View File

@@ -22,6 +22,7 @@ export interface TimelineItem {
icon?: string; // Iconify icon name
color?: string;
featured?: boolean;
not_pin?: boolean; // If true, exclude from "Current Status" section
}
export const timelineData: TimelineItem[] = Object.entries(timelineModules).map(([path, mod]: [string, any]) => {
@@ -74,7 +75,7 @@ export const getFeaturedTimeline = () => {
// Get current ongoing items
export const getCurrentItems = () => {
return timelineData.filter((item) => !item.endDate);
return timelineData.filter((item) => !item.endDate && !item.not_pin);
};