Skip to content

Commit

Permalink
feat: ideas url and contribution guide for org
Browse files Browse the repository at this point in the history
Signed-off-by: Nishant Mittal <[email protected]>
  • Loading branch information
nishantwrp committed Feb 25, 2023
1 parent 4353683 commit 0c01505
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2 deletions.
42 changes: 41 additions & 1 deletion src/components/org-info.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ import PropTypes from "prop-types"
import "./org-info.css"

import { OutboundLink } from "gatsby-plugin-google-analytics"
import { Divider, Button, Header, Icon, Popup } from "semantic-ui-react"
import {
Divider,
Button,
Header,
Icon,
Popup,
Message,
} from "semantic-ui-react"

const OrgInfo = ({ data }) => {
const years = Object.keys(data.years)
Expand All @@ -29,6 +36,8 @@ const OrgInfo = ({ data }) => {
return <span className="org-info-topic">{topic}</span>
})

const isParticipatingIn2023 = "2023" in data.years

return (
<div className="org-info-container">
<div
Expand All @@ -44,6 +53,37 @@ const OrgInfo = ({ data }) => {
}}
></div>
</div>
{isParticipatingIn2023 && (
<Message color="orange" style={{ margin: "1%" }}>
<Message.Header>
{data.name} is participating in{" "}
<OutboundLink
href={data.years["2023"].projects_url}
rel="noreferrer"
target="_blank"
>
<u>GSoC 2023</u>
</OutboundLink>
. View the{" "}
<OutboundLink
href={data.ideas_url}
rel="noreferrer"
target="_blank"
>
<u>ideas list</u>
</OutboundLink>{" "}
and the{" "}
<OutboundLink
href={data.guide_url}
rel="noreferrer"
target="_blank"
>
<u>contribution guide</u>
</OutboundLink>{" "}
for this organization.
</Message.Header>
</Message>
)}
<div className="org-info-site-container">
<OutboundLink href={data.url} rel="noreferrer" target="_blank">
<Button icon labelPosition="left" color="orange">
Expand Down
5 changes: 4 additions & 1 deletion src/components/projects-graph.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ const ProjectsGraph = ({ data }) => {
}
`)

const years = queryData.filter.years.map(item => item.name).sort()
const years = queryData.filter.years
.map(item => item.name)
.sort()
.filter(item => item != 2023)
const numProjects = []

for (const year of years) {
Expand Down
1 change: 1 addition & 0 deletions src/components/projects-section.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const ProjectsSection = ({ data }) => {
const projectColumns = useBreakpoint().l ? 3 : 4

const projectPanes = Object.entries(data)
.filter(([year, _]) => year != 2023)
.map(([year, yearData]) => {
return {
menuItem: year,
Expand Down

0 comments on commit 0c01505

Please sign in to comment.