diff --git a/src/App.tsx b/src/App.tsx index 875b13fe..fce83ee5 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -7,6 +7,7 @@ import Route from './components/HashRouter/Route' import AboutPage from './components/AboutPage' import SkillSet from './components/AboutPage/SkillSet' import GithubStats from './components/AboutPage/Github' +import Projects from './components/Projects' // import logo from './logo.svg'; // import './App.css'; @@ -23,6 +24,7 @@ function App () { } /> + } /> ) } diff --git a/src/components/Projects/index.tsx b/src/components/Projects/index.tsx new file mode 100644 index 00000000..35f44ae4 --- /dev/null +++ b/src/components/Projects/index.tsx @@ -0,0 +1,99 @@ +import React, { useEffect, useState } from "react" +import "./style.css" +import { LuGitFork, LuGlobe } from "react-icons/lu" +/** + * + * @param param0 + * @returns + */ +export function Card({ title, description, image,alt, Badges, svn_link} : { + title: string , + description: string, + image?: string, + alt?: string, + Badges?: any, + svn_link: string +}) { + return
+{image ? +
{alt
: null} +
+

+{title} + {/*
NEW
*/} +

+

{description}

+
+ {/*
Fashion
+
Products
*/} + {Badges ? Badges : ""} +
+
+
+} +// oh boy i cannot WAIT for myself to add projects in via git +export default function Projects() { + // most projects should be loaded via github + // otherwise they will all be concacted with the github.json file + const [githubData, setGithubData] = useState ([]) +const [translateY, setTranslateY] = useState(0) +// if(translateY > -50) { +// setTimeout(() => { +// setTranslateY(translateY - 10) +// }, 40) +// } + const fetchData = () => { + return Promise.all([fetch(`https://api.github.com/users/NeonGamerBot-QK/repos?per_page=100`) + .then((response) => response.json()),fetch(`https://api.github.com/users/NeonGamerBot-QK/repos?per_page=100?page=2`) + .then((response) => response.json())]) + + .then((data) => + { + // console.log([...data[0], ...data[1]]) + const idsThatAreFound:any = {} + const items = [...data[0], ...data[1]].filter(function(item, pos, self) { + if(idsThatAreFound[item.id]) return false; + idsThatAreFound[item.id] = true + return true; + }) + .filter(e => e.topics.includes('github-include-on-site')) + console.log(items) + //@ts-ignore + setGithubData(items) + }) + } + useEffect (() => { + fetchData() + }, []) + return <> +
+
+ {/* */} +
+

Projects

+ {/*

Provident cupiditate voluptatem et in. Quaerat fugiat ut assumenda excepturi exercitationem quasi. In deleniti eaque aut repudiandae et a id nisi.

+ */} +
+{githubData.map((d: any) => { +return +
+ + +{d.homepage ? + +: null} +
+
+{d.topics.filter((e:string) => !e.includes('github-include-on-site')).map((topic:string) => { + return
{topic}
+})} +
+}/> + +})} +
+
+
+
+ +} \ No newline at end of file diff --git a/src/components/Projects/style.css b/src/components/Projects/style.css new file mode 100644 index 00000000..aaffa296 --- /dev/null +++ b/src/components/Projects/style.css @@ -0,0 +1,13 @@ +.cool-up-animation { +animation: up 1.5s ease-in-out .1s 1; +/* animation: name duration timing-function delay iteration-count direction fill-mode; */ +} +@keyframes up { +0% { + transform: translateY(20%); +} +100% { + transform: translateY(-80%); + +} +} \ No newline at end of file