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
62423eec
Commit
62423eec
authored
Jan 20, 2025
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix hero banner
parent
2a51f536
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
117 additions
and
52 deletions
+117
-52
semanticTokens.ts
toolkit/theme/foundations/semanticTokens.ts
+46
-0
button.recipe.ts
toolkit/theme/recipes/button.recipe.ts
+16
-0
HeroBanner.tsx
ui/home/HeroBanner.tsx
+33
-29
Home.tsx
ui/pages/Home.tsx
+13
-13
RewardsButton.tsx
ui/rewards/RewardsButton.tsx
+1
-1
AdBannerContent.tsx
ui/shared/ad/AdBannerContent.tsx
+2
-2
FilterButton.tsx
ui/shared/filters/FilterButton.tsx
+1
-1
RadioButtonGroup.tsx
ui/shared/radioButtonGroup/RadioButtonGroup.tsx
+2
-2
ButtonDesktop.tsx
ui/shared/sort/ButtonDesktop.tsx
+1
-1
AuthModal.tsx
ui/snippets/auth/AuthModal.tsx
+0
-1
UserWalletButton.tsx
ui/snippets/user/wallet/UserWalletButton.tsx
+2
-2
No files found.
toolkit/theme/foundations/semanticTokens.ts
View file @
62423eec
import
type
{
ThemingConfig
}
from
'
@chakra-ui/react
'
;
import
type
{
ThemingConfig
}
from
'
@chakra-ui/react
'
;
import
config
from
'
configs/app
'
;
const
heroBannerButton
=
config
.
UI
.
homepage
.
heroBanner
?.
button
;
const
semanticTokens
:
ThemingConfig
[
'
semanticTokens
'
]
=
{
const
semanticTokens
:
ThemingConfig
[
'
semanticTokens
'
]
=
{
// TODO @tom2drum remove *_hover in favor of conditional selectors
// TODO @tom2drum remove *_hover in favor of conditional selectors
colors
:
{
colors
:
{
...
@@ -34,6 +38,48 @@ const semanticTokens: ThemingConfig['semanticTokens'] = {
...
@@ -34,6 +38,48 @@ const semanticTokens: ThemingConfig['semanticTokens'] = {
DEFAULT
:
{
value
:
{
_light
:
'
{colors.gray.300}
'
,
_dark
:
'
{colors.gray.600}
'
}
},
DEFAULT
:
{
value
:
{
_light
:
'
{colors.gray.300}
'
,
_dark
:
'
{colors.gray.600}
'
}
},
},
},
},
},
hero
:
{
bg
:
{
DEFAULT
:
{
value
:
{
_light
:
heroBannerButton
?.
_default
?.
background
?.[
0
]
||
'
{colors.blue.600}
'
,
_dark
:
heroBannerButton
?.
_default
?.
background
?.[
1
]
||
heroBannerButton
?.
_default
?.
background
?.[
0
]
||
'
{colors.blue.600}
'
,
},
},
hover
:
{
value
:
{
_light
:
heroBannerButton
?.
_hover
?.
background
?.[
0
]
||
'
{colors.blue.400}
'
,
_dark
:
heroBannerButton
?.
_hover
?.
background
?.[
1
]
||
heroBannerButton
?.
_hover
?.
background
?.[
0
]
||
'
{colors.blue.400}
'
,
},
},
selected
:
{
value
:
{
_light
:
heroBannerButton
?.
_selected
?.
background
?.[
0
]
||
'
{colors.blue.50}
'
,
_dark
:
heroBannerButton
?.
_selected
?.
background
?.[
1
]
||
heroBannerButton
?.
_selected
?.
background
?.[
0
]
||
'
{colors.blue.50}
'
,
},
},
},
fg
:
{
DEFAULT
:
{
value
:
{
_light
:
heroBannerButton
?.
_default
?.
text_color
?.[
0
]
||
'
{colors.white}
'
,
_dark
:
heroBannerButton
?.
_default
?.
text_color
?.[
1
]
||
heroBannerButton
?.
_default
?.
text_color
?.[
0
]
||
'
{colors.white}
'
,
},
},
hover
:
{
value
:
{
_light
:
heroBannerButton
?.
_hover
?.
text_color
?.[
0
]
||
'
{colors.white}
'
,
_dark
:
heroBannerButton
?.
_hover
?.
text_color
?.[
1
]
||
heroBannerButton
?.
_hover
?.
text_color
?.[
0
]
||
'
{colors.white}
'
,
},
},
selected
:
{
value
:
{
_light
:
heroBannerButton
?.
_selected
?.
text_color
?.[
0
]
||
'
{colors.blackAlpha.800}
'
,
_dark
:
heroBannerButton
?.
_selected
?.
text_color
?.[
1
]
||
heroBannerButton
?.
_selected
?.
text_color
?.[
0
]
||
'
{colors.blackAlpha.800}
'
,
},
},
},
},
},
},
link
:
{
link
:
{
primary
:
{
primary
:
{
...
...
toolkit/theme/recipes/button.recipe.ts
View file @
62423eec
...
@@ -108,6 +108,22 @@ export const recipe = defineRecipe({
...
@@ -108,6 +108,22 @@ export const recipe = defineRecipe({
},
},
},
},
},
},
hero
:
{
bg
:
'
button.hero.bg
'
,
color
:
'
button.hero.fg
'
,
_hover
:
{
bg
:
'
button.hero.bg.hover
'
,
color
:
'
button.hero.fg.hover
'
,
},
_selected
:
{
bg
:
'
button.hero.bg.selected
'
,
color
:
'
button.hero.fg.selected
'
,
_hover
:
{
bg
:
'
button.hero.bg.selected
'
,
color
:
'
button.hero.fg.selected
'
,
},
},
},
plain
:
{
plain
:
{
bg
:
'
transparent
'
,
bg
:
'
transparent
'
,
color
:
'
inherit
'
,
color
:
'
inherit
'
,
...
...
ui/home/HeroBanner.tsx
View file @
62423eec
import
{
Box
,
Flex
,
Heading
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Flex
,
Heading
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
...
@@ -13,34 +13,38 @@ const TEXT_COLOR_DEFAULT = 'white';
...
@@ -13,34 +13,38 @@ const TEXT_COLOR_DEFAULT = 'white';
const
BORDER_DEFAULT
=
'
none
'
;
const
BORDER_DEFAULT
=
'
none
'
;
const
HeroBanner
=
()
=>
{
const
HeroBanner
=
()
=>
{
const
background
=
useColorModeValue
(
const
background
=
{
// light mode
_light
:
config
.
UI
.
homepage
.
heroBanner
?.
background
?.[
0
]
||
config
.
UI
.
homepage
.
heroBanner
?.
background
?.[
0
]
||
config
.
UI
.
homepage
.
plate
.
background
||
config
.
UI
.
homepage
.
plate
.
background
||
BACKGROUND_DEFAULT
,
BACKGROUND_DEFAULT
,
// dark mode
_dark
:
config
.
UI
.
homepage
.
heroBanner
?.
background
?.[
1
]
||
config
.
UI
.
homepage
.
heroBanner
?.
background
?.[
1
]
||
config
.
UI
.
homepage
.
heroBanner
?.
background
?.[
0
]
||
config
.
UI
.
homepage
.
heroBanner
?.
background
?.[
0
]
||
config
.
UI
.
homepage
.
plate
.
background
||
config
.
UI
.
homepage
.
plate
.
background
||
BACKGROUND_DEFAULT
,
BACKGROUND_DEFAULT
,
)
;
}
;
const
textColor
=
useColorModeValue
(
const
textColor
=
{
// light mode
_light
:
config
.
UI
.
homepage
.
heroBanner
?.
text_color
?.[
0
]
||
// light mode
config
.
UI
.
homepage
.
plate
.
textColor
||
config
.
UI
.
homepage
.
heroBanner
?.
text_color
?.[
0
]
||
TEXT_COLOR_DEFAULT
,
config
.
UI
.
homepage
.
plate
.
textColor
||
TEXT_COLOR_DEFAULT
,
// dark mode
// dark mode
config
.
UI
.
homepage
.
heroBanner
?.
text_color
?.[
1
]
||
_dark
:
config
.
UI
.
homepage
.
heroBanner
?.
text_color
?.[
0
]
||
config
.
UI
.
homepage
.
heroBanner
?.
text_color
?.[
1
]
||
config
.
UI
.
homepage
.
plate
.
textColor
||
config
.
UI
.
homepage
.
heroBanner
?.
text_color
?.[
0
]
||
TEXT_COLOR_DEFAULT
,
config
.
UI
.
homepage
.
plate
.
textColor
||
);
TEXT_COLOR_DEFAULT
,
};
const
border
=
useColorModeValue
(
const
border
=
{
config
.
UI
.
homepage
.
heroBanner
?.
border
?.[
0
]
||
BORDER_DEFAULT
,
_light
:
config
.
UI
.
homepage
.
heroBanner
?.
border
?.[
1
]
||
config
.
UI
.
homepage
.
heroBanner
?.
border
?.[
0
]
||
BORDER_DEFAULT
,
config
.
UI
.
homepage
.
heroBanner
?.
border
?.[
0
]
||
BORDER_DEFAULT
,
);
_dark
:
config
.
UI
.
homepage
.
heroBanner
?.
border
?.[
1
]
||
config
.
UI
.
homepage
.
heroBanner
?.
border
?.[
0
]
||
BORDER_DEFAULT
,
};
return
(
return
(
<
Flex
<
Flex
...
@@ -69,10 +73,10 @@ const HeroBanner = () => {
...
@@ -69,10 +73,10 @@ const HeroBanner = () => {
</
Heading
>
</
Heading
>
{
config
.
UI
.
navigation
.
layout
===
'
vertical
'
&&
(
{
config
.
UI
.
navigation
.
layout
===
'
vertical
'
&&
(
<
Box
display=
{
{
base
:
'
none
'
,
lg
:
'
flex
'
}
}
gap=
{
2
}
>
<
Box
display=
{
{
base
:
'
none
'
,
lg
:
'
flex
'
}
}
gap=
{
2
}
>
{
config
.
features
.
rewards
.
isEnabled
&&
<
RewardsButton
v
ariant
=
"hero"
/>
}
{
config
.
features
.
rewards
.
isEnabled
&&
<
RewardsButton
v
isual
=
"hero"
/>
}
{
{
(
config
.
features
.
account
.
isEnabled
&&
<
UserProfileDesktop
buttonV
ariant
=
"hero"
/>)
||
(
config
.
features
.
account
.
isEnabled
&&
<
UserProfileDesktop
buttonV
isual
=
"hero"
/>)
||
(
config
.
features
.
blockchainInteraction
.
isEnabled
&&
<
UserWalletDesktop
buttonV
ariant
=
"hero"
/>)
(
config
.
features
.
blockchainInteraction
.
isEnabled
&&
<
UserWalletDesktop
buttonV
isual
=
"hero"
/>)
}
}
</
Box
>
</
Box
>
)
}
)
}
...
...
ui/pages/Home.tsx
View file @
62423eec
...
@@ -15,23 +15,23 @@ const rollupFeature = config.features.rollup;
...
@@ -15,23 +15,23 @@ const rollupFeature = config.features.rollup;
const
Home
=
()
=>
{
const
Home
=
()
=>
{
const
leftWidget
=
(()
=>
{
//
const leftWidget = (() => {
if
(
rollupFeature
.
isEnabled
&&
!
rollupFeature
.
homepage
.
showLatestBlocks
)
{
//
if (rollupFeature.isEnabled && !rollupFeature.homepage.showLatestBlocks) {
switch
(
rollupFeature
.
type
)
{
//
switch (rollupFeature.type) {
case
'
zkEvm
'
:
//
case 'zkEvm':
return
<
LatestZkEvmL2Batches
/>;
//
return <LatestZkEvmL2Batches/>;
case
'
arbitrum
'
:
//
case 'arbitrum':
return
<
LatestArbitrumL2Batches
/>;
//
return <LatestArbitrumL2Batches/>;
}
//
}
}
//
}
return
<
LatestBlocks
/>;
//
return <LatestBlocks/>;
})();
//
})();
return
(
return
(
<
Box
as=
"main"
>
<
Box
as=
"main"
>
<
HeroBanner
/>
<
HeroBanner
/>
<
Flex
flexDir=
{
{
base
:
'
column
'
,
lg
:
'
row
'
}
}
columnGap=
{
2
}
rowGap=
{
1
}
mt=
{
3
}
_empty=
{
{
mt
:
0
}
}
>
{
/*
<Flex flexDir={{ base: 'column', lg: 'row' }} columnGap={ 2 } rowGap={ 1 } mt={ 3 } _empty={{ mt: 0 }}>
<Stats/>
<Stats/>
<ChainIndicators/>
<ChainIndicators/>
</Flex>
</Flex>
...
@@ -41,7 +41,7 @@ const Home = () => {
...
@@ -41,7 +41,7 @@ const Home = () => {
<Box flexGrow={ 1 }>
<Box flexGrow={ 1 }>
<Transactions/>
<Transactions/>
</Box>
</Box>
</
Flex
>
</Flex>
*/
}
</
Box
>
</
Box
>
);
);
};
};
...
...
ui/rewards/RewardsButton.tsx
View file @
62423eec
...
@@ -33,7 +33,7 @@ const RewardsButton = ({ visual = 'header', size }: Props) => {
...
@@ -33,7 +33,7 @@ const RewardsButton = ({ visual = 'header', size }: Props) => {
>
>
<
Button
<
Button
visual=
{
visual
}
visual=
{
visual
}
data
-
selected=
{
!
isLoading
&&
Boolean
(
apiToken
)
}
selected=
{
!
isLoading
&&
Boolean
(
apiToken
)
}
flexShrink=
{
0
}
flexShrink=
{
0
}
as=
{
apiToken
?
LinkInternal
:
'
button
'
}
as=
{
apiToken
?
LinkInternal
:
'
button
'
}
{
...
(
apiToken
?
{
href
:
route
({
pathname
:
'/
account
/
rewards
'
})
}
:
{})
}
{
...
(
apiToken
?
{
href
:
route
({
pathname
:
'/
account
/
rewards
'
})
}
:
{})
}
...
...
ui/shared/ad/AdBannerContent.tsx
View file @
62423eec
...
@@ -5,7 +5,7 @@ import type { BannerPlatform } from './types';
...
@@ -5,7 +5,7 @@ import type { BannerPlatform } from './types';
import
type
{
AdBannerProviders
}
from
'
types/client/adProviders
'
;
import
type
{
AdBannerProviders
}
from
'
types/client/adProviders
'
;
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
Skeleton
from
'
ui/shared/chakra/S
keleton
'
;
import
{
Skeleton
}
from
'
toolkit/chakra/s
keleton
'
;
import
AdbutlerBanner
from
'
./AdbutlerBanner
'
;
import
AdbutlerBanner
from
'
./AdbutlerBanner
'
;
import
CoinzillaBanner
from
'
./CoinzillaBanner
'
;
import
CoinzillaBanner
from
'
./CoinzillaBanner
'
;
...
@@ -41,7 +41,7 @@ const AdBannerContent = ({ className, isLoading, provider, platform }: Props) =>
...
@@ -41,7 +41,7 @@ const AdBannerContent = ({ className, isLoading, provider, platform }: Props) =>
return
(
return
(
<
Skeleton
<
Skeleton
className=
{
className
}
className=
{
className
}
isLoaded=
{
!
isLoading
}
loading=
{
isLoading
}
borderRadius=
"none"
borderRadius=
"none"
maxW=
{
(
'
adButler
'
in
feature
&&
feature
.
adButler
)
?
feature
.
adButler
.
config
.
desktop
.
width
:
'
728px
'
}
maxW=
{
(
'
adButler
'
in
feature
&&
feature
.
adButler
)
?
feature
.
adButler
.
config
.
desktop
.
width
:
'
728px
'
}
w=
"100%"
w=
"100%"
...
...
ui/shared/filters/FilterButton.tsx
View file @
62423eec
...
@@ -44,7 +44,7 @@ const FilterButton = ({ isActive, isLoading, appliedFiltersNum, onClick, as }: P
...
@@ -44,7 +44,7 @@ const FilterButton = ({ isActive, isLoading, appliedFiltersNum, onClick, as }: P
colorScheme=
"gray"
colorScheme=
"gray"
onClick=
{
onClick
}
onClick=
{
onClick
}
isActive=
{
isActive
}
isActive=
{
isActive
}
data
-
selected=
{
Boolean
(
appliedFiltersNum
)
}
selected=
{
Boolean
(
appliedFiltersNum
)
}
px=
{
1.5
}
px=
{
1.5
}
flexShrink=
{
0
}
flexShrink=
{
0
}
as=
{
as
}
as=
{
as
}
...
...
ui/shared/radioButtonGroup/RadioButtonGroup.tsx
View file @
62423eec
...
@@ -31,7 +31,7 @@ const RadioButton = (props: RadioButtonProps) => {
...
@@ -31,7 +31,7 @@ const RadioButton = (props: RadioButtonProps) => {
as=
"label"
as=
"label"
aria
-
label=
{
props
.
title
}
aria
-
label=
{
props
.
title
}
variant=
"radio_group"
variant=
"radio_group"
data
-
selected=
{
props
.
isChecked
}
selected=
{
props
.
isChecked
}
>
>
<
input
{
...
input
}
/>
<
input
{
...
input
}
/>
<
Flex
<
Flex
...
@@ -48,7 +48,7 @@ const RadioButton = (props: RadioButtonProps) => {
...
@@ -48,7 +48,7 @@ const RadioButton = (props: RadioButtonProps) => {
as=
"label"
as=
"label"
leftIcon=
{
props
.
icon
?
<
IconSvg
name=
{
props
.
icon
}
boxSize=
{
5
}
mr=
{
-
1
}
/>
:
undefined
}
leftIcon=
{
props
.
icon
?
<
IconSvg
name=
{
props
.
icon
}
boxSize=
{
5
}
mr=
{
-
1
}
/>
:
undefined
}
variant=
"radio_group"
variant=
"radio_group"
data
-
selected=
{
props
.
isChecked
}
selected=
{
props
.
isChecked
}
>
>
<
input
{
...
input
}
/>
<
input
{
...
input
}
/>
<
Flex
<
Flex
...
...
ui/shared/sort/ButtonDesktop.tsx
View file @
62423eec
...
@@ -33,7 +33,7 @@ const ButtonDesktop = ({ children, isActive, onClick, isLoading, className }: Bu
...
@@ -33,7 +33,7 @@ const ButtonDesktop = ({ children, isActive, onClick, isLoading, className }: Bu
fontWeight=
"600"
fontWeight=
"600"
borderColor=
"transparent"
borderColor=
"transparent"
px=
{
2
}
px=
{
2
}
data
-
selected=
{
isActive
}
selected=
{
isActive
}
>
>
<
Box
<
Box
as=
{
isActive
?
'
div
'
:
'
span
'
}
as=
{
isActive
?
'
div
'
:
'
span
'
}
...
...
ui/snippets/auth/AuthModal.tsx
View file @
62423eec
...
@@ -18,7 +18,6 @@ import AuthModalScreenSelectMethod from './screens/AuthModalScreenSelectMethod';
...
@@ -18,7 +18,6 @@ import AuthModalScreenSelectMethod from './screens/AuthModalScreenSelectMethod';
import
AuthModalScreenSuccessEmail
from
'
./screens/AuthModalScreenSuccessEmail
'
;
import
AuthModalScreenSuccessEmail
from
'
./screens/AuthModalScreenSuccessEmail
'
;
import
AuthModalScreenSuccessWallet
from
'
./screens/AuthModalScreenSuccessWallet
'
;
import
AuthModalScreenSuccessWallet
from
'
./screens/AuthModalScreenSuccessWallet
'
;
// TODO @tom2drum fix auth modal
const
feature
=
config
.
features
.
account
;
const
feature
=
config
.
features
.
account
;
interface
Props
{
interface
Props
{
...
...
ui/snippets/user/wallet/UserWalletButton.tsx
View file @
62423eec
...
@@ -47,8 +47,8 @@ const UserWalletButton = ({ size, visual, isPending, isAutoConnectDisabled, addr
...
@@ -47,8 +47,8 @@ const UserWalletButton = ({ size, visual, isPending, isAutoConnectDisabled, addr
ref=
{
ref
}
ref=
{
ref
}
size=
{
size
}
size=
{
size
}
visual=
{
visual
}
visual=
{
visual
}
data
-
selected=
{
Boolean
(
address
)
}
selected=
{
Boolean
(
address
)
}
data
-
warning
=
{
isAutoConnectDisabled
}
highlighted
=
{
isAutoConnectDisabled
}
textStyle=
"sm"
textStyle=
"sm"
px=
{
address
?
2.5
:
4
}
px=
{
address
?
2.5
:
4
}
fontWeight=
{
address
?
700
:
600
}
fontWeight=
{
address
?
700
:
600
}
...
...
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