Skip to content
This repository has been archived by the owner on May 28, 2023. It is now read-only.

[Feature] collaborations component #203

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/assets/img/graph.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions src/components/Collaborations/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import React, { Component, useEffect, useState } from 'react'
import axios from 'axios'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ao executar o sistema, estamos tendo que instalar essa lib manualmente. É importante verificar o que está causando isso.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Captura de tela de 2023-01-10 20-31-21

import { Wrapper } from "./styles";
const api = {
baseUrl: "https://api.github.com"
}

export default function Collaborations() {

const [githubData, setGithubData] = useState([]);

useEffect(() => {
axios
.get(api.baseUrl + "/repos/OpenDevUFCG/roadmap-cc/contributors")
.then((res) => {
setGithubData(res.data)
});
}, []);

return (
<>
{githubData.map((contributorData) => (
<Wrapper>
<a href={`https://github.com/${contributorData.login}`} target="_blank">
<img
key={contributorData.login}
src={contributorData.avatar_url}
alt={contributorData.login}
style={{ width: 64, borderRadius: 40}}
/>
</a>
</Wrapper>
))}
</>
);

};
6 changes: 6 additions & 0 deletions src/components/Collaborations/styles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import styled from "styled-components";

export const Wrapper = styled.div`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

É legal adicionar algumas animações no hover, como:
&:hover { transition: transform 0.3s ease; transform: scale(1.02);

margin-right: 1vw;

`;
7 changes: 7 additions & 0 deletions src/i18n/locales/pt-br.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
"home": "Home",
"trails": "Trilhas",
"about": "Sobre nós"
},
"about": {
"mainTitle": "Sobre nós",
"firstPartDescription": "Cada trilha representa quais cadeiras você vai pagar para focar em uma determinada área mas, claro, isso não significa que você deve pagar elas se não você não vai ser um verdadeiro engenherio de software ou ciêntista de dados, elas servem como um guia, mas no final das contas você faz o seu caminho nesse curso.",
"secondPartDescription": "O Roadmap é um projeto da <strong>OpenDevUFCG</strong> que nasceu da necessidade descrever melhor as oportunidades que o curso pode oferecer, mostrando as disciplinas em um sistema de trilhas para que você consiga atuar em uma área específica da sua escolha.",
"collaborationsTitle": "Contribuidores",
"collaborationsDescription": "Aqueles que fizeram esse projeto acontecer desde o início até o que ele é hoje e que, portanto, merecem serem reconhecidos e agradecidos por todo o tempo e o esforço investidos nesse projeto. São vocês que movem a cultura <strong>open source</strong> dentro desse curso e que realmente fazem ela acontecer!"
}
}
}
41 changes: 41 additions & 0 deletions src/pages/about/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import React, { useEffect } from 'react'
import { useTranslation, Trans } from 'react-i18next';
import { Header } from '~/components/Header';
import Collaborations from '~/components/Collaborations'
import { About, Texts, Graph, Title, Paragraph, Wrapper, Container } from "./styles";
import graph from '~/assets/img/graph.svg'
import Image from "next/image";

export default function AboutUs() {

const { t } = useTranslation();

return (
<>
<Header/>
<About>
<Texts>
<Wrapper>
<Title>{t("about.mainTitle")}</Title>
<Paragraph>{ t('about.firstPartDescription')}</Paragraph>
<Paragraph>
<Trans i18nKey={'about.secondPartDescription'}/>
</Paragraph>
</Wrapper>
<Graph>
<Image src={graph}/>
</Graph>
</Texts>
<Wrapper>
<Title>{t("about.collaborationsTitle")}</Title>
<Paragraph>
<Trans i18nKey={'about.collaborationsDescription'}/>
</Paragraph>
<Container>
<Collaborations/>
</Container>
</Wrapper>
</About>
</>
)
}
78 changes: 78 additions & 0 deletions src/pages/about/styles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
import styled from "styled-components";

export const About = styled.div`

display: flex;
align-items: center;
flex-direction: column;

@media (max-width: 640px) {
justify-content: center;
}
`;
export const Texts = styled.div`

width: 80vw;
display: flex;
justify-content: space-between;

@media (max-width: 480px) {
flex-direction: column-reverse;
align-items: center;
text-align: center;
}
`;

export const Wrapper = styled.div`

width: 80vw;
text-align: center;
`;

export const Title = styled.div`

font-size: 24px;
color: var(--light-green);
font-weight: bold;

@media (max-width: 480px) {
margin-top: 4vh;
}
`;

export const Paragraph = styled.div`

font-size: 16px;
color: var(--dark-grey);
margin-top: 4vh;
`;

export const Graph = styled.div`

margin-top: 2vh;

`;

export const Contribuitors = styled.div`

width: 80vw;


@media (min-width: 480px) {
margin-top: 4vh;
}

@media (max-width: 480px) {
text-align: center;
}
`;

export const Container = styled.div`

width: 80vw;
height: 28vh;
margin-top: 2%;
display: flex;
flex-wrap: wrap;

`;
1 change: 1 addition & 0 deletions src/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ body {
overflow-x: hidden;

--darker-blue: #002626;
--light-green: #418671;
--dark-blue: #0e4749;
--dark-grey: #292D34;
--green: #95c623;
Expand Down