Skip to content
Snippets Groups Projects
Commit 7333c7b2 authored by lfr20's avatar lfr20
Browse files

Centered logo and serch tab into drawer

parent 92b1755a
No related branches found
No related tags found
4 merge requests!57Merge of develop into master,!56Fixed buttons reportar, seguir, compartilhar, guardar and entrar (in comments...,!39Update admin system,!36Fix perfil into develop
...@@ -16,17 +16,21 @@ GNU Affero General Public License for more details. ...@@ -16,17 +16,21 @@ GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License 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/>.*/ along with Plataforma Integrada MEC. If not, see <http://www.gnu.org/licenses/>.*/
import React from 'react' import React, { useContext } from 'react'
import MenuIcon from '@material-ui/icons/Menu'; import MenuIcon from '@material-ui/icons/Menu';
import styled from 'styled-components' import styled from 'styled-components'
import { Button } from '@material-ui/core' import { Button } from '@material-ui/core'
import logo from '../img/logo_small.svg' import logo from '../img/logo_small.svg'
import { Link } from 'react-router-dom' import { Link } from 'react-router-dom'
import MobileDrawerMenu from './MobileDrawerMenu'; import MobileDrawerMenu from './MobileDrawerMenu';
import { Store } from '../Store';
export default function MenuBarMobile(props) { export default function MenuBarMobile(props) {
const [drawerOpen, setDrawerStatus] = React.useState(false); const [drawerOpen, setDrawerStatus] = React.useState(false);
const { state, dispatch } = useContext(Store)
const toggleDrawer = (open) => (event) => { const toggleDrawer = (open) => (event) => {
if (event.type === 'keydown' && (event.key === 'Tab' || event.key === 'Shift')) { if (event.type === 'keydown' && (event.key === 'Tab' || event.key === 'Shift')) {
...@@ -42,16 +46,14 @@ export default function MenuBarMobile(props) { ...@@ -42,16 +46,14 @@ export default function MenuBarMobile(props) {
openSignUp={props.openSignUp} openLogin={props.openLogin} openSignUp={props.openSignUp} openLogin={props.openLogin}
/> />
<OuterDiv> <OuterDiv>
<DrawerButtonDiv style={{justifySelf : "flex-start", position : "absolute", left : 0}}> <Button style={{ color: "#00bcd4" }} onClick={toggleDrawer(true)}>
<Button style={{ color: "#00bcd4" }} onClick={toggleDrawer(true)}> <MenuIcon className="icon" />
<MenuIcon className="icon" /> </Button>
</Button> <DrawerButtonDiv>
</DrawerButtonDiv> <Link to={"/"}>
<div className="logo"> <img src={logo} style={{ border: "0", verticalAlign: "middle" }} />
<Link to="/">
<img src={logo} alt={"Plataforma Integrada"} />
</Link> </Link>
</div> </DrawerButtonDiv>
</OuterDiv> </OuterDiv>
</> </>
) )
...@@ -60,40 +62,22 @@ export default function MenuBarMobile(props) { ...@@ -60,40 +62,22 @@ export default function MenuBarMobile(props) {
const OuterDiv = styled.div` const OuterDiv = styled.div`
height : 48px; height : 48px;
width : 100%; width : 100%;
display : flex; ${'' /* position : relative; */}
flex-direction : row; display : flex;
direction : row;
align-items : center; align-items : center;
justify-content : center;
position : relative;
.logo { img {
align-content : center;
justify-self : center;
text-align : center;
img {
height : 38px; height : 38px;
overflow : hidden; overflow : hidden;
} }
}
.icon {
vertical-align : middle !important;
font-weight : normal !important;
font-style : normal !important;
font-size : 24px !important;
line-height : 1 !important;
letter-spacing : normal !important;
text-transform : none !important;
display : inline-block !important;
white-space : nowrap !important;
word-wrap : normal !important;
direction : ltr !important;
padding-right : 2px;
color : inherit !important;
}
` `
const DrawerButtonDiv = styled.div` const DrawerButtonDiv = styled.div`
justify-self : center; height : 38px;
position : absolute; width : 45.55px;
left : 0; position:absolute;
left:0;
right:0;
margin-left:auto;
margin-right:auto;
` `
\ No newline at end of file
...@@ -48,8 +48,8 @@ export default function MobileDrawerMenu (props) { ...@@ -48,8 +48,8 @@ export default function MobileDrawerMenu (props) {
{ name : "Sobre a Plataforma", href : "sobre", icon : <InfoIcon/>}, { name : "Sobre a Plataforma", href : "sobre", icon : <InfoIcon/>},
{ name : "Contato", href : "contato", icon : <MailOutlineIcon/>}, { name : "Contato", href : "contato", icon : <MailOutlineIcon/>},
{ name : "Central de Ajuda", href : "ajuda", icon : <HelpOutlineIcon/>}, { name : "Central de Ajuda", href : "ajuda", icon : <HelpOutlineIcon/>},
{ name: "Busca", href: `/busca?query=${state.search.query}&search_class=${state.search.class}`, icon : <SearchIcon/>},
{ name : "Termos de Uso", href : "termos", icon : <AssignmentIcon/>}, { name : "Termos de Uso", href : "termos", icon : <AssignmentIcon/>},
{ name : "Busca", href : `busca?query=${state.search.query}&search_class=${state.search.class}`, icon : <SearchIcon/> }
] ]
// {/*used in dynamic css selection*/} // {/*used in dynamic css selection*/}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment