diff --git a/src/Admin/Components/Components/AdminTemplate.js b/src/Admin/Components/Components/AdminTemplate.js index e0affe5c4b124d0f81166da51626efac58575d62..42be22cd3f334aa5f78e3c991a509b73267a6379 100644 --- a/src/Admin/Components/Components/AdminTemplate.js +++ b/src/Admin/Components/Components/AdminTemplate.js @@ -46,7 +46,7 @@ const AdminTemplate = (props) => { return ( <div style={{ backgroundColor: " #D3D3D3" }}> <AppBarAdmin /> - <div style={{ padding: "2em" }}> + <div> {props.inner} </div> </div> @@ -54,7 +54,7 @@ const AdminTemplate = (props) => { else return ( <div style={{ backgroundColor: " #D3D3D3" }}> - <div style={{ padding: "2em" }}> + <div> <Unauthorized /> </div> </div> diff --git a/src/Admin/Components/Components/Unauthorized.js b/src/Admin/Components/Components/Unauthorized.js index 245a219b46f516a8d6fe7ce5d4ec2a89852f2590..3408a5761c77534efe53f7bbb2dbe6303709eca2 100644 --- a/src/Admin/Components/Components/Unauthorized.js +++ b/src/Admin/Components/Components/Unauthorized.js @@ -16,17 +16,19 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with Plataforma Integrada MEC. If not, see <http://www.gnu.org/licenses/>.*/ -import React, {useState} from 'react'; +import React, {useState, useContext} from 'react'; import SnackBar from '../../../Components/SnackbarComponent'; import { Link } from 'react-router-dom'; import styled from "styled-components"; +import { Store } from '../../../Store' const Unauthorized = () => { + const { state } = useContext(Store); const [openSnack, setOpenSnack] = useState(true); return ( - <div style={{ textAlign: 'center' }}> + <ContentDiv contrast={state.contrast} style={{ textAlign: 'center' }}> <SnackBar severity='warning' text='Você não tem as permissões necessárias' @@ -48,17 +50,25 @@ const Unauthorized = () => { </Link> </StyledDiv> </> - </div> + </ContentDiv> ); } +const ContentDiv = styled('div')` + background-color: ${props => props.contrast === "" ? "white" : "black"} !important; + color: ${props => props.contrast === "" ? "#666" : "white"} !important; + a { + color: ${props => props.contrast === "" ? "" : "yellow"} !important; + text-decoration: ${props => props.contrast === "" ? "none" : "underline yellow"} !important; + } +` + const StyledDiv = styled('div')` width: 100%; - margin-top: 70px; - margin-bottom: 70px; + padding-top: 70px; + padding-bottom: 70px; justify-content : space-evenly; display: flex; - color: #757575; text-align:center; ` diff --git a/src/App.js b/src/App.js index 2b617938aa81efd5aeb0df7b8049bc34f2255a42..f7cd24a6ce05719d4786b050255121f93e8cf198 100644 --- a/src/App.js +++ b/src/App.js @@ -182,16 +182,16 @@ export default function App() { <Header /> <div style={{ - backgroundImage: - "linear-gradient(to right,#ff7f00,#e81f4f,#673ab7,#00bcd4)", - height: "5px", + backgroundImage: + "linear-gradient(to right,#ff7f00,#e81f4f,#673ab7,#00bcd4)", + height: "5px", }} ></div> <link href="https://fonts.googleapis.com/css?family=Kalam|Pompiere|Roboto&display=swap" rel="stylesheet" /> - <Switch> + <Switch style={state.contrast === "" ? {backgroundColor: "white"} : {backgroundColor: "black"}}> <Redirect from="/home" to="/" /> <Route path="/" exact={true} component={Home} /> <Route path="/busca" component={Search} /> @@ -216,8 +216,8 @@ export default function App() { <Route path="/recuperar-senha" component={PasswordRecoveryPage} /> <Route path="/usuario-publico/:userId" component={PublicUserPage} /> <Route - path="/editar-recurso/:recursoId" - component={EditLearningObjectPage} + path="/editar-recurso/:recursoId" + component={EditLearningObjectPage} /> <Route path="/professor" component={PageProfessor} /> <Route path="/upload" component={UploadPage} /> @@ -229,239 +229,240 @@ export default function App() { <Route path="/material-formacao" component={MaterialPage} /> <Route - path="/admin/home" - exact={true} - render={() => { - return <AdminTemplate inner={<Inframe/>}/> - }} + path="/admin/home" + exact={true} + render={() => { + return <AdminTemplate inner={<Inframe/>}/> + }} /> <Route - path="/admin/institutions" - render={() => { - return <AdminTemplate inner={<Institution />}/> - }} + path="/admin/institutions" + render={() => { + return <AdminTemplate inner={<Institution />}/> + }} /> <Route - path="/admin/institution" - render={() => { - return <AdminTemplate inner={<InstitutionCard />}/> - }} + path="/admin/institution" + render={() => { + return <AdminTemplate inner={<InstitutionCard />}/> + }} /> <Route - path="/admin/institutionEdit" - render={() => { - return <AdminTemplate inner={<InstitutionsInput />}/> - }} + path="/admin/institutionEdit" + render={() => { + return <AdminTemplate inner={<InstitutionsInput />}/> + }} /> <Route - path="/admin/InstitutionCreate" - render={() => { - return <AdminTemplate inner={<CreateInstitution />}/> - }} + path="/admin/InstitutionCreate" + render={() => { + return <AdminTemplate inner={<CreateInstitution />}/> + }} /> <Route - path="/admin/noteVars" - render={() => { - return <AdminTemplate inner={<NoteVariables />}/> - }} + path="/admin/noteVars" + render={() => { + return <AdminTemplate inner={<NoteVariables />}/> + }} /> <Route - path="/admin/noteVar" - render={() => { - return <AdminTemplate inner={<NoteVarCard />}/> - }} + path="/admin/noteVar" + render={() => { + return <AdminTemplate inner={<NoteVarCard />}/> + }} /> <Route - path="/admin/noteVarEdit" - render={() => { - return <AdminTemplate inner={<NoteVarInputs />}/> - }} + path="/admin/noteVarEdit" + render={() => { + return <AdminTemplate inner={<NoteVarInputs />}/> + }} /> <Route - path="/admin/languages" - render={() => { - return <AdminTemplate inner={<Languages />}/> - }} + path="/admin/languages" + render={() => { + return <AdminTemplate inner={<Languages />}/> + }} /> <Route - path="/admin/languageEdit" - render={() => { - return <AdminTemplate inner={<EditLanguage />}/> - }} + path="/admin/languageEdit" + render={() => { + return <AdminTemplate inner={<EditLanguage />}/> + }} /> <Route - path="/admin/languageCreate" - render={() => { - return <AdminTemplate inner={<CreateLanguage />}/> - }} + path="/admin/languageCreate" + render={() => { + return <AdminTemplate inner={<CreateLanguage />}/> + }} /> <Route - path="/admin/CommunityQuestions" - render={() => { - return <AdminTemplate inner={<CommunityQuestions />}/> - }} + path="/admin/CommunityQuestions" + render={() => { + return <AdminTemplate inner={<CommunityQuestions />}/> + }} /> <Route - path="/admin/CommunityQuestion" - render={() => { - return <AdminTemplate inner={<CommunityCard />}/> - }} + path="/admin/CommunityQuestion" + render={() => { + return <AdminTemplate inner={<CommunityCard />}/> + }} /> <Route - path="/admin/Collections" - render={() => { - return <AdminTemplate inner={<Collections />}/> - }} + path="/admin/Collections" + render={() => { + return <AdminTemplate inner={<Collections />}/> + }} /> <Route - path="/admin/Collection" - render={() => { - return <AdminTemplate inner={<CollectionCard />}/> - }} + path="/admin/Collection" + render={() => { + return <AdminTemplate inner={<CollectionCard />}/> + }} /> <Route - path="/admin/EditCollection" - render={() => { - return <AdminTemplate inner={<EditCollection />}/> - }} + path="/admin/EditCollection" + render={() => { + return <AdminTemplate inner={<EditCollection />}/> + }} /> <Route - path="/admin/Ratings" - render={() => { - return <AdminTemplate inner={<Ratings />}/> - }} + path="/admin/Ratings" + render={() => { + return <AdminTemplate inner={<Ratings />}/> + }} /> <Route - path="/admin/Rating" - render={() => { - return <AdminTemplate inner={<RatingCard />}/> - }} + path="/admin/Rating" + render={() => { + return <AdminTemplate inner={<RatingCard />}/> + }} /> <Route - path="/admin/EditRating" - render={() => { - return <AdminTemplate inner={<EditRating />}/> - }} + path="/admin/EditRating" + render={() => { + return <AdminTemplate inner={<EditRating />}/> + }} /> <Route - path="/admin/CreateRating" - render={() => { - return <AdminTemplate inner={<CreateRating />}/> - }} + path="/admin/CreateRating" + render={() => { + return <AdminTemplate inner={<CreateRating />}/> + }} /> <Route - path="/admin/Questions" - render={() => { - return <AdminTemplate inner={<Questions />}/> - }} + path="/admin/Questions" + render={() => { + return <AdminTemplate inner={<Questions />}/> + }} /> <Route - path="/admin/CreateQuestion" - render={() => { - return <AdminTemplate inner={<CreateQuestions />}/> - }} + path="/admin/CreateQuestion" + render={() => { + return <AdminTemplate inner={<CreateQuestions />}/> + }} /> <Route - path="/admin/activities" - render={() => { - return <AdminTemplate inner={<Activity />}/> - }} + path="/admin/activities" + render={() => { + return <AdminTemplate inner={<Activity />}/> + }} /> <Route - path="/admin/activity" - render={() => { - return <AdminTemplate inner={<ActivityCard />}/> - }} + path="/admin/activity" + render={() => { + return <AdminTemplate inner={<ActivityCard />}/> + }} /> <Route - path="/admin/learningObjects" - render={() => { - return <AdminTemplate inner={<EducationalObject />}/> - }} + path="/admin/learningObjects" + render={() => { + return <AdminTemplate inner={<EducationalObject />}/> + }} /> <Route - path="/admin/learningObject" - render={() => { - return <AdminTemplate inner={<EducationalObjectCard />}/> - }} + path="/admin/learningObject" + render={() => { + return <AdminTemplate inner={<EducationalObjectCard />}/> + }} /> <Route - path="/admin/learningObjectEdit" - render={() => { - return <AdminTemplate inner={<EducationalObjectEdit />}/> - }} + path="/admin/learningObjectEdit" + render={() => { + return <AdminTemplate inner={<EducationalObjectEdit />}/> + }} /> <Route - path="/admin/complaints" - render={() => { - return <AdminTemplate inner={<Complaints />}/> - }} + path="/admin/complaints" + render={() => { + return <AdminTemplate inner={<Complaints />}/> + }} /> <Route - path="/admin/complaint" - render={() => { - return <AdminTemplate inner={<ComplaintCard />}/> - }} + path="/admin/complaint" + render={() => { + return <AdminTemplate inner={<ComplaintCard />}/> + }} /> <Route - path="/admin/users/teacher_requests" - render={() => { - return <AdminTemplate inner={<AproveTeacher />}/> - }} /> + path="/admin/users/teacher_requests" + render={() => { + return <AdminTemplate inner={<AproveTeacher />}/> + }} + /> <Route - path="/admin/usersList" - render={() => { - return <AdminTemplate inner={<UserList />}/> - }} + path="/admin/usersList" + render={() => { + return <AdminTemplate inner={<UserList />}/> + }} /> <Route - path="/admin/user" - render={() => { - return <AdminTemplate inner={<UserCard />}/> - }} + path="/admin/user" + render={() => { + return <AdminTemplate inner={<UserCard />}/> + }} /> <Route - path="/admin/EditUser" - render={() => { - return <AdminTemplate inner={<EditUser />}/> - }} + path="/admin/EditUser" + render={() => { + return <AdminTemplate inner={<EditUser />}/> + }} /> <Route - path="/admin/permissions" - render={() => { - return <AdminTemplate inner={<UserPermissions />}/> - }} + path="/admin/permissions" + render={() => { + return <AdminTemplate inner={<UserPermissions />}/> + }} /> <Route - path="/admin/EditPermissions" - render={() => { - return <AdminTemplate inner={<EditRole />}/> - }} + path="/admin/EditPermissions" + render={() => { + return <AdminTemplate inner={<EditRole />}/> + }} /> <Route - path="/admin/CreateRole" - render={() => { - return <AdminTemplate inner={<CreateRole />}/> - }} + path="/admin/CreateRole" + render={() => { + return <AdminTemplate inner={<CreateRole />}/> + }} /> <Route - path="/admin/BlockedUsers" - render={() => { - return <AdminTemplate inner={<BlockedUser />}/> - }} + path="/admin/BlockedUsers" + render={() => { + return <AdminTemplate inner={<BlockedUser />}/> + }} /> <Route - path="/admin/sendEmail" - render={() => { - return <AdminTemplate inner={<SendEmail />}/> - }} + path="/admin/sendEmail" + render={() => { + return <AdminTemplate inner={<SendEmail />}/> + }} /> <Route path='*' component={PageNotFound} /> </Switch> {!hideFooter && ( <div> - <EcFooter /> - <GNUAGPLfooter /> + <EcFooter contrast={state.contrast} /> + <GNUAGPLfooter contrast={state.contrast} /> </div> )} </BrowserRouter> diff --git a/src/Components/ContactCardOptions.js b/src/Components/ContactCardOptions.js index 5831b386698c2fcea44b612fffcaaf4e08253355..2a57fafd117cce22616291059e1b65126a484510 100644 --- a/src/Components/ContactCardOptions.js +++ b/src/Components/ContactCardOptions.js @@ -107,8 +107,8 @@ export default function SimpleMenu(props) { {...props}/> } <div style={{fontSize: "12px", display : "flex", flexDirection : "column", justifyContent : "center"}}> - <ButtonNoWidth className={`${props.contrast}BackColor ${props.contrast}LinkColor ${props.contrast}Text`} aria-controls="simple-menu" aria-haspopup="true" onClick={handleClick}> - <MoreVertIcon/> + <ButtonNoWidth aria-controls="simple-menu" aria-haspopup="true" onClick={handleClick}> + <MoreVertIcon className={`${props.contrast}LinkColor ${props.contrast}Text`} /> </ButtonNoWidth> <Menu id="simple-menu" @@ -171,8 +171,6 @@ const ButtonNoWidth = styled(Button)` min-width : 24px !important; max-height : 24px !important; padding : 0 !important; - background-color : #fff !important; - color : #a5a5a5 !important; border : 0 !important; .MuiButton-root { diff --git a/src/Components/GuardarModal.js b/src/Components/GuardarModal.js index bd05df4c8e449441967d739966f445c8b0c1df71..7c45a5a6a4fb48dd3ff0b0a851b01924b8640dee 100644 --- a/src/Components/GuardarModal.js +++ b/src/Components/GuardarModal.js @@ -136,7 +136,7 @@ export default function GuardarModal(props) { <Header> <span style={{ width: "32px" }} /> <h2>Guardar recurso</h2> - <CloseModalButton handleClose={props.handleClose} /> + <CloseModalButton contrast={props.contrast} handleClose={props.handleClose} /> </Header> <Content style={{ paddingTop: "0" }}> <ResourceInfo> @@ -171,7 +171,12 @@ export default function GuardarModal(props) { <h2>Você não possui coleções ainda.</h2> </div> <div style={{ display: "flex", justifyContent: "center" }}> - <CriarColButton className={`${props.contrast}LinkColor ${props.contrast}Border ContrastText`} style={{backgroundColor: props.contrast === "" ? "#673ab7" : "black"}} onClick={() => { setCreating(true) }}>CRIAR COLEÇÃO</CriarColButton> + <CriarColButton className={`${props.contrast}LinkColor ${props.contrast}Border ContrastText`} + style={{backgroundColor: props.contrast === "" ? "#673ab7" : "black"}} + onClick={() => { setCreating(true) }} + > + CRIAR COLEÇÃO + </CriarColButton> </div> </> ) @@ -192,14 +197,24 @@ export default function GuardarModal(props) { } <h5>{collection.name}</h5> </div> - <GuardarBotao className={`${props.contrast}LinkColor ${props.contrast}Border ContrastText`} style={{backgroundColor: props.contrast === "" ? "#673ab7" : "black"}} onClick={() => { postToCol(collection.id) }}>GUARDAR</GuardarBotao> + <GuardarBotao className={`${props.contrast}LinkColor ${props.contrast}Border ContrastText`} + style={{backgroundColor: props.contrast === "" ? "#673ab7" : "black"}} + onClick={() => { postToCol(collection.id) }} + > + GUARDAR + </GuardarBotao> </div> ) } </div> </ChooseCol> <div style={{ display: "flex", justifyContent: "center" }}> - <CriarColButton className={`${props.contrast}LinkColor ${props.contrast}Border ContrastText`} style={{backgroundColor: props.contrast === "" ? "#673ab7" : "black"}} onClick={() => { setCreating(true) }}>CRIAR COLEÇÃO</CriarColButton> + <CriarColButton className={`${props.contrast}LinkColor ${props.contrast}Border ContrastText`} + style={{backgroundColor: props.contrast === "" ? "#673ab7" : "black"}} + onClick={() => { setCreating(true) }} + > + CRIAR COLEÇÃO + </CriarColButton> </div> </> ) @@ -210,9 +225,6 @@ export default function GuardarModal(props) { ) } - <div style={{ display: "flex", justifyContent: "center" }}> - <CriarColButton onClick={() => { setCreating(true) }}>CRIAR COLEÇÃO</CriarColButton> - </div> </Content> </Container> </Fade> diff --git a/src/Components/PurpleButton.js b/src/Components/PurpleButton.js deleted file mode 100644 index 1b57b823d14aedd9bb2604fa0de6b9a4ea73da72..0000000000000000000000000000000000000000 --- a/src/Components/PurpleButton.js +++ /dev/null @@ -1,52 +0,0 @@ -/*Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre -Departamento de Informatica - Universidade Federal do Parana - -This file is part of Plataforma Integrada MEC. - -Plataforma Integrada MEC is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -Plataforma Integrada MEC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with Plataforma Integrada MEC. If not, see <http://www.gnu.org/licenses/>.*/ - -import React from 'react' -import { Button } from '@material-ui/core'; -import styled from 'styled-components' - -export default function PurpleButton (props) { - return ( - <StyledButton onClick={props.callback}> - {props.text} - </StyledButton> - ) -} - -const StyledButton = styled(Button)` - max-height : 36px !important; - background-color : #673ab7 !important; - color : #fff !important; - text-decoration : none !important; - outline : none !important; - text-align : center !important; - - .button-text { - cursor : pointer; - line-height : 36px; - text-align : center; - color : currentColor; - white-space : nowrap; - text-transform : uppercase; - font-weight : 600 !important; - font-size : 14px; - font-style : inherit; - font-variant : inherit; - padding : 6px 16px !important; - } -` diff --git a/src/Components/RedirectModal.js b/src/Components/RedirectModal.js index f826b54ea543053125444fa4ab79d008d67c762f..525e65fae1b6b6ac4e6e023503520c954667710a 100644 --- a/src/Components/RedirectModal.js +++ b/src/Components/RedirectModal.js @@ -27,7 +27,7 @@ import CloseIcon from '@material-ui/icons/Close'; function CloseModalButton (props) { return ( <StyledCloseModalButton onClick={props.handleClose}> - <CloseIcon/> + <CloseIcon style={props.contrast === "" ? { color: "#666" } : { color: "white" }} /> </StyledCloseModalButton> ) } @@ -62,8 +62,8 @@ export default function RedirectModal (props) { }} > <Fade in={props.open}> - <Container> - <CloseModalButton handleClose={props.handleClose}/> + <Container contrast={props.contrast}> + <CloseModalButton contrast={props.contrast} handleClose={props.handleClose}/> <Header> <span style={{width:"32px"}}/> <h2>Você será redirecionado para outro site</h2> @@ -74,8 +74,14 @@ export default function RedirectModal (props) { Lembre-se de que você pode reportar caso considere o conteúdo abusivo/ofensivo ou caso a página não corresponda a descrição apresentada. </div> <section style={{display : "flex", flexDirection : "row", justifyContent : "center"}}> - <ButtonGrey onClick={props.handleClose}>CANCELAR</ButtonGrey> - <a href={props.link} target="_blank" rel="noreferrer noopener" style={{textDecoration : "none !important"}}><ButtonOrange>CONTINUAR</ButtonOrange></a> + <ButtonGrey contrast={props.contrast} onClick={props.handleClose}> + CANCELAR + </ButtonGrey> + <a href={props.link} target="_blank" rel="noreferrer noopener" style={{textDecoration : "none !important"}}> + <ButtonOrange contrast={props.contrast}> + CONTINUAR + </ButtonOrange> + </a> </section> </Content> </Container> @@ -85,10 +91,11 @@ export default function RedirectModal (props) { } const ButtonOrange = styled(Button)` + color: ${props => props.contrast === "" ? "white" : "yellow"} !important; + background-color: ${props => props.contrast === "" ? "#ff7f00" : "black"} !important; + text-decoration: ${props => props.contrast === "" ? "none" : "yellow underline"} !important; + border: ${props => props.contrast === "" ? "none" : "1px solid white"} !important; box-shadow : 0 2px 5px 0 rgba(0,0,0,.26) !important; - background-color : #ff7f00 !important; - color : #fff !important; - text-decoration : none !important; text-transform : uppercase !important; outline : none !important; text-align : center !important; @@ -100,14 +107,15 @@ const ButtonOrange = styled(Button)` const ButtonGrey = styled(Button)` + color: ${props => props.contrast === "" ? "#666" : "yellow"} !important; + background-color: inherit !important; + text-decoration: ${props => props.contrast === "" ? "none" : "yellow underline"} !important; + &:hover { - background-color : rgba(158,158,158,0.2) !important; + background-color : ${props => props.contrast === "" ? "rgba(158,158,158,0.2)" : ""} !important; } margin-top : 5px !important; margin-right : 15px !important; - background-color : transparent !important; - color : #666 !important; - text-decoration : none !important; outline : none !important; text-align : center !important; font-size : 14px !important; @@ -116,7 +124,6 @@ const ButtonGrey = styled(Button)` ` const Content = styled.div` - color : #666; padding : 20px 30px; overflow : visible; text-align : center; @@ -130,7 +137,6 @@ const Header = styled.div` h2 { font-size : 26px; font-weight : lighter; - color : #666 padding : 10px 20px 0 20px; } @@ -150,8 +156,10 @@ const StyledModal = styled(Modal)` ` const Container = styled.div` box-sizing : border-box; + background-color: ${props => props.contrast === "" ? "white" : "black"} !important; + color: ${props => props.contrast === "" ? "#666" : "white"} !important; + border: ${props => props.contrast === "" ? "none" : "1px solid white"} !important; box-shadow : 0 7px 8px -4px rgba(0,0,0,.2),0 13px 19px 2px rgba(0,0,0,.14),0 5px 24px 4px gba(0,0,0,.12); - background-color : white; align : center; display : flex; flex-direction : column; diff --git a/src/Components/ReportModal.js b/src/Components/ReportModal.js index a35f4e4ae308ebea12f65113f8638e827fe69452..ab7a7678870e5fd0075d01d7d4d1943d75f25baf 100644 --- a/src/Components/ReportModal.js +++ b/src/Components/ReportModal.js @@ -100,7 +100,7 @@ export default function ReportModal (props) { <Header> <span style={{width:"32px"}}/> <h2>O que está acontecendo?</h2> - <CloseModalButton handleClose={props.handleClose}/> + <CloseModalButton contrast={props.contrast} handleClose={props.handleClose}/> </Header> <Content> diff --git a/src/Components/TabPanels/PublicUserPageTabs/LastLearnObj.js b/src/Components/TabPanels/PublicUserPageTabs/LastLearnObj.js deleted file mode 100644 index d9adc97e4e36f878a07caa0a0b15e669999f6663..0000000000000000000000000000000000000000 --- a/src/Components/TabPanels/PublicUserPageTabs/LastLearnObj.js +++ /dev/null @@ -1,83 +0,0 @@ -/*Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre -Departamento de Informatica - Universidade Federal do Parana - -This file is part of Plataforma Integrada MEC. - -Plataforma Integrada MEC is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -Plataforma Integrada MEC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with Plataforma Integrada MEC. If not, see <http://www.gnu.org/licenses/>.*/ - -import React from 'react' -import Grid from '@material-ui/core/Grid'; -import ResourceCardFunction from '../../ResourceCardFunction.js' -import NoPub from '../../../img/Pagina_vazia_Sem_publicar.png' -import { HeaderGrid, StyledGrid } from '../StyledComponents.js' -import { NoContent } from './TabInicio.js' - -export default function LastLearnObjs(props) { - return ( - <React.Fragment> - <HeaderGrid container> - <Grid item xs={9}> - <h3>Últimos Recursos Publicados</h3> - </Grid> - </HeaderGrid> - - { - props.count === 0 ? - ( - [ - <Grid container> - <Grid item xs={12}> - <NoContent - image={NoPub} - text1={props.username + " ainda não disponibilizou nenhum recurso."} - text2={"Quando disponibilizar, eles aparecerão aqui."} - /> - </Grid> - </Grid> - ] - ) - : - ( - [ - <StyledGrid container spacing={1} style={{ paddingLeft: "30px", paddingRight: "15px" }}> - { - props.learningObjs.slice(0, 4).map((card) => - <Grid item xs={12} sm={6} md={'auto'} lg={3} key={card.id}> - <ResourceCardFunction - contrast={contrast} - avatar={card.publisher.avatar} - id={card.id} - thumbnail={card.thumbnail} - type={card.object_type ? card.object_type : "Outros"} - title={card.name} - published={card.state === "published" ? true : false} - likeCount={card.likes_count} - liked={card.liked} - rating={card.review_average} - author={card.publisher.name} - tags={card.tags} - href={"/recurso/" + card.id} - downloadableLink={card.default_attachment_location} - - /> - </Grid> - ) - } - </StyledGrid> - ] - ) - } - </React.Fragment> - ) -} diff --git a/src/Components/VerticalRuler.js b/src/Components/VerticalRuler.js deleted file mode 100644 index a84dc1381675d222245eb7097263f385e15c1b10..0000000000000000000000000000000000000000 --- a/src/Components/VerticalRuler.js +++ /dev/null @@ -1,31 +0,0 @@ -/*Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre -Departamento de Informatica - Universidade Federal do Parana - -This file is part of Plataforma Integrada MEC. - -Plataforma Integrada MEC is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -Plataforma Integrada MEC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with Plataforma Integrada MEC. If not, see <http://www.gnu.org/licenses/>.*/ - -import React from 'react'; - - -export default function VerticalRuler(props) { - return ( - <div - style={{ - borderLeft: ''+props.width+'px solid '+props.color, - height:props.height - }}/> - ); -} - diff --git a/src/Pages/PageNotFound.js b/src/Pages/PageNotFound.js index 7e9a5b0ca55aa05bc584bad105e8ebe0f3f306e5..291db6617f7d060ff07bc09a86050a8240cd5cd1 100644 --- a/src/Pages/PageNotFound.js +++ b/src/Pages/PageNotFound.js @@ -16,29 +16,46 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with Plataforma Integrada MEC. If not, see <http://www.gnu.org/licenses/>.*/ -import React from 'react'; +import React, { useContext } from "react"; +import { Store } from '../Store' import styled from "styled-components"; export default function PageNotFound (props) { + const { state } = useContext(Store); + return ( - <div> + <ContentDiv contrast={state.contrast} > <link href="https://fonts.googleapis.com/css?family=Roboto:100,400,500&display=swap" rel="stylesheet" /> - <StyledDiv><span style={{ fontSize: '50px' }}>Desculpe</span></StyledDiv> - <StyledDiv><span style={{ fontSize: '30px' }}>Não foi possível encontrar a página que você está procurando.</span></StyledDiv> - <StyledDiv><a href='/'><span style={{ fontSize: '20px' }}>Voltar para a página inicial</span></a></StyledDiv> - </div> + <StyledDiv> + <span style={{ fontSize: '50px' }}>Desculpe</span> + </StyledDiv> + <StyledDiv> + <span style={{ fontSize: '30px' }}>Não foi possível encontrar a página que você está procurando.</span> + </StyledDiv> + <StyledDiv> + <a href='/'><span style={{ fontSize: '20px' }}>Voltar para a página inicial</span></a> + </StyledDiv> + </ContentDiv> ) } +const ContentDiv = styled('div')` + background-color: ${props => props.contrast === "" ? "white" : "black"} !important; + color: ${props => props.contrast === "" ? "#666" : "white"} !important; + a { + color: ${props => props.contrast === "" ? "" : "yellow"} !important; + text-decoration: ${props => props.contrast === "" ? "none" : "underline yellow"} !important; + } +` + const StyledDiv = styled('div')` width: 100%; - margin-top: 70px; - margin-bottom: 70px; + padding-top: 70px; + padding-bottom: 70px; justify-content : space-evenly; display: flex; - color: #757575; text-align:center; ` \ No newline at end of file