-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1126 from AletheiaFact/supportive-material-page
Supportive material page
- Loading branch information
Showing
23 changed files
with
229 additions
and
10 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"title": "Supportive Materials", | ||
"loggedOutMessage": "You need to login to access the supportive materials.", | ||
"disclaimerFirstParagraph": "When you complete your registration, you will have access to all areas of the AletheiaFact.org platform, including complementary materials, up-to-date fact-checking reports and, of course, our complete Fact-Checking Manual. We offer totally free information and guidance so that you can fight disinformation independently and credibly.", | ||
"disclaimerSecondParagraph": "To find out more about how you can become a fact-checker and publish your reports on the platform, contributing to the Movement on a voluntary basis, please contact us at" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"title": "Materiais de Apoio", | ||
"loggedOutMessage": "Para acessar os materias de apoio é preciso ter uma conta na plataforma.", | ||
"disclaimerFirstParagraph": "Ao finalizar o seu cadastro, você terá acesso a todas as áreas da plataforma AletheiaFact.org, incluindo materiais complementares, relatórios de checagem atualizados e, é claro, ao nosso Manual de Checagem completo. Oferecemos informações e orientações totalmente gratuitas para que você combata a desinformação de forma autônoma e com credibilidade.", | ||
"disclaimerSecondParagraph": "Para saber mais sobre como você pode se tornar um checador de fatos e publicar seus relatórios na plataforma, contribuindo para o Movimento de forma voluntária, entre em contato conosco pelo e-mail:" | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ import { Form } from "antd"; | |
import { useTranslation } from "next-i18next"; | ||
import React from "react"; | ||
|
||
import AletheiaAlert from "../AletheiaAlert"; | ||
import Input from "../AletheiaInput"; | ||
import Button, { ButtonType } from "../Button"; | ||
import InputPassword from "../InputPassword"; | ||
|
@@ -11,6 +12,20 @@ const SignUpForm = ({ onFinish, onFinishFailed, isLoading }) => { | |
|
||
return ( | ||
<div> | ||
<AletheiaAlert | ||
type="info" | ||
message={ | ||
<> | ||
{t("materials:disclaimerFirstParagraph")} <br /> | ||
<br /> | ||
{t("materials:disclaimerSecondParagraph")}{" "} | ||
<a href="email:[email protected]"> | ||
[email protected] | ||
</a> | ||
. | ||
</> | ||
} | ||
/> | ||
<h2>{t("login:signupFormHeader")}</h2> | ||
<Form | ||
name="signUp" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
import { NextPage } from "next"; | ||
import { useTranslation } from "next-i18next"; | ||
import { serverSideTranslations } from "next-i18next/serverSideTranslations"; | ||
import React from "react"; | ||
import { | ||
Card, | ||
CardContent, | ||
CardActions, | ||
Typography, | ||
Button, | ||
} from "@mui/material"; | ||
import { useAtom } from "jotai"; | ||
import { Row, Typography as AntdTypography } from "antd"; | ||
import { isUserLoggedIn } from "../atoms/currentUser"; | ||
import Seo from "../components/Seo"; | ||
import { GetLocale } from "../utils/GetLocale"; | ||
import Image from "next/image"; | ||
|
||
const staticLinks = [ | ||
{ | ||
title: "Manual de Checagem", | ||
description: | ||
"Detalhes sobre como realizar checagens dentro das diretrizes do Movimento Aletheia Fact.", | ||
link: "https://aletheiafact-supportive-materials.s3.amazonaws.com/Manual+de+Checagem.pdf", | ||
image: "/manual-thumb.png", | ||
}, | ||
{ | ||
title: "Linha do tempo da checagem de fatos", | ||
description: | ||
"Infográfico com detalhes da historia da checagem de fatos.", | ||
link: "https://aletheiafact-supportive-materials.s3.amazonaws.com/Poster+Timeline.pdf", | ||
image: "/timeline-thumb.png", | ||
}, | ||
// Add more links as needed | ||
]; | ||
|
||
const SupportiveMaterialsPage: NextPage<{ data: string }> = () => { | ||
const { t } = useTranslation(); | ||
const [isLoggedIn] = useAtom(isUserLoggedIn); | ||
|
||
return ( | ||
<> | ||
<Seo title={t("materials:title")} /> | ||
<Row style={{ width: "100%", textAlign: "center" }}> | ||
<AntdTypography.Title style={{ width: "100%" }}> | ||
{t("materials:title")} | ||
</AntdTypography.Title> | ||
</Row> | ||
<div | ||
style={{ | ||
display: "flex", | ||
flexDirection: "row", | ||
flexWrap: "wrap", | ||
gap: "20px", | ||
justifyContent: "center", | ||
margin: "auto", | ||
maxWidth: "1024px", | ||
padding: "20px", | ||
}} | ||
> | ||
{!isLoggedIn ? ( | ||
<div style={{ marginBottom: "20px" }}> | ||
<Typography variant="h6" gutterBottom> | ||
{t("materials:loggedOutMessage")} | ||
</Typography> | ||
<Button | ||
variant="contained" | ||
color="primary" | ||
href="/login" | ||
style={{ marginRight: "10px" }} | ||
> | ||
{t("menu:loginItem")} | ||
</Button> | ||
<Button | ||
variant="outlined" | ||
color="primary" | ||
href="/sign-up" | ||
> | ||
{t("login:signup")} | ||
</Button> | ||
</div> | ||
) : ( | ||
staticLinks.map( | ||
({ title, description, link, image }, index) => ( | ||
<Card | ||
key={title} | ||
sx={{ | ||
width: { | ||
xs: "100%", | ||
sm: "calc(50% - 20px)", | ||
md: "calc(33.333% - 20px)", | ||
lg: "calc(25% - 20px)", | ||
}, | ||
mb: 5, | ||
}} | ||
> | ||
<div | ||
style={{ | ||
position: "relative", | ||
width: "100%", | ||
height: "140px", | ||
backgroundColor: "#11273a", | ||
}} | ||
> | ||
<Image | ||
src={image} | ||
alt={title} | ||
width={345} // Adjust based on your design needs | ||
height={140} // Adjust based on your design needs | ||
layout="fill" | ||
objectFit="contain" | ||
/> | ||
</div> | ||
<CardContent> | ||
<Typography | ||
gutterBottom | ||
variant="h5" | ||
component="div" | ||
> | ||
{title} | ||
</Typography> | ||
<Typography | ||
variant="body2" | ||
color="text.secondary" | ||
> | ||
{description} | ||
</Typography> | ||
</CardContent> | ||
<CardActions> | ||
<Button | ||
size="small" | ||
href={link} | ||
target="_blank" | ||
> | ||
Download | ||
</Button> | ||
</CardActions> | ||
</Card> | ||
) | ||
) | ||
)} | ||
</div> | ||
</> | ||
); | ||
}; | ||
|
||
export async function getServerSideProps({ query, locale, locales, req }) { | ||
locale = GetLocale(req, locale, locales); | ||
return { | ||
props: { | ||
...(await serverSideTranslations(locale)), | ||
href: req.protocol + "://" + req.get("host") + req.originalUrl, | ||
}, | ||
}; | ||
} | ||
|
||
export default SupportiveMaterialsPage; |