diff --git a/src/pages/contribute.jsx b/src/pages/contribute.jsx index 6b14c4ee..77b44974 100644 --- a/src/pages/contribute.jsx +++ b/src/pages/contribute.jsx @@ -1,10 +1,22 @@ -import React from "react"; +import React, { useMemo } from "react"; import { graphql, Link } from "gatsby"; -import { Row, Col } from "reactstrap"; +import { + Row, + Col, + Card, + CardBody, + CardHeader, + CardSubtitle, + CardTitle, +} from "reactstrap"; +import moment from "moment"; +import { IconContext } from "react-icons"; +import { FaGithub } from "react-icons/fa"; import PostListing from "../components/PostListing/PostListing"; import Section from "../components/Section"; import SEO from "../components/SEO/SEO"; import Layout from "../layout"; +import Tags from "../components/common/Tags"; function GettingStarted({ data }) { function toCardData(project, defaultCover) { @@ -21,6 +33,31 @@ function GettingStarted({ data }) { toCardData(project, defaultCover) ); + const moduleIssues = data.moduleIssues.nodes + .filter((module) => module.issues.nodes.length !== 0) + .flatMap((module) => { + const { name, url: moduleUrl, issues } = module; + return issues.nodes.map((issue) => { + const { title, author, labels, updatedAt, url } = issue; + const { login } = author; + const { nodes } = labels; + const tags = nodes.flatMap((node) => node.name); + return { + module: name, + moduleUrl, + title, + author: login, + tags, + date: updatedAt, + url, + }; + }); + }) + .sort((a, b) => + new Date(a.date).getTime() <= new Date(b.date).getTime() ? 1 : 0 + ); + + const githubIconSize = useMemo(() => ({ size: "4em" }), []); return ( @@ -234,6 +271,16 @@ function GettingStarted({ data }) { +

+ Jump below to our{" "} + + Good First Issues in Module Land + + . +

@@ -325,6 +372,93 @@ function GettingStarted({ data }) { ) : null} +

+ + +

+ Find some of our module-land issues below. If you would like to + work on one of them, start a draft PR for it. You can also view + the full list on{" "} + + GitHub + + . +

+ +
+ + {moduleIssues + .slice(0, 10) + .map(({ module, moduleUrl, title, tags, author, url, date }) => ( + + + + {module} + + + + +
+ + + +
+ + + + {tags ? ( + + + + ) : ( + "" + )} + + {title} + + {author ? ( + + Author: {author} + + ) : ( + "" + )} + {date ? ( + + Last updated on: + {moment(date).format("MMMM DD, YYYY")} + + ) : ( + "" + )} + + +
+
+
+
+ ))} + +
); @@ -349,6 +483,28 @@ export const pageQuery = graphql` } } } + moduleIssues: allTerasologyModule { + nodes { + name + url + issues { + nodes { + id + title + author { + login + } + labels { + nodes { + name + } + } + updatedAt + url + } + } + } + } projectCover: file(name: { eq: "defaultCardcover" }, ext: { eq: ".jpg" }) { childImageSharp { gatsbyImageData