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
Show 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
config
from
'
configs/app
'
;
const
heroBannerButton
=
config
.
UI
.
homepage
.
heroBanner
?.
button
;
const
semanticTokens
:
ThemingConfig
[
'
semanticTokens
'
]
=
{
// TODO @tom2drum remove *_hover in favor of conditional selectors
colors
:
{
...
...
@@ -34,6 +38,48 @@ const semanticTokens: ThemingConfig['semanticTokens'] = {
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
:
{
primary
:
{
...
...
toolkit/theme/recipes/button.recipe.ts
View file @
62423eec
...
...
@@ -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
:
{
bg
:
'
transparent
'
,
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
config
from
'
configs/app
'
;
...
...
@@ -13,34 +13,38 @@ const TEXT_COLOR_DEFAULT = 'white';
const
BORDER_DEFAULT
=
'
none
'
;
const
HeroBanner
=
()
=>
{
const
background
=
useColorModeValue
(
// light mode
const
background
=
{
_light
:
config
.
UI
.
homepage
.
heroBanner
?.
background
?.[
0
]
||
config
.
UI
.
homepage
.
plate
.
background
||
BACKGROUND_DEFAULT
,
// dark mode
_dark
:
config
.
UI
.
homepage
.
heroBanner
?.
background
?.[
1
]
||
config
.
UI
.
homepage
.
heroBanner
?.
background
?.[
0
]
||
config
.
UI
.
homepage
.
plate
.
background
||
BACKGROUND_DEFAULT
,
)
;
}
;
const
textColor
=
useColorModeValue
(
const
textColor
=
{
_light
:
// light mode
config
.
UI
.
homepage
.
heroBanner
?.
text_color
?.[
0
]
||
config
.
UI
.
homepage
.
plate
.
textColor
||
TEXT_COLOR_DEFAULT
,
// dark mode
_dark
:
config
.
UI
.
homepage
.
heroBanner
?.
text_color
?.[
1
]
||
config
.
UI
.
homepage
.
heroBanner
?.
text_color
?.[
0
]
||
config
.
UI
.
homepage
.
plate
.
textColor
||
TEXT_COLOR_DEFAULT
,
)
;
}
;
const
border
=
useColorModeValue
(
const
border
=
{
_light
:
config
.
UI
.
homepage
.
heroBanner
?.
border
?.[
0
]
||
BORDER_DEFAULT
,
_dark
:
config
.
UI
.
homepage
.
heroBanner
?.
border
?.[
1
]
||
config
.
UI
.
homepage
.
heroBanner
?.
border
?.[
0
]
||
BORDER_DEFAULT
,
)
;
}
;
return
(
<
Flex
...
...
@@ -69,10 +73,10 @@ const HeroBanner = () => {
</
Heading
>
{
config
.
UI
.
navigation
.
layout
===
'
vertical
'
&&
(
<
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
.
blockchainInteraction
.
isEnabled
&&
<
UserWalletDesktop
buttonV
ariant
=
"hero"
/>)
(
config
.
features
.
account
.
isEnabled
&&
<
UserProfileDesktop
buttonV
isual
=
"hero"
/>)
||
(
config
.
features
.
blockchainInteraction
.
isEnabled
&&
<
UserWalletDesktop
buttonV
isual
=
"hero"
/>)
}
</
Box
>
)
}
...
...
ui/pages/Home.tsx
View file @
62423eec
...
...
@@ -15,23 +15,23 @@ const rollupFeature = config.features.rollup;
const
Home
=
()
=>
{
const
leftWidget
=
(()
=>
{
if
(
rollupFeature
.
isEnabled
&&
!
rollupFeature
.
homepage
.
showLatestBlocks
)
{
switch
(
rollupFeature
.
type
)
{
case
'
zkEvm
'
:
return
<
LatestZkEvmL2Batches
/>;
case
'
arbitrum
'
:
return
<
LatestArbitrumL2Batches
/>;
}
}
//
const leftWidget = (() => {
//
if (rollupFeature.isEnabled && !rollupFeature.homepage.showLatestBlocks) {
//
switch (rollupFeature.type) {
//
case 'zkEvm':
//
return <LatestZkEvmL2Batches/>;
//
case 'arbitrum':
//
return <LatestArbitrumL2Batches/>;
//
}
//
}
return
<
LatestBlocks
/>;
})();
//
return <LatestBlocks/>;
//
})();
return
(
<
Box
as=
"main"
>
<
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/>
<ChainIndicators/>
</Flex>
...
...
@@ -41,7 +41,7 @@ const Home = () => {
<Box flexGrow={ 1 }>
<Transactions/>
</Box>
</
Flex
>
</Flex>
*/
}
</
Box
>
);
};
...
...
ui/rewards/RewardsButton.tsx
View file @
62423eec
...
...
@@ -33,7 +33,7 @@ const RewardsButton = ({ visual = 'header', size }: Props) => {
>
<
Button
visual=
{
visual
}
data
-
selected=
{
!
isLoading
&&
Boolean
(
apiToken
)
}
selected=
{
!
isLoading
&&
Boolean
(
apiToken
)
}
flexShrink=
{
0
}
as=
{
apiToken
?
LinkInternal
:
'
button
'
}
{
...
(
apiToken
?
{
href
:
route
({
pathname
:
'/
account
/
rewards
'
})
}
:
{})
}
...
...
ui/shared/ad/AdBannerContent.tsx
View file @
62423eec
...
...
@@ -5,7 +5,7 @@ import type { BannerPlatform } from './types';
import
type
{
AdBannerProviders
}
from
'
types/client/adProviders
'
;
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
CoinzillaBanner
from
'
./CoinzillaBanner
'
;
...
...
@@ -41,7 +41,7 @@ const AdBannerContent = ({ className, isLoading, provider, platform }: Props) =>
return
(
<
Skeleton
className=
{
className
}
isLoaded=
{
!
isLoading
}
loading=
{
isLoading
}
borderRadius=
"none"
maxW=
{
(
'
adButler
'
in
feature
&&
feature
.
adButler
)
?
feature
.
adButler
.
config
.
desktop
.
width
:
'
728px
'
}
w=
"100%"
...
...
ui/shared/filters/FilterButton.tsx
View file @
62423eec
...
...
@@ -44,7 +44,7 @@ const FilterButton = ({ isActive, isLoading, appliedFiltersNum, onClick, as }: P
colorScheme=
"gray"
onClick=
{
onClick
}
isActive=
{
isActive
}
data
-
selected=
{
Boolean
(
appliedFiltersNum
)
}
selected=
{
Boolean
(
appliedFiltersNum
)
}
px=
{
1.5
}
flexShrink=
{
0
}
as=
{
as
}
...
...
ui/shared/radioButtonGroup/RadioButtonGroup.tsx
View file @
62423eec
...
...
@@ -31,7 +31,7 @@ const RadioButton = (props: RadioButtonProps) => {
as=
"label"
aria
-
label=
{
props
.
title
}
variant=
"radio_group"
data
-
selected=
{
props
.
isChecked
}
selected=
{
props
.
isChecked
}
>
<
input
{
...
input
}
/>
<
Flex
...
...
@@ -48,7 +48,7 @@ const RadioButton = (props: RadioButtonProps) => {
as=
"label"
leftIcon=
{
props
.
icon
?
<
IconSvg
name=
{
props
.
icon
}
boxSize=
{
5
}
mr=
{
-
1
}
/>
:
undefined
}
variant=
"radio_group"
data
-
selected=
{
props
.
isChecked
}
selected=
{
props
.
isChecked
}
>
<
input
{
...
input
}
/>
<
Flex
...
...
ui/shared/sort/ButtonDesktop.tsx
View file @
62423eec
...
...
@@ -33,7 +33,7 @@ const ButtonDesktop = ({ children, isActive, onClick, isLoading, className }: Bu
fontWeight=
"600"
borderColor=
"transparent"
px=
{
2
}
data
-
selected=
{
isActive
}
selected=
{
isActive
}
>
<
Box
as=
{
isActive
?
'
div
'
:
'
span
'
}
...
...
ui/snippets/auth/AuthModal.tsx
View file @
62423eec
...
...
@@ -18,7 +18,6 @@ import AuthModalScreenSelectMethod from './screens/AuthModalScreenSelectMethod';
import
AuthModalScreenSuccessEmail
from
'
./screens/AuthModalScreenSuccessEmail
'
;
import
AuthModalScreenSuccessWallet
from
'
./screens/AuthModalScreenSuccessWallet
'
;
// TODO @tom2drum fix auth modal
const
feature
=
config
.
features
.
account
;
interface
Props
{
...
...
ui/snippets/user/wallet/UserWalletButton.tsx
View file @
62423eec
...
...
@@ -47,8 +47,8 @@ const UserWalletButton = ({ size, visual, isPending, isAutoConnectDisabled, addr
ref=
{
ref
}
size=
{
size
}
visual=
{
visual
}
data
-
selected=
{
Boolean
(
address
)
}
data
-
warning
=
{
isAutoConnectDisabled
}
selected=
{
Boolean
(
address
)
}
highlighted
=
{
isAutoConnectDisabled
}
textStyle=
"sm"
px=
{
address
?
2.5
:
4
}
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