feat(projects): add more projects, sort

This commit is contained in:
xHyroM 2023-03-27 18:41:59 +02:00
parent 34c6d2b110
commit 13b76153ab
No known key found for this signature in database
GPG key ID: BE0423F386C436AA

View file

@ -10,6 +10,7 @@ interface Project {
stats?: { stats?: {
forks: number; forks: number;
stars: number; stars: number;
updated_at: Date;
}; };
} }
@ -64,6 +65,26 @@ const projects: Project[] = [
link: "https://github.com/xHyroM/frog", link: "https://github.com/xHyroM/frog",
desc: "Frog is an extremely simple language based on the monkey language.", desc: "Frog is an extremely simple language based on the monkey language.",
}, },
{
name: "lsx",
link: "https://github.com/xHyroM/lsx",
desc: "Lsx is a simple, fast, and easy to use ls implementation in Rust.",
},
{
name: "Slovensko v Grafoch",
link: "https://github.com/xHyroM/slovensko-v-grafoch",
desc: "Slovensko v Grafoch is a website that shows data about Slovakia in graphs.",
},
{
name: "Peddler's Pocket",
link: "https://github.com/xHyroM/peddlerspocket",
desc: "/sell command that allows you to put things into GUI and then sell them by closing",
},
{
name: "Peak Pursuit",
link: "https://github.com/xHyroM/peakpursuit",
desc: "PeakPursuit is a plugin for King of the Hill events that adds a competitive edge to your server gameplay. Conquer the hill and claim the crown!",
},
]; ];
for (const project of projects) { for (const project of projects) {
@ -78,8 +99,13 @@ for (const project of projects) {
project.stats = { project.stats = {
forks: repository.forks, forks: repository.forks,
stars: repository.stargazers_count, stars: repository.stargazers_count,
updated_at: new Date(repository.updated_at),
}; };
} }
projects.sort(
(a, b) => b.stats!.updated_at.getTime() - a.stats!.updated_at.getTime()
);
--- ---
<Layout <Layout