Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1846 redesign header #1871

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Binary file added assets/city_background_header.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 12 additions & 3 deletions components/common/TextHeading/TextHeadingFAQ.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,22 @@ import PropTypes from 'prop-types';
import React from 'react';
import makeStyles from '@mui/styles/makeStyles';
import Typography from '@mui/material/Typography';
import cityBackground from '@assets/city_background_header.png'

const useStyles = makeStyles(theme => ({
headingBackground: {
background: theme.palette.primary.main,
backgroundPosition: 'top',
height: '30vh',
background: `url(${cityBackground}) center 57% / cover`,
backgroundPosition: 'center 57%',
width: '100%',
height: '240px',
position: 'relative',
},
backdrop: {
width: '100%',
height: '100%',
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%)`,
backgroundPosition: 'center',
},
headingOverlayText: {
left: '50%',
color: 'white',
Expand All @@ -31,6 +39,7 @@ function TextHeadingFAQ({ children }) {

return (
<div className={classes.headingBackground}>
<div className={classes.backdrop}></div>
<div className={classes.headingOverlayText}>
<Typography variant="h3" className={classes.contentHeading}>
<div>{children}</div>
Expand Down
16 changes: 13 additions & 3 deletions components/common/TextHeading/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,30 @@ import PropTypes from 'prop-types';
import React from 'react';
import makeStyles from '@mui/styles/makeStyles';
import Typography from '@mui/material/Typography';
import cityBackground from '@assets/city_background_header.png'

const useStyles = makeStyles(theme => ({
headingBackground: {
background: theme.palette.primary.main,
backgroundPosition: 'top',
height: '20vh',
background: `url(${cityBackground}) center 57% / cover`,
backgroundPosition: 'center 57%',
width: '100%',
height: '240px',
position: 'relative',
},
backdrop: {
width: '100%',
height: '100%',
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%)`,
backgroundPosition: 'center',
},
headingOverlayText: {
left: '50%',
color: 'white',
position: 'absolute',
textAlign: 'center',
top: '50%',
transform: 'translate(-50%, -70%)',
zIndex: '1',
},
contentHeading: {
fontWeight: theme.typography.fontWeightBold,
Expand All @@ -31,6 +40,7 @@ function TextHeading({ children }) {

return (
<div className={classes.headingBackground}>
<div className={classes.backdrop}></div>
<div className={classes.headingOverlayText}>
<Typography variant="h3" className={classes.contentHeading}>
<div>
Expand Down