Skip to content

Commit

Permalink
Merge pull request #1871 from bphan002/1846-redesign-header
Browse files Browse the repository at this point in the history
1846 redesign header
  • Loading branch information
bphan002 authored Dec 30, 2024
2 parents ef620ab + 321be71 commit 1b6b219
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
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

0 comments on commit 1b6b219

Please sign in to comment.