Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PortalMEC-React
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Harbor Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PortalMEC
PortalMEC-React
Commits
7333c7b2
Commit
7333c7b2
authored
4 years ago
by
lfr20
Browse files
Options
Downloads
Patches
Plain Diff
Centered logo and serch tab into drawer
parent
92b1755a
No related branches found
No related tags found
4 merge requests
!57
Merge of develop into master
,
!56
Fixed buttons reportar, seguir, compartilhar, guardar and entrar (in comments...
,
!39
Update admin system
,
!36
Fix perfil into develop
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Components/MenuBarMobile.js
+23
-39
23 additions, 39 deletions
src/Components/MenuBarMobile.js
src/Components/MobileDrawerMenu.js
+1
-1
1 addition, 1 deletion
src/Components/MobileDrawerMenu.js
with
24 additions
and
40 deletions
src/Components/MenuBarMobile.js
+
23
−
39
View file @
7333c7b2
...
@@ -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
>
<
/
d
iv
>
<
/
DrawerButtonD
iv
>
<
/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
This diff is collapsed.
Click to expand it.
src/Components/MobileDrawerMenu.js
+
1
−
1
View file @
7333c7b2
...
@@ -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*/}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment