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
7a2d5858
Commit
7a2d5858
authored
Mar 15, 2023
by
isstuev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix menu again
parent
3b8c6a27
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
44 deletions
+50
-44
Burger.pw.tsx_default_submenu-1.png
...eader/__screenshots__/Burger.pw.tsx_default_submenu-1.png
+0
-0
NavigationMobile.tsx
ui/snippets/navigation/NavigationMobile.tsx
+50
-44
No files found.
ui/snippets/header/__screenshots__/Burger.pw.tsx_default_submenu-1.png
View replaced file @
3b8c6a27
View file @
7a2d5858
24.1 KB
|
W:
|
H:
14.2 KB
|
W:
|
H:
2-up
Swipe
Onion skin
ui/snippets/navigation/NavigationMobile.tsx
View file @
7a2d5858
...
...
@@ -38,12 +38,19 @@ const NavigationMobile = () => {
const
openedItem
=
mainNavItems
[
openedGroupIndex
];
return
(
<>
<
Box
position=
"relative"
>
<
Flex
position=
"relative"
flexDirection=
"column"
flexGrow=
{
1
}
>
<
Box
display=
"flex"
flexDirection=
"column"
flexGrow=
{
1
}
as=
{
motion
.
div
}
style=
{
{
x
:
mainX
}
}
maxHeight=
{
openedGroupIndex
>
-
1
?
'
100vh
'
:
'
unset
'
}
overflowY=
{
openedGroupIndex
>
-
1
?
'
hidden
'
:
'
unset
'
}
>
<
Box
as=
{
motion
.
nav
}
as=
"nav"
mt=
{
6
}
style=
{
{
x
:
mainX
}
}
>
<
VStack
w=
"100%"
...
...
@@ -62,60 +69,59 @@ const NavigationMobile = () => {
</
Box
>
{
isAuth
&&
(
<
Box
as=
{
motion
.
nav
}
as=
"nav"
mt=
{
6
}
pt=
{
6
}
borderTopWidth=
"1px"
borderColor=
"divider"
style=
{
{
x
:
mainX
}
}
>
<
VStack
as=
"ul"
spacing=
"1"
alignItems=
"flex-start"
>
{
accountNavItems
.
map
((
item
)
=>
<
NavLink
key=
{
item
.
text
}
item=
{
item
}
/>)
}
</
VStack
>
</
Box
>
)
}
{
openedGroupIndex
>=
0
&&
(
<
NavFooter
hasAccount=
{
hasAccount
}
/>
</
Box
>
{
openedGroupIndex
>=
0
&&
(
<
Box
as=
{
motion
.
nav
}
w=
"100%"
mt=
{
6
}
position=
"absolute"
top=
{
0
}
style=
{
{
x
:
subX
}
}
key=
"sub"
>
<
Flex
alignItems=
"center"
px=
{
3
}
py=
{
2.5
}
w=
"100%"
h=
"50px"
onClick=
{
onGroupItemClose
}
mb=
{
1
}
>
<
Icon
as=
{
chevronIcon
}
boxSize=
{
6
}
mr=
{
2
}
color=
{
iconColor
}
/>
<
Text
variant=
"secondary"
fontSize=
"sm"
>
{
mainNavItems
[
openedGroupIndex
].
text
}
</
Text
>
</
Flex
>
<
Box
as=
{
motion
.
nav
}
w=
"100%"
mt=
{
6
}
position=
"absolute"
top=
{
0
}
style=
{
{
x
:
subX
}
}
key=
"sub"
as=
"ul"
>
<
Flex
alignItems=
"center"
px=
{
3
}
py=
{
2.5
}
w=
"100%"
h=
"50px"
onClick=
{
onGroupItemClose
}
mb=
{
1
}
>
<
Icon
as=
{
chevronIcon
}
boxSize=
{
6
}
mr=
{
2
}
color=
{
iconColor
}
/>
<
Text
variant=
"secondary"
fontSize=
"sm"
>
{
mainNavItems
[
openedGroupIndex
].
text
}
</
Text
>
</
Flex
>
<
Box
w=
"100%"
as=
"ul"
>
{
isGroupItem
(
openedItem
)
&&
openedItem
.
subItems
?.
map
(
(
item
,
index
)
=>
Array
.
isArray
(
item
)
?
(
<
Box
key=
{
index
}
w=
"100%"
as=
"ul"
_notLast=
{
{
mb
:
2
,
pb
:
2
,
borderBottomWidth
:
'
1px
'
,
borderColor
:
'
divider
'
,
}
}
>
{
item
.
map
(
subItem
=>
<
NavLink
key=
{
subItem
.
text
}
item=
{
subItem
}
/>)
}
</
Box
>
)
:
<
NavLink
key=
{
item
.
text
}
item=
{
item
}
mb=
{
1
}
/>,
)
}
</
Box
>
{
isGroupItem
(
openedItem
)
&&
openedItem
.
subItems
?.
map
(
(
item
,
index
)
=>
Array
.
isArray
(
item
)
?
(
<
Box
key=
{
index
}
w=
"100%"
as=
"ul"
_notLast=
{
{
mb
:
2
,
pb
:
2
,
borderBottomWidth
:
'
1px
'
,
borderColor
:
'
divider
'
,
}
}
>
{
item
.
map
(
subItem
=>
<
NavLink
key=
{
subItem
.
text
}
item=
{
subItem
}
/>)
}
</
Box
>
)
:
<
NavLink
key=
{
item
.
text
}
item=
{
item
}
mb=
{
1
}
/>,
)
}
</
Box
>
)
}
</
Box
>
<
NavFooter
hasAccount=
{
hasAccount
}
/>
</>
</
Box
>
)
}
</
Flex
>
);
};
...
...
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