import Image from "next/image"; import Link from "next/link"; import { Icon } from "@iconify/react"; import { Badge, Card, Typography } from "poyraz-ui/atoms"; import { ImageCard } from "poyraz-ui/molecules"; import { StaggerContainer, StaggerItem } from "@/components/motion-wrapper"; import { FIGMA_TEMPLATES, MOBILE_APPS, WEB_APPS, type ProjectItem } from "@/data/projects"; import { getGithubRepos, getNpmPackages } from "@/lib/project-feeds"; function getLanguageMeta(language: string) { const key = language.toLowerCase(); if (key.includes("typescript")) { return { icon: "vscode-icons:file-type-typescript-official", color: "text-blue-600" }; } if (key.includes("javascript")) { return { icon: "vscode-icons:file-type-js-official", color: "text-amber-500" }; } if (key.includes("python")) { return { icon: "vscode-icons:file-type-python", color: "text-yellow-600" }; } if (key.includes("go")) { return { icon: "vscode-icons:file-type-go", color: "text-cyan-600" }; } if (key.includes("rust")) { return { icon: "vscode-icons:file-type-rust", color: "text-orange-600" }; } if (key.includes("java")) { return { icon: "vscode-icons:file-type-java", color: "text-red-600" }; } if (key.includes("html")) { return { icon: "vscode-icons:file-type-html", color: "text-orange-500" }; } if (key.includes("css")) { return { icon: "vscode-icons:file-type-css", color: "text-blue-500" }; } return { icon: "mdi:code-tags", color: "text-zinc-500" }; } function ProjectSection({ title, items }: { title: string; items: ProjectItem[] }) { return (
{title} {items.map((item) => ( ))}
); } export async function ProjectsContent() { const [repos, npmPackages] = await Promise.all([getGithubRepos(), getNpmPackages()]); return (
poyrazavsever için GitHub katkı grafiği
npm Paketleri (@poyrazavsever)
{npmPackages.length === 0 ? ( npm API yanıtı şu anda boş. ) : ( npmPackages.map((pkg) => ( {pkg.name} {pkg.description}
v{pkg.version}
)) )}
GitHub Repoları (@poyrazavsever)
{repos.length === 0 ? ( GitHub API yanıtı şu anda boş. ) : ( repos.map((repo) => { const languageMeta = getLanguageMeta(repo.language); return ( {repo.name} {repo.description}
{repo.language} {repo.stars}
); }) )}
); }