Skip to content

Commit 1b6b219

Browse files
authored
Merge pull request #1871 from bphan002/1846-redesign-header
1846 redesign header
2 parents ef620ab + 321be71 commit 1b6b219

File tree

3 files changed

+25
-6
lines changed

3 files changed

+25
-6
lines changed

assets/city_background_header.png

3.84 MB
Loading

components/common/TextHeading/TextHeadingFAQ.jsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,22 @@ import PropTypes from 'prop-types';
22
import React from 'react';
33
import makeStyles from '@mui/styles/makeStyles';
44
import Typography from '@mui/material/Typography';
5+
import cityBackground from '@assets/city_background_header.png'
56

67
const useStyles = makeStyles(theme => ({
78
headingBackground: {
8-
background: theme.palette.primary.main,
9-
backgroundPosition: 'top',
10-
height: '30vh',
9+
background: `url(${cityBackground}) center 57% / cover`,
10+
backgroundPosition: 'center 57%',
11+
width: '100%',
12+
height: '240px',
1113
position: 'relative',
1214
},
15+
backdrop: {
16+
width: '100%',
17+
height: '100%',
18+
background: `linear-gradient(180deg, rgba(53, 82, 129, 0.4) 50%, rgba(41, 64, 79, 0.8) 100%, rgba(29, 63, 90, 0.4) 100%)`,
19+
backgroundPosition: 'center',
20+
},
1321
headingOverlayText: {
1422
left: '50%',
1523
color: 'white',
@@ -31,6 +39,7 @@ function TextHeadingFAQ({ children }) {
3139

3240
return (
3341
<div className={classes.headingBackground}>
42+
<div className={classes.backdrop}></div>
3443
<div className={classes.headingOverlayText}>
3544
<Typography variant="h3" className={classes.contentHeading}>
3645
<div>{children}</div>

components/common/TextHeading/index.jsx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,30 @@ import PropTypes from 'prop-types';
22
import React from 'react';
33
import makeStyles from '@mui/styles/makeStyles';
44
import Typography from '@mui/material/Typography';
5+
import cityBackground from '@assets/city_background_header.png'
56

67
const useStyles = makeStyles(theme => ({
78
headingBackground: {
8-
background: theme.palette.primary.main,
9-
backgroundPosition: 'top',
10-
height: '20vh',
9+
background: `url(${cityBackground}) center 57% / cover`,
10+
backgroundPosition: 'center 57%',
11+
width: '100%',
12+
height: '240px',
1113
position: 'relative',
1214
},
15+
backdrop: {
16+
width: '100%',
17+
height: '100%',
18+
background: `linear-gradient(180deg, rgba(53, 82, 129, 0.4) 50%, rgba(41, 64, 79, 0.8) 100%, rgba(29, 63, 90, 0.4) 100%)`,
19+
backgroundPosition: 'center',
20+
},
1321
headingOverlayText: {
1422
left: '50%',
1523
color: 'white',
1624
position: 'absolute',
1725
textAlign: 'center',
1826
top: '50%',
1927
transform: 'translate(-50%, -70%)',
28+
zIndex: '1',
2029
},
2130
contentHeading: {
2231
fontWeight: theme.typography.fontWeightBold,
@@ -31,6 +40,7 @@ function TextHeading({ children }) {
3140

3241
return (
3342
<div className={classes.headingBackground}>
43+
<div className={classes.backdrop}></div>
3444
<div className={classes.headingOverlayText}>
3545
<Typography variant="h3" className={classes.contentHeading}>
3646
<div>

0 commit comments

Comments
 (0)