Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
vicotor
frontend
Commits
e02bba1b
Commit
e02bba1b
authored
Jul 09, 2022
by
tom
Committed by
isstuev
Jul 11, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
navigation in dark mode
parent
30c12294
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
48 additions
and
13 deletions
+48
-13
networks.svg
icons/networks.svg
+1
-1
global.ts
theme/global.ts
+10
-0
index.ts
theme/index.ts
+4
-0
AccountNavLink.tsx
ui/navigation/AccountNavLink.tsx
+6
-3
MainNavLink.tsx
ui/navigation/MainNavLink.tsx
+6
-3
NavFooter.tsx
ui/navigation/NavFooter.tsx
+2
-2
Navigation.tsx
ui/navigation/Navigation.tsx
+4
-4
useColors.ts
ui/navigation/useColors.ts
+15
-0
No files found.
icons/networks.svg
View file @
e02bba1b
<svg
width=
"20"
height=
"20"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
><path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"M0 2.632a2.632 2.632 0 1 1 5.263 0 2.632 2.632 0 0 1-5.263 0Zm7.368 0a2.632 2.632 0 1 1 5.263 0 2.632 2.632 0 0 1-5.263 0Zm10-2.632a2.632 2.632 0 1 0 0 5.263 2.632 2.632 0 0 0 0-5.263ZM0 10a2.632 2.632 0 1 1 5.263 0A2.632 2.632 0 0 1 0 10Zm7.368 0a2.632 2.632 0 1 1 5.263 0 2.632 2.632 0 0 1-5.263 0Zm10-2.632a2.632 2.632 0 1 0 0 5.264 2.632 2.632 0 0 0 0-5.264Zm-2.631 10a2.632 2.632 0 1 1 5.263 0 2.632 2.632 0 0 1-5.263 0ZM2.632 14.737a2.632 2.632 0 1 0 0 5.263 2.632 2.632 0 0 0 0-5.263Zm7.368 0A2.632 2.632 0 1 0 10 20a2.632 2.632 0 0 0 0-5.263Z"
fill=
"#718096"
/></svg>
<svg
width=
"20"
height=
"20"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
><path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"M0 2.632a2.632 2.632 0 1 1 5.263 0 2.632 2.632 0 0 1-5.263 0Zm7.368 0a2.632 2.632 0 1 1 5.263 0 2.632 2.632 0 0 1-5.263 0Zm10-2.632a2.632 2.632 0 1 0 0 5.263 2.632 2.632 0 0 0 0-5.263ZM0 10a2.632 2.632 0 1 1 5.263 0A2.632 2.632 0 0 1 0 10Zm7.368 0a2.632 2.632 0 1 1 5.263 0 2.632 2.632 0 0 1-5.263 0Zm10-2.632a2.632 2.632 0 1 0 0 5.264 2.632 2.632 0 0 0 0-5.264Zm-2.631 10a2.632 2.632 0 1 1 5.263 0 2.632 2.632 0 0 1-5.263 0ZM2.632 14.737a2.632 2.632 0 1 0 0 5.263 2.632 2.632 0 0 0 0-5.263Zm7.368 0A2.632 2.632 0 1 0 10 20a2.632 2.632 0 0 0 0-5.263Z"
fill=
"currentColor"
/></svg>
\ No newline at end of file
\ No newline at end of file
theme/global.ts
0 → 100644
View file @
e02bba1b
import
type
{
StyleFunctionProps
}
from
'
@chakra-ui/theme-tools
'
;
import
{
mode
}
from
'
@chakra-ui/theme-tools
'
;
const
global
=
(
props
:
StyleFunctionProps
)
=>
({
body
:
{
bg
:
mode
(
'
white
'
,
'
black
'
)(
props
),
},
})
export
default
global
;
theme/index.ts
View file @
e02bba1b
...
@@ -5,6 +5,7 @@ import borders from './foundations/borders';
...
@@ -5,6 +5,7 @@ import borders from './foundations/borders';
import
colors
from
'
./foundations/colors
'
;
import
colors
from
'
./foundations/colors
'
;
import
components
from
'
./components/index
'
;
import
components
from
'
./components/index
'
;
import
config
from
'
./config
'
;
import
config
from
'
./config
'
;
import
global
from
'
./global
'
;
const
overrides
=
{
const
overrides
=
{
...
typography
,
...
typography
,
...
@@ -12,6 +13,9 @@ const overrides = {
...
@@ -12,6 +13,9 @@ const overrides = {
colors
,
colors
,
components
,
components
,
config
,
config
,
styles
:
{
global
,
},
}
}
export
default
extendTheme
(
overrides
);
export
default
extendTheme
(
overrides
);
ui/navigation/AccountNavLink.tsx
View file @
e02bba1b
...
@@ -2,6 +2,7 @@ import React from 'react';
...
@@ -2,6 +2,7 @@ import React from 'react';
import
{
Link
,
Icon
,
Text
,
HStack
}
from
'
@chakra-ui/react
'
;
import
{
Link
,
Icon
,
Text
,
HStack
}
from
'
@chakra-ui/react
'
;
import
NextLink
from
'
next/link
'
;
import
NextLink
from
'
next/link
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
useColors
from
'
./useColors
'
;
interface
Props
{
interface
Props
{
pathname
:
string
;
pathname
:
string
;
...
@@ -13,6 +14,8 @@ const AccountNavLink = ({ text, pathname, icon }: Props) => {
...
@@ -13,6 +14,8 @@ const AccountNavLink = ({ text, pathname, icon }: Props) => {
const
router
=
useRouter
();
const
router
=
useRouter
();
const
isActive
=
router
.
pathname
===
pathname
;
const
isActive
=
router
.
pathname
===
pathname
;
const
colors
=
useColors
();
return
(
return
(
<
NextLink
href=
{
pathname
}
passHref
>
<
NextLink
href=
{
pathname
}
passHref
>
<
Link
<
Link
...
@@ -21,9 +24,9 @@ const AccountNavLink = ({ text, pathname, icon }: Props) => {
...
@@ -21,9 +24,9 @@ const AccountNavLink = ({ text, pathname, icon }: Props) => {
w=
"220px"
w=
"220px"
px=
{
4
}
px=
{
4
}
py=
{
2.5
}
py=
{
2.5
}
color=
{
isActive
?
'
blue.700
'
:
'
gray.600
'
}
color=
{
isActive
?
colors
.
text
.
active
:
colors
.
text
.
default
}
bgColor=
{
isActive
?
'
blue.50
'
:
'
transparent
'
}
bgColor=
{
isActive
?
colors
.
bg
.
active
:
colors
.
bg
.
default
}
_hover=
{
{
color
:
'
blue.400
'
}
}
_hover=
{
{
color
:
colors
.
text
.
hover
}
}
borderRadius=
"base"
borderRadius=
"base"
>
>
<
HStack
spacing=
{
3
}
>
<
HStack
spacing=
{
3
}
>
...
...
ui/navigation/MainNavLink.tsx
View file @
e02bba1b
...
@@ -3,6 +3,7 @@ import { Link, Icon, Text, HStack } from '@chakra-ui/react';
...
@@ -3,6 +3,7 @@ import { Link, Icon, Text, HStack } from '@chakra-ui/react';
import
NextLink
from
'
next/link
'
;
import
NextLink
from
'
next/link
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
{
ChevronRightIcon
}
from
'
@chakra-ui/icons
'
import
{
ChevronRightIcon
}
from
'
@chakra-ui/icons
'
import
useColors
from
'
./useColors
'
;
interface
Props
{
interface
Props
{
pathname
:
string
;
pathname
:
string
;
...
@@ -14,6 +15,8 @@ const MainNavLink = ({ text, pathname, icon }: Props) => {
...
@@ -14,6 +15,8 @@ const MainNavLink = ({ text, pathname, icon }: Props) => {
const
router
=
useRouter
();
const
router
=
useRouter
();
const
isActive
=
router
.
pathname
===
pathname
;
const
isActive
=
router
.
pathname
===
pathname
;
const
colors
=
useColors
();
return
(
return
(
<
NextLink
href=
{
pathname
}
passHref
>
<
NextLink
href=
{
pathname
}
passHref
>
<
Link
<
Link
...
@@ -22,10 +25,10 @@ const MainNavLink = ({ text, pathname, icon }: Props) => {
...
@@ -22,10 +25,10 @@ const MainNavLink = ({ text, pathname, icon }: Props) => {
w=
"220px"
w=
"220px"
px=
{
4
}
px=
{
4
}
py=
{
2.5
}
py=
{
2.5
}
color=
{
isActive
?
'
blue.700
'
:
'
gray.600
'
}
color=
{
isActive
?
colors
.
text
.
active
:
colors
.
text
.
default
}
bgColor=
{
isActive
?
'
blue.50
'
:
'
transparent
'
}
bgColor=
{
isActive
?
colors
.
bg
.
active
:
colors
.
bg
.
default
}
_hover=
{
{
color
:
colors
.
text
.
hover
}
}
borderRadius=
"base"
borderRadius=
"base"
_hover=
{
{
color
:
'
blue.400
'
}
}
>
>
<
HStack
justifyContent=
"space-between"
>
<
HStack
justifyContent=
"space-between"
>
<
HStack
spacing=
{
3
}
>
<
HStack
spacing=
{
3
}
>
...
...
ui/navigation/NavFooter.tsx
View file @
e02bba1b
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
{
VStack
,
Text
,
HStack
,
Icon
,
Link
}
from
'
@chakra-ui/react
'
;
import
{
VStack
,
Text
,
HStack
,
Icon
,
Link
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
ghIcon
from
'
../../icons/social/git.svg
'
;
import
ghIcon
from
'
../../icons/social/git.svg
'
;
import
twIcon
from
'
../../icons/social/tweet.svg
'
;
import
twIcon
from
'
../../icons/social/tweet.svg
'
;
...
@@ -20,7 +20,7 @@ const NavFooter = () => {
...
@@ -20,7 +20,7 @@ const NavFooter = () => {
as=
"footer"
as=
"footer"
spacing=
{
8
}
spacing=
{
8
}
borderTop=
"1px solid"
borderTop=
"1px solid"
borderColor=
"gray.200"
borderColor=
{
useColorModeValue
(
'
gray.200
'
,
'
whiteAlpha.200
'
)
}
paddingTop=
{
8
}
paddingTop=
{
8
}
w=
"100%"
w=
"100%"
alignItems=
"baseline"
alignItems=
"baseline"
...
...
ui/navigation/Navigation.tsx
View file @
e02bba1b
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
{
VStack
,
HStack
,
Icon
}
from
'
@chakra-ui/react
'
;
import
{
VStack
,
HStack
,
Icon
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
AccountNavigation
from
'
./AccountNavigation
'
;
import
AccountNavigation
from
'
./AccountNavigation
'
;
import
MainNavigation
from
'
./MainNavigation
'
;
import
MainNavigation
from
'
./MainNavigation
'
;
...
@@ -14,14 +14,14 @@ const Navigation = () => {
...
@@ -14,14 +14,14 @@ const Navigation = () => {
alignItems=
"flex-start"
alignItems=
"flex-start"
spacing=
{
12
}
spacing=
{
12
}
borderRight=
"1px solid"
borderRight=
"1px solid"
borderColor=
"gray.200"
borderColor=
{
useColorModeValue
(
'
gray.200
'
,
'
whiteAlpha.200
'
)
}
px=
{
10
}
px=
{
10
}
py=
{
12
}
py=
{
12
}
width=
"300px"
width=
"300px"
>
>
<
HStack
as=
"header"
justifyContent=
"space-between"
w=
"100%"
px=
{
4
}
mb=
{
2
}
h=
{
10
}
alignItems=
"center"
>
<
HStack
as=
"header"
justifyContent=
"space-between"
w=
"100%"
px=
{
4
}
mb=
{
2
}
h=
{
10
}
alignItems=
"center"
>
<
Icon
as=
{
logoIcon
}
width=
"142px"
height=
"26px"
color=
"blue.600"
/>
<
Icon
as=
{
logoIcon
}
width=
"142px"
height=
"26px"
color=
{
useColorModeValue
(
'
blue.600
'
,
'
white
'
)
}
/>
<
Icon
as=
{
networksIcon
}
width=
"20px"
height=
"20px"
/>
<
Icon
as=
{
networksIcon
}
width=
"20px"
height=
"20px"
color=
{
useColorModeValue
(
'
gray.500
'
,
'
white
'
)
}
/>
</
HStack
>
</
HStack
>
<
MainNavigation
/>
<
MainNavigation
/>
<
AccountNavigation
/>
<
AccountNavigation
/>
...
...
ui/navigation/useColors.ts
0 → 100644
View file @
e02bba1b
import
{
useColorModeValue
}
from
'
@chakra-ui/react
'
;
export
default
function
useColors
()
{
return
{
text
:
{
'
default
'
:
useColorModeValue
(
'
gray.600
'
,
'
gray.300
'
),
active
:
useColorModeValue
(
'
blue.700
'
,
'
gray.300
'
),
hover
:
useColorModeValue
(
'
blue.400
'
,
'
gray.100
'
),
},
bg
:
{
'
default
'
:
'
transparent
'
,
active
:
useColorModeValue
(
'
blue.50
'
,
'
gray.900
'
),
},
}
}
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