update projects

This commit is contained in:
DefectingCat
2023-06-27 14:12:05 +08:00
parent 88bdb7fd56
commit d1039a3d47
2 changed files with 31 additions and 19 deletions

View File

@ -1,16 +1,18 @@
import { HiPhoto } from 'react-icons/hi2';
import { PiGitlabLogoSimpleDuotone } from 'react-icons/pi';
import { RiCoreosFill } from 'react-icons/ri';
import {
SiGitea,
SiNextdotjs,
SiRedux,
SiThreedotjs,
SiTsnode,
SiVim,
} from 'react-icons/si';
import { TbBrandRust } from 'react-icons/tb';
import { VscGithubInverted } from 'react-icons/vsc';
import { HiPhoto } from 'react-icons/hi2';
export const iconMap = {
gitea: <SiGitea />,
gitlab: <PiGitlabLogoSimpleDuotone />,
nextjs: <SiNextdotjs />,
github: <VscGithubInverted />,
vim: <SiVim />,
@ -18,10 +20,11 @@ export const iconMap = {
three: <SiThreedotjs />,
photos: <HiPhoto />,
redux: <SiRedux />,
core: <RiCoreosFill />,
rust: <TbBrandRust />,
};
export type Project = {
id: number;
icon?: keyof typeof iconMap;
name: string;
description: string;
@ -30,49 +33,60 @@ export type Project = {
export const projects: Project[] = [
{
id: 0,
icon: 'core',
name: 'Netool UI',
description: 'A tiny GUI for network tool.',
url: 'https://github.com/DefectingCat/v2ray-r',
},
{
icon: 'three',
name: '3d-globe',
description: 'A 3d globe made by three.js.',
url: 'https://github.com/DefectingCat/3d-globe',
},
{
id: 1,
icon: 'nextjs',
name: 'Blog',
description: 'This site.',
url: 'https://github.com/DefectingCat/DefectingCat.github.io',
},
{
id: 2,
icon: 'tsnode',
name: 'Simply FaaS',
description: 'A simply FaaS built with Node.js',
url: 'https://github.com/DefectingCat/simply-fass',
},
{
icon: 'tsnode',
name: 'boring-avatars-services',
description: 'Random avatars.',
url: 'https://github.com/DefectingCat/boring-avatars-services',
},
{
id: 3,
icon: 'tsnode',
name: 'RUA DDNS',
description: 'DDNS Script for DNSPod',
url: 'https://github.com/DefectingCat/rua-ddns',
},
{
id: 4,
icon: 'rust',
name: 'Candy',
description: 'Tiny web server.',
url: 'https://github.com/DefectingCat/candy',
},
{
icon: 'vim',
name: 'Dotfiles',
description: 'Some dotfiles.',
url: 'https://github.com/DefectingCat/dotfiles',
},
{
id: 5,
icon: 'redux',
name: 'RUA-Context',
description: 'A global store for React.',
url: 'https://github.com/rua-plus/rua-context',
},
{
id: 6,
icon: 'three',
name: 'RUA-Three',
description: 'A three.js hooks for React.',
@ -81,14 +95,12 @@ export const projects: Project[] = [
];
export const selfHosts: Project[] = [
{
id: 0,
icon: 'gitea',
name: 'Gitea',
icon: 'gitlab',
name: 'Gitlab',
description: 'Selfhost git.',
url: 'https://git.rua.plus/',
},
{
id: 1,
icon: 'photos',
name: 'Photos',
description: 'Some photos.',

View File

@ -22,9 +22,9 @@ export default function Page() {
'md:grid-cols-2 gap-5'
)}
>
{projects.map((item) => (
{projects.map((item, i) => (
<ProjectCard
key={item.id}
key={i}
icon={iconMap[item.icon ?? 'github']}
project={item}
/>
@ -42,9 +42,9 @@ export default function Page() {
'md:grid-cols-2 gap-5'
)}
>
{selfHosts.map((item) => (
{selfHosts.map((item, i) => (
<ProjectCard
key={item.id}
key={i}
icon={iconMap[item.icon ?? 'github']}
project={item}
/>