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
2cb6cce1
Commit
2cb6cce1
authored
May 19, 2023
by
isstuev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change layout
parent
b171266c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
37 deletions
+39
-37
Footer.tsx
ui/snippets/footer/Footer.tsx
+38
-36
FooterLinkItem.tsx
ui/snippets/footer/FooterLinkItem.tsx
+1
-1
No files found.
ui/snippets/footer/Footer.tsx
View file @
2cb6cce1
import
{
Box
,
Grid
,
Flex
,
Text
,
Stack
,
Link
,
VStack
,
Skeleton
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Grid
,
Flex
,
Text
,
Link
,
VStack
,
Skeleton
}
from
'
@chakra-ui/react
'
;
import
{
useQuery
}
from
'
@tanstack/react-query
'
;
import
{
useQuery
}
from
'
@tanstack/react-query
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
...
@@ -74,8 +74,8 @@ const Footer = () => {
...
@@ -74,8 +74,8 @@ const Footer = () => {
});
});
return
(
return
(
<
Stack
direction=
{
{
base
:
'
column
'
,
lg
:
'
row
'
}
}
p=
{
{
base
:
4
,
lg
:
9
}
}
gap=
{
{
base
:
6
,
lg
:
12
}
}
borderTop=
"1px solid"
borderColor=
"divider"
>
<
Flex
direction=
{
{
base
:
'
column
'
,
lg
:
'
row
'
}
}
p=
{
{
base
:
4
,
lg
:
9
}
}
borderTop=
"1px solid"
borderColor=
"divider"
>
<
Box
flexGrow=
"1"
mb=
{
{
base
:
2
,
lg
:
0
}
}
>
<
Box
flexGrow=
"1"
mb=
{
{
base
:
6
,
lg
:
12
}
}
>
<
Flex
>
<
Flex
>
<
ColorModeToggler
/>
<
ColorModeToggler
/>
<
NetworkAddToWallet
ml=
{
8
}
/>
<
NetworkAddToWallet
ml=
{
8
}
/>
...
@@ -98,11 +98,12 @@ const Footer = () => {
...
@@ -98,11 +98,12 @@ const Footer = () => {
</
Text
>
</
Text
>
)
}
)
}
</
Box
>
</
Box
>
<
Box
minW=
{
{
base
:
'
auto
'
,
lg
:
appConfig
.
footerLinks
?
'
160px
'
:
'
auto
'
}
}
>
<
Grid
gap=
{
{
base
:
6
,
lg
:
12
}
}
gridTemplateColumns=
{
{
base
:
'
repeat(auto-fill, 160px)
'
,
lg
:
'
repeat(4, 160px)
'
}
}
>
<
Box
minW=
"160px"
w=
{
appConfig
.
footerLinks
?
'
160px
'
:
'
100%
'
}
>
{
appConfig
.
footerLinks
&&
<
Text
fontWeight=
{
500
}
mb=
{
3
}
>
Blockscout
</
Text
>
}
{
appConfig
.
footerLinks
&&
<
Text
fontWeight=
{
500
}
mb=
{
3
}
>
Blockscout
</
Text
>
}
<
Grid
<
Grid
gap=
{
2
}
gap=
{
2
}
gridTemplateColumns=
{
{
base
:
'
160px
'
,
lg
:
appConfig
.
footerLinks
?
'
160px
'
:
'
repeat(3, 160px)
'
}
}
gridTemplateColumns=
{
appConfig
.
footerLinks
?
'
160px
'
:
{
base
:
'
repeat(auto-fill, 160px)
'
,
lg
:
'
repeat(3, 160px)
'
}
}
gridTemplateRows=
{
{
base
:
'
auto
'
,
lg
:
appConfig
.
footerLinks
?
'
auto
'
:
'
repeat(2, auto)
'
}
}
gridTemplateRows=
{
{
base
:
'
auto
'
,
lg
:
appConfig
.
footerLinks
?
'
auto
'
:
'
repeat(2, auto)
'
}
}
gridAutoFlow=
{
{
base
:
'
row
'
,
lg
:
appConfig
.
footerLinks
?
'
row
'
:
'
column
'
}
}
gridAutoFlow=
{
{
base
:
'
row
'
,
lg
:
appConfig
.
footerLinks
?
'
row
'
:
'
column
'
}
}
mt=
{
{
base
:
0
,
lg
:
appConfig
.
footerLinks
?
0
:
'
100px
'
}
}
mt=
{
{
base
:
0
,
lg
:
appConfig
.
footerLinks
?
0
:
'
100px
'
}
}
...
@@ -112,7 +113,7 @@ const Footer = () => {
...
@@ -112,7 +113,7 @@ const Footer = () => {
</
Box
>
</
Box
>
{
appConfig
.
footerLinks
&&
isLoading
&&
(
{
appConfig
.
footerLinks
&&
isLoading
&&
(
Array
.
from
(
Array
(
3
)).
map
((
i
,
index
)
=>
(
Array
.
from
(
Array
(
3
)).
map
((
i
,
index
)
=>
(
<
Box
minW=
{
{
base
:
'
auto
'
,
lg
:
'
160px
'
}
}
key=
{
index
}
>
<
Box
minW=
"160px"
key=
{
index
}
>
<
Skeleton
w=
"120px"
h=
"20px"
mb=
{
6
}
/>
<
Skeleton
w=
"120px"
h=
"20px"
mb=
{
6
}
/>
<
VStack
spacing=
{
4
}
alignItems=
"start"
mb=
{
2
}
>
<
VStack
spacing=
{
4
}
alignItems=
"start"
mb=
{
2
}
>
{
Array
.
from
(
Array
(
5
)).
map
((
i
,
index
)
=>
<
Skeleton
w=
"160px"
h=
"14px"
key=
{
index
}
/>)
}
{
Array
.
from
(
Array
(
5
)).
map
((
i
,
index
)
=>
<
Skeleton
w=
"160px"
h=
"14px"
key=
{
index
}
/>)
}
...
@@ -122,7 +123,7 @@ const Footer = () => {
...
@@ -122,7 +123,7 @@ const Footer = () => {
)
}
)
}
{
appConfig
.
footerLinks
&&
data
&&
(
{
appConfig
.
footerLinks
&&
data
&&
(
data
.
slice
(
0
,
3
).
map
(
linkGroup
=>
(
data
.
slice
(
0
,
3
).
map
(
linkGroup
=>
(
<
Box
minW=
{
{
base
:
'
auto
'
,
lg
:
'
160px
'
}
}
key=
{
linkGroup
.
title
}
>
<
Box
minW=
"160px"
key=
{
linkGroup
.
title
}
>
<
Text
fontWeight=
{
500
}
mb=
{
3
}
>
{
linkGroup
.
title
}
</
Text
>
<
Text
fontWeight=
{
500
}
mb=
{
3
}
>
{
linkGroup
.
title
}
</
Text
>
<
VStack
spacing=
{
2
}
alignItems=
"start"
>
<
VStack
spacing=
{
2
}
alignItems=
"start"
>
{
linkGroup
.
links
.
map
(
link
=>
<
FooterLinkItem
{
...
link
}
key=
{
link
.
text
}
/>)
}
{
linkGroup
.
links
.
map
(
link
=>
<
FooterLinkItem
{
...
link
}
key=
{
link
.
text
}
/>)
}
...
@@ -130,7 +131,8 @@ const Footer = () => {
...
@@ -130,7 +131,8 @@ const Footer = () => {
</
Box
>
</
Box
>
))
))
)
}
)
}
</
Stack
>
</
Grid
>
</
Flex
>
);
);
};
};
...
...
ui/snippets/footer/FooterLinkItem.tsx
View file @
2cb6cce1
...
@@ -12,7 +12,7 @@ const FooterLinkItem = ({ icon, iconSize, text, url }: Props) => {
...
@@ -12,7 +12,7 @@ const FooterLinkItem = ({ icon, iconSize, text, url }: Props) => {
const
textColor
=
useColorModeValue
(
'
gray.600
'
,
'
gray.500
'
);
const
textColor
=
useColorModeValue
(
'
gray.600
'
,
'
gray.500
'
);
return
(
return
(
<
Link
href=
{
url
}
display=
"flex"
alignItems=
"center"
h=
{
6
}
color=
{
textColor
}
>
<
Link
href=
{
url
}
display=
"flex"
alignItems=
"center"
h=
{
6
}
color=
{
textColor
}
target=
"_blank"
>
{
icon
&&
(
{
icon
&&
(
<
Center
minW=
{
6
}
mr=
"6px"
>
<
Center
minW=
{
6
}
mr=
"6px"
>
<
Icon
boxSize=
{
iconSize
||
5
}
as=
{
icon
}
/>
<
Icon
boxSize=
{
iconSize
||
5
}
as=
{
icon
}
/>
...
...
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