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
dc83febb
Unverified
Commit
dc83febb
authored
Oct 18, 2024
by
tom goriunov
Committed by
GitHub
Oct 18, 2024
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2300 from blockscout/tom2drum/fix-hero-banner-config
Fix hero banner config for dark color mode
parents
86b7372b
38060e0f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
17 deletions
+32
-17
Button.ts
theme/components/Button/Button.ts
+13
-12
HeroBanner.tsx
ui/home/HeroBanner.tsx
+19
-5
HeroBanner.pw.tsx_dark-color-mode_customization-dark-mode-1.png
...nner.pw.tsx_dark-color-mode_customization-dark-mode-1.png
+0
-0
No files found.
theme/components/Button/Button.ts
View file @
dc83febb
...
...
@@ -154,33 +154,34 @@ const variantSubtle = defineStyle((props) => {
// for buttons in the hero banner
const
variantHero
=
defineStyle
((
props
)
=>
{
const
buttonConfig
=
config
.
UI
.
homepage
.
heroBanner
?.
button
;
return
{
bg
:
mode
(
config
.
UI
.
homepage
.
heroBanner
?.
button
?.
_default
?.
background
?.[
0
]
||
'
blue.600
'
,
config
.
UI
.
homepage
.
heroBanner
?.
button
?.
_default
?.
background
?.[
1
]
||
'
blue.600
'
,
buttonConfig
?.
_default
?.
background
?.[
0
]
||
'
blue.600
'
,
buttonConfig
?.
_default
?.
background
?.[
1
]
||
buttonConfig
?.
_default
?.
background
?.[
0
]
||
'
blue.600
'
,
)(
props
),
color
:
mode
(
config
.
UI
.
homepage
.
heroBanner
?.
button
?.
_default
?.
text_color
?.[
0
]
||
'
white
'
,
config
.
UI
.
homepage
.
heroBanner
?.
button
?.
_default
?.
text_color
?.[
1
]
||
'
white
'
,
buttonConfig
?.
_default
?.
text_color
?.[
0
]
||
'
white
'
,
buttonConfig
?.
_default
?.
text_color
?.[
1
]
||
buttonConfig
?.
_default
?.
text_color
?.[
0
]
||
'
white
'
,
)(
props
),
_hover
:
{
bg
:
mode
(
config
.
UI
.
homepage
.
heroBanner
?.
button
?.
_hover
?.
background
?.[
0
]
||
'
blue.400
'
,
config
.
UI
.
homepage
.
heroBanner
?.
button
?.
_hover
?.
background
?.[
1
]
||
'
blue.400
'
,
buttonConfig
?.
_hover
?.
background
?.[
0
]
||
'
blue.400
'
,
buttonConfig
?.
_hover
?.
background
?.[
1
]
||
buttonConfig
?.
_hover
?.
background
?.[
0
]
||
'
blue.400
'
,
)(
props
),
color
:
mode
(
config
.
UI
.
homepage
.
heroBanner
?.
button
?.
_hover
?.
text_color
?.[
0
]
||
'
white
'
,
config
.
UI
.
homepage
.
heroBanner
?.
button
?.
_hover
?.
text_color
?.[
1
]
||
'
white
'
,
buttonConfig
?.
_hover
?.
text_color
?.[
0
]
||
'
white
'
,
buttonConfig
?.
_hover
?.
text_color
?.[
1
]
||
buttonConfig
?.
_hover
?.
text_color
?.[
0
]
||
'
white
'
,
)(
props
),
},
'
&[data-selected=true]
'
:
{
bg
:
mode
(
config
.
UI
.
homepage
.
heroBanner
?.
button
?.
_selected
?.
background
?.[
0
]
||
'
blue.50
'
,
config
.
UI
.
homepage
.
heroBanner
?.
button
?.
_selected
?.
background
?.[
1
]
||
'
blue.50
'
,
buttonConfig
?.
_selected
?.
background
?.[
0
]
||
'
blue.50
'
,
buttonConfig
?.
_selected
?.
background
?.[
1
]
||
buttonConfig
?.
_selected
?.
background
?.[
0
]
||
'
blue.50
'
,
)(
props
),
color
:
mode
(
config
.
UI
.
homepage
.
heroBanner
?.
button
?.
_selected
?.
text_color
?.[
0
]
||
'
blackAlpha.800
'
,
config
.
UI
.
homepage
.
heroBanner
?.
button
?.
_selected
?.
text_color
?.[
1
]
||
'
blackAlpha.800
'
,
buttonConfig
?.
_selected
?.
text_color
?.[
0
]
||
'
blackAlpha.800
'
,
buttonConfig
?.
_selected
?.
text_color
?.[
1
]
||
buttonConfig
?.
_selected
?.
text_color
?.[
0
]
||
'
blackAlpha.800
'
,
)(
props
),
},
};
...
...
ui/home/HeroBanner.tsx
View file @
dc83febb
...
...
@@ -13,18 +13,32 @@ const BORDER_DEFAULT = 'none';
const
HeroBanner
=
()
=>
{
const
background
=
useColorModeValue
(
config
.
UI
.
homepage
.
heroBanner
?.
background
?.[
0
]
||
config
.
UI
.
homepage
.
plate
.
background
||
BACKGROUND_DEFAULT
,
config
.
UI
.
homepage
.
heroBanner
?.
background
?.[
1
]
||
config
.
UI
.
homepage
.
plate
.
background
||
BACKGROUND_DEFAULT
,
// light mode
config
.
UI
.
homepage
.
heroBanner
?.
background
?.[
0
]
||
config
.
UI
.
homepage
.
plate
.
background
||
BACKGROUND_DEFAULT
,
// dark mode
config
.
UI
.
homepage
.
heroBanner
?.
background
?.[
1
]
||
config
.
UI
.
homepage
.
heroBanner
?.
background
?.[
0
]
||
config
.
UI
.
homepage
.
plate
.
background
||
BACKGROUND_DEFAULT
,
);
const
textColor
=
useColorModeValue
(
config
.
UI
.
homepage
.
heroBanner
?.
text_color
?.[
0
]
||
config
.
UI
.
homepage
.
plate
.
textColor
||
TEXT_COLOR_DEFAULT
,
config
.
UI
.
homepage
.
heroBanner
?.
text_color
?.[
1
]
||
config
.
UI
.
homepage
.
plate
.
textColor
||
TEXT_COLOR_DEFAULT
,
// light mode
config
.
UI
.
homepage
.
heroBanner
?.
text_color
?.[
0
]
||
config
.
UI
.
homepage
.
plate
.
textColor
||
TEXT_COLOR_DEFAULT
,
// dark mode
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
(
config
.
UI
.
homepage
.
heroBanner
?.
border
?.[
0
]
||
BORDER_DEFAULT
,
config
.
UI
.
homepage
.
heroBanner
?.
border
?.[
1
]
||
BORDER_DEFAULT
,
config
.
UI
.
homepage
.
heroBanner
?.
border
?.[
1
]
||
config
.
UI
.
homepage
.
heroBanner
?.
border
?.[
0
]
||
BORDER_DEFAULT
,
);
return
(
...
...
ui/home/__screenshots__/HeroBanner.pw.tsx_dark-color-mode_customization-dark-mode-1.png
View replaced file @
86b7372b
View file @
dc83febb
180 KB
|
W:
|
H:
160 KB
|
W:
|
H:
2-up
Swipe
Onion skin
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