Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
order-management-react
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ascend
order-management-react
Commits
3aeb29ee
Commit
3aeb29ee
authored
May 18, 2021
by
Shanelle Valencia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move header.css to stylesheets folder
parent
98f9ac9b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
89 additions
and
121 deletions
+89
-121
Nav.tsx
src/components/Nav.tsx
+11
-41
index.css
src/index.css
+5
-80
header.css
src/styles/stylesheets/header.css
+73
-0
No files found.
src/components/Nav.tsx
View file @
3aeb29ee
...
...
@@ -7,17 +7,8 @@ import { AccountPage } from 'pages'
import
{
Box
,
Heading
,
Flex
,
Spacer
,
Button
,
Image
,
Avatar
,
HStack
,
Input
}
from
"@chakra-ui/react"
import
AppLogo
from
'../img/logo.png'
import
NisumLogo
from
'../img/nisum.jpeg'
import
'../styles/stylesheets/header.css'
import
{
Drawer
,
DrawerBody
,
DrawerHeader
,
DrawerOverlay
,
DrawerContent
,
DrawerCloseButton
,
useDisclosure
}
from
"@chakra-ui/react"
import
{
Menu
,
MenuButton
,
MenuList
,
...
...
@@ -28,16 +19,17 @@ import {
MenuIcon
,
MenuCommand
,
MenuDivider
,
useDisclosure
}
from
"@chakra-ui/react"
import
{
ChevronDownIcon
}
from
'@chakra-ui/icons'
import
{
ChevronDownIcon
}
from
'@chakra-ui/icons'
const
Nav
=
()
=>
{
const
{
isSignedIn
,
signOut
,
signIn
,
manager
}
=
useGoogleAuth
();
const
handleAuth
=
()
=>
{
isSignedIn
?
signOut
()
:
signIn
();}
const
loginIcon
=
faUser
const
auth
Link
Text
=
useMemo
(()
=>
isSignedIn
?
"Logout"
:
"Login"
,
[
isSignedIn
]);
const
authLinkText
=
useMemo
(()
=>
isSignedIn
?
"Logout"
:
<
FontAwesomeIcon
icon=
{
faUser
}
className=
"user-icon"
/>,
[
isSignedIn
]);
const
auth
Menu
Text
=
useMemo
(()
=>
isSignedIn
?
"Logout"
:
"Login"
,
[
isSignedIn
]);
const
{
isOpen
,
onOpen
,
onClose
}
=
useDisclosure
();
const
btnRef
=
useRef
<
HTMLButtonElement
>
(
null
);
const
userName
=
isSignedIn
?
<
p
>
{
manager
.
firstName
}
{
manager
.
lastName
}
</
p
>
:
null
...
...
@@ -49,55 +41,33 @@ const Nav = () => {
return
(
<
Flex
className=
"header"
justifyContent=
"space-between"
>
<
Box
>
<
Box
paddingTop=
"7px"
paddingLeft=
"3px"
>
<
Image
mt=
"-4px"
src=
{
NisumLogo
}
alt=
"Nisum - Celebrating 20+ years logo"
height=
"45px"
// width="950px"
height=
"40px"
/>
</
Box
>
<
Box
className=
"center-nav"
display=
"-ms-inline-flexbox"
>
<
HStack
>
<
Link
to=
"/"
><
Image
src=
{
AppLogo
}
alt=
"Order Management Console PRO logo"
className=
"logoImg"
/></
Link
>
<
Link
to=
"/"
><
Image
src=
{
AppLogo
}
alt=
"Order Management Console PRO logo"
className=
"logo-img"
/></
Link
>
<
h1
>
Order Management
</
h1
>
{
/* <Link to="/"><h1>Order Management</h1></Link> */
}
</
HStack
>
</
Box
>
{
/* <HStack className="right-nav" spacing="1px">
<Box><button onClick={handleAuth}>{authLinkText}</button></Box>
<Box><button ref={btnRef} onClick={onOpen}>{userIcon}</button></Box>
<Drawer
isOpen={isOpen}
placement="right"
onClose={onClose}
finalFocusRef={btnRef}
>
<DrawerOverlay />
<DrawerContent>
<DrawerCloseButton size="sm"/>
<DrawerHeader align="center" >User Account</DrawerHeader>
<DrawerBody>
<AccountPage />
</DrawerBody>
</DrawerContent>
</Drawer>
</HStack> */
}
<
Box
>
<
Box
marginTop=
"2.9px"
>
<
Menu
>
<
MenuButton
rightIcon=
{
<
ChevronDownIcon
/>
}
onClick=
{
onOpen
}
width=
"300px"
className=
"right-nav
"
>
<
MenuButton
rightIcon=
{
<
ChevronDownIcon
/>
}
onClick=
{
onOpen
}
paddingRight=
"10px
"
>
<
HStack
>
<
span
>
{
userIcon
}
</
span
>
<
span
>
{
userName
}
</
span
>
{
/* <span>{authLinkText}</span> */
}
</
HStack
>
</
MenuButton
>
<
MenuList
>
<
MenuItem
color=
"black"
><
Link
to=
"/orders"
>
Orders
</
Link
></
MenuItem
>
<
MenuItem
color=
"black"
><
Link
to=
"/account"
>
Account
</
Link
></
MenuItem
>
<
MenuItem
color=
"black"
><
button
onClick=
{
handleAuth
}
>
{
auth
Link
Text
}
</
button
></
MenuItem
>
<
MenuItem
color=
"black"
><
button
onClick=
{
handleAuth
}
>
{
auth
Menu
Text
}
</
button
></
MenuItem
>
</
MenuList
>
</
Menu
>
</
Box
>
...
...
src/index.css
View file @
3aeb29ee
index
.css
body
{
margin
:
0
;
font-family
:
-apple-system
,
BlinkMacSystemFont
,
'Segoe UI'
,
'Roboto'
,
'Oxygen'
,
...
...
@@ -39,85 +43,6 @@ body {
/* header */
.header
{
border-top
:
1.5px
solid
rgba
(
80
,
76
,
69
,
0.603
);
background-color
:
#00567D
;
height
:
50px
;
color
:
#EBEBEB
;
}
.header-title
{
margin-left
:
70px
;
margin-top
:
10px
;
}
.header
h1
{
color
:
#EBEBEB
;
}
.header
span
{
color
:
#EBEBEB
;
}
.center-nav
{
padding
:
0
0
0
10px
;
}
.center-nav
p
{
margin-left
:
-250px
;
}
.logoImg
{
width
:
150px
;
height
:
45px
;
}
.left-nav
Link
{
color
:
red
;
}
.right-nav
{
margin-top
:
2.5px
;
}
/* .right-nav button {
background-color: transparent;
margin-right: 15px;
margin-top: 4px;
} */
/* .right-nav span {
margin-left: 10px;
margin-right: 25px;
font-weight: 600;
} */
.chakra-stack.right-nav.css-193rmy8
{
margin-bottom
:
50%
;
}
.chakra-menu__menu-button.css-59llwj
{
/* margin-right: 500px; */
width
:
250px
;
}
.nav-link
{
margin-right
:
15px
;
margin-left
:
15px
;
}
/* body */
...
...
@@ -190,7 +115,7 @@ input[type=text]:focus {
/* User
Drawer
*/
/* User
Account
*/
.account
{
padding
:
40px
0
;
...
...
src/styles/stylesheets/header.css
0 → 100644
View file @
3aeb29ee
.header
{
border-top
:
1.5px
solid
rgba
(
80
,
76
,
69
,
0.603
);
background-color
:
#00567D
;
height
:
50px
;
color
:
#EBEBEB
;
}
nisum-logo
{
padding-top
:
55px
;
}
.header
h1
{
color
:
#EBEBEB
;
}
.header
span
{
color
:
#EBEBEB
;
}
.center-nav
{
padding
:
0
0
0
10px
;
margin-left
:
40px
;
}
.center-nav
p
{
margin-left
:
-250px
;
}
.logo-img
{
width
:
150px
;
height
:
45px
;
}
.left-nav
Link
{
color
:
red
;
}
.chakra-stack.right-nav.css-193rmy8
{
margin-bottom
:
50%
;
}
.chakra-menu__menu-button.css-59llwj
{
width
:
250px
;
}
.chakra-menu__menu-button.right-nav.css-1sdauq3
{
font-size
:
30px
;
margin-top
:
8px
;
}
.user-icon
{
font-size
:
20px
;
margin-top
:
9px
;
}
.nav-link
{
margin-right
:
15px
;
margin-left
:
15px
;
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment