|
|
|
|
@ -4,9 +4,19 @@ import { isMobileDevice } from 'config/userAgent' |
|
|
|
|
import isUndefined from 'lodash/isUndefined' |
|
|
|
|
|
|
|
|
|
import { Logo } from 'features/Logo' |
|
|
|
|
import { client } from 'config/clients' |
|
|
|
|
|
|
|
|
|
export const DEFAULT_HEADER_COLOR = 'rgba(53, 96, 225, 0.56)' |
|
|
|
|
|
|
|
|
|
const defaultHeaderStyles = (color: string = DEFAULT_HEADER_COLOR) => css` |
|
|
|
|
background: linear-gradient( |
|
|
|
|
187deg, |
|
|
|
|
${color} -4.49%, |
|
|
|
|
#000000 68.29%), |
|
|
|
|
#000000; |
|
|
|
|
z-index: 10; |
|
|
|
|
` |
|
|
|
|
|
|
|
|
|
type HeaderProps = { |
|
|
|
|
color?: string, |
|
|
|
|
headerImage?: string | null, |
|
|
|
|
@ -19,14 +29,8 @@ export const HeaderStyled = styled.header<HeaderProps>` |
|
|
|
|
justify-content: center; |
|
|
|
|
height: ${({ height = 8.5 }) => height}rem; |
|
|
|
|
${({ color, headerImage }) => (headerImage |
|
|
|
|
? css`background: url(${headerImage})` |
|
|
|
|
: css`
|
|
|
|
|
background: linear-gradient( |
|
|
|
|
187deg, |
|
|
|
|
${color || DEFAULT_HEADER_COLOR} -4.49%, |
|
|
|
|
rgba(0, 0, 0, 0) 68.29%), |
|
|
|
|
#000000; |
|
|
|
|
z-index: 10;` |
|
|
|
|
? css`background: url(${headerImage});` |
|
|
|
|
: client.styles.homePageHeader || defaultHeaderStyles(color) |
|
|
|
|
)} |
|
|
|
|
${isMobileDevice |
|
|
|
|
? css` |
|
|
|
|
|