Skip to content

Commit

Permalink
integrando as modificações da versão 2.0 na main
Browse files Browse the repository at this point in the history
  • Loading branch information
jesielviana committed Nov 8, 2024
1 parent 19cf959 commit 3b72bbb
Show file tree
Hide file tree
Showing 12 changed files with 398 additions and 240 deletions.
3 changes: 1 addition & 2 deletions public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,5 @@
"Search in the Brazilian Scientific Research Information Ecosystem": "Search in the Brazilian Scientific Research Information Ecosystem",
"BrCris Partners": "BrCris Partners",
"Select an entity": "Select an entity",
"records": "records",
"The Brazilian Scientific Research Information Ecosystem, BrCris, is an aggregator platform that allows retrieving, certifying and visualizing data and information related to the various actors who work in scientific research in the Brazilian context.": "The Brazilian Scientific Research Information Ecosystem, BrCris, is an aggregator platform that allows retrieving, certifying and visualizing data and information related to the various actors who work in scientific research in the Brazilian context."
"records": "records"
}
3 changes: 1 addition & 2 deletions public/locales/pt-BR/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,5 @@
"Search in the Brazilian Scientific Research Information Ecosystem": "Pesquise no Ecossistema de Informação da Pesquisa Científica Brasileira",
"BrCris Partners": "Parceiros do BrCris",
"Select an entity": "Selecione uma entidade",
"records": "registros",
"The Brazilian Scientific Research Information Ecosystem, BrCris, is an aggregator platform that allows retrieving, certifying and visualizing data and information related to the various actors who work in scientific research in the Brazilian context.": "O Ecossistema de Informação da Pesquisa Científica Brasileira, BrCris, é uma plataforma agregadora que permite recuperar, certificar e visualizar dados e informações relativas aos diversos atores que atuam na pesquisa científica do contexto brasileiro."
"records": "registros"
}
2 changes: 1 addition & 1 deletion src/components/gov/barra.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Script from 'next/script';

export default function Barra() {
const barraStyle: CSSProperties = {
// background: '#7F7F7F',
background: '#7F7F7F',
height: '20px',
padding: '0 0 0 10px',
display: 'none',
Expand Down
11 changes: 5 additions & 6 deletions src/components/team/Member.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import { MemberType } from '../../types/Entities';

const Member = ({ name, image, lattes }: MemberType) => {
const Member = ({ name, image, lattes, period }: MemberType) => {
return (
<div className="team-member">
<picture className="d-flex justify-content-center">
<img src={image} alt={`foto de ${name}`} />
</picture>
<h2>{name}</h2>
<p>
<a href={lattes} target="_blank" rel="noreferrer">
CV Lattes
</a>
</p>
<a href={lattes} target="_blank" rel="noreferrer">
CV Lattes
</a>
<span> {period} </span>
</div>
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/pages/about.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function About() {
<title>{`BrCris - ${t('About')}`}</title>
</Head>
<div className="App">
<div className="container page about d-flex align-content-center flex-column">
<div className="container page about tablist d-flex align-content-center flex-column">
<div className="page-title">
<h1>{t('About')}</h1>
</div>
Expand Down
41 changes: 41 additions & 0 deletions src/pages/data-source-info.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { GetStaticProps } from 'next';
import { useTranslation } from 'next-i18next';
import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
import Head from 'next/head';

type Props = {
// Add custom props here
};

export const getStaticProps: GetStaticProps<Props> = async ({ locale }) => ({
props: {
...(await serverSideTranslations(locale ?? 'en', ['navbar', 'common'])),
},
});

export default function DataSourceInfo() {
const { t } = useTranslation(['navbar', 'common']);

return (
<>
<Head>
<title>{`BrCris - ${t('Information about data sources')}`}</title>
</Head>
<div className="App">
<div className="container page d-flex align-content-center flex-column">
<div className="page-title">
<h1>{t('Information about data sources')}</h1>
</div>
<main>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur.
</p>
</main>
</div>
</div>
</>
);
}
81 changes: 69 additions & 12 deletions src/pages/team.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
import Head from 'next/head';
import { useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import membersData from '../../team/members.json';
import currentMembersData from '../../team/current.json';
import egressMembersData from '../../team/egress.json';
import Member from '../components/team/Member';
import { MemberType } from '../types/Entities';

type Props = {
// Add custom props here
};
// or getServerSideProps: GetServerSideProps<Props> = async ({ locale })

export const getStaticProps: GetStaticProps<Props> = async ({ locale }) => ({
props: {
...(await serverSideTranslations(locale ?? 'en', ['navbar', 'common'])),
Expand All @@ -26,14 +27,16 @@ const shuffle = (array: MemberType[]) => {
};

export default function Team() {
const { t } = useTranslation(['navbar', 'common']);
const { t } = useTranslation(['common']);

const [members, setMembers] = useState<MemberType[]>([]);
const [currentMembers, setCurrentMembers] = useState<MemberType[]>([]);
const [egressMembers, setEgessMembers] = useState<MemberType[]>([]);

useEffect(() => {
const result = JSON.stringify(membersData);
const members = JSON.parse(result);
setMembers(members);
const currentMembersDataStr = JSON.stringify(currentMembersData);
setCurrentMembers(JSON.parse(currentMembersDataStr));
const egressMembersDataStr = JSON.stringify(egressMembersData);
setEgessMembers(JSON.parse(egressMembersDataStr));
}, []);

return (
Expand All @@ -42,14 +45,68 @@ export default function Team() {
<title>{`BrCris - ${t('Team')}`}</title>
</Head>
<div className="App">
<div className="container page d-flex align-content-center flex-column">
<div className="container page tablist d-flex align-content-center flex-column">
<div className="page-title">
<h1>{t('Team')}</h1>
</div>
<div className="team">
{shuffle(members).map((member: MemberType, index: number) => (
<Member key={index} image={member.image} name={member.name} lattes={member.lattes} />
))}
<ul className="nav nav-tabs d-flex justify-content-center" id="teamTab" role="tablist">
<li className="nav-item" role="presentation">
<button
className="nav-link active"
id="current-tab"
data-bs-toggle="tab"
data-bs-target="#current"
type="button"
role="tab"
aria-controls="current"
aria-selected="true"
>
{t('Current')}
</button>
</li>
<li className="nav-item" role="presentation">
<button
className="nav-link"
id="egress-tab"
data-bs-toggle="tab"
data-bs-target="#egress"
type="button"
role="tab"
aria-controls="egress"
aria-selected="false"
>
{t('Egress')}
</button>
</li>
</ul>

<div className="tab-content">
<div className="tab-pane active" id="current" role="tabpanel" aria-labelledby="current-tab">
<div className="team">
{shuffle(currentMembers).map((member: MemberType, index: number) => (
<Member
key={index}
image={member.image}
name={member.name}
lattes={member.lattes}
period={member.period}
/>
))}
</div>
</div>
<div className="tab-pane" id="egress" role="tabpanel" aria-labelledby="egress-tab">
<div className="team">
{shuffle(egressMembers).map((member: MemberType, index: number) => (
<Member
key={index}
image={member.image}
name={member.name}
lattes={member.lattes}
period={member.period}
/>
))}
</div>
</div>
</div>
</div>
</div>
Expand Down
35 changes: 21 additions & 14 deletions src/styles/globals.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ body {
font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', 'Noto Sans', 'Liberation Sans', Arial,
sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
color: var(--dark-color);
background-color: var(--dark-color);
background-color: #fcfcfc;
}

h1,
Expand Down Expand Up @@ -641,37 +641,33 @@ footer {
width: 100%;
}

.about {
max-width: 1000px;
}

.about .nav-tabs {
.tablist .nav-tabs {
margin-bottom: 0 !important;
}

.about .nav-tabs .nav-link {
.tablist .nav-tabs .nav-link {
background-color: var(--tabs-color);
color: #fff;
margin: 0 1px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}

.about .nav-tabs .nav-link:hover {
border: 1px solid var(--accent-color);
.tablist .nav-tabs .nav-link:hover {
border: 1px solid var(--secondary-color);
}

.about .nav-tabs .nav-link.active {
.tablist .nav-tabs .nav-link.active {
background-color: #fff;
color: var(--dark-color);
padding: calc(0.5rem + 1px) 1rem;
border: 1px solid var(--accent-color);
border: 1px solid var(--secondary-color);
border-bottom: none;
position: relative;
font-weight: 500;
}

.about .nav-tabs .nav-link.active::after {
.tablist .nav-tabs .nav-link.active::after {
content: '';
width: 100%;
position: absolute;
Expand All @@ -681,11 +677,16 @@ footer {
background-color: #fff;
}

.about .tab-content {
border: 1px solid var(--accent-color);
.tablist .tab-content {
border: 1px solid var(--secondary-color);
padding: 32px;
border-radius: 4px;
}

.about {
max-width: 1000px;
}

.about h2,
.about h3,
.about li,
Expand Down Expand Up @@ -756,6 +757,12 @@ footer {
text-align: center;
}

.team span {
font-size: 0.9rem;
color: var(--text-secondary-color);
margin-top: -5px;
}

.sui-paging {
display: flex;
justify-content: center;
Expand Down
1 change: 1 addition & 0 deletions src/types/Entities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export type MemberType = {
name: string;
image: string;
lattes: string;
period: string;
};

export interface CustomSearchQuery extends SearchQuery {
Expand Down
Loading

0 comments on commit 3b72bbb

Please sign in to comment.