|
|
|
|
@ -1,10 +1,11 @@ |
|
|
|
|
import styled, { css } from 'styled-components/macro' |
|
|
|
|
|
|
|
|
|
import { isMobileDevice } from 'config/userAgent' |
|
|
|
|
import isUndefined from 'lodash/isUndefined' |
|
|
|
|
|
|
|
|
|
import { Logo } from 'features/Logo' |
|
|
|
|
import { client } from 'config/clients' |
|
|
|
|
import { isMobileDevice } from 'config/userAgent' |
|
|
|
|
|
|
|
|
|
import { Logo } from 'features/Logo' |
|
|
|
|
|
|
|
|
|
export const DEFAULT_HEADER_COLOR = 'rgba(53, 96, 225, 0.56)' |
|
|
|
|
|
|
|
|
|
@ -28,13 +29,16 @@ export const HeaderStyled = styled.header<HeaderProps>` |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: center; |
|
|
|
|
height: ${({ height = 8.5 }) => height}rem; |
|
|
|
|
|
|
|
|
|
${({ color, headerImage }) => (headerImage |
|
|
|
|
? css`background: url(${headerImage});` |
|
|
|
|
: client.styles.homePageHeader || defaultHeaderStyles(color) |
|
|
|
|
)} |
|
|
|
|
|
|
|
|
|
${isMobileDevice |
|
|
|
|
? css` |
|
|
|
|
height: 124px; |
|
|
|
|
|
|
|
|
|
@media screen and (orientation: landscape){ |
|
|
|
|
height: 121px; |
|
|
|
|
} |
|
|
|
|
@ -49,8 +53,10 @@ type Props = { |
|
|
|
|
|
|
|
|
|
export const HeaderGroup = styled.div<Props>` |
|
|
|
|
display: flex; |
|
|
|
|
|
|
|
|
|
${({ height }) => (height ? `height: ${height}rem` : '')}; |
|
|
|
|
${({ marginTop }) => (marginTop ? `margin-top: ${marginTop}rem` : '')}; |
|
|
|
|
|
|
|
|
|
${isMobileDevice |
|
|
|
|
? css` |
|
|
|
|
position: relative; |
|
|
|
|
@ -61,6 +67,12 @@ export const HeaderGroup = styled.div<Props>` |
|
|
|
|
|
|
|
|
|
export const HeaderLogo = styled(Logo)` |
|
|
|
|
margin-top: 4px; |
|
|
|
|
|
|
|
|
|
${({ isMatchPage }) => (isMatchPage ? css` |
|
|
|
|
width: ${client.styles.matchLogoWidth}rem; |
|
|
|
|
height: ${client.styles.matchLogoHeight}rem; |
|
|
|
|
` : '')}
|
|
|
|
|
|
|
|
|
|
${isMobileDevice |
|
|
|
|
? css` |
|
|
|
|
@media (max-width: 650px){ |
|
|
|
|
@ -84,13 +96,18 @@ export const HeaderLogo = styled(Logo)` |
|
|
|
|
` |
|
|
|
|
|
|
|
|
|
type PositionProps = { |
|
|
|
|
isMatchPage?: boolean, |
|
|
|
|
left?: number, |
|
|
|
|
right?: number, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export const Position = styled.div<PositionProps>` |
|
|
|
|
position: absolute; |
|
|
|
|
top: 1.14rem; |
|
|
|
|
|
|
|
|
|
top: ${({ isMatchPage }) => ( |
|
|
|
|
isMatchPage ? client.styles.matchLogoTopMargin : '' |
|
|
|
|
)}rem; |
|
|
|
|
|
|
|
|
|
${({ left }) => (isUndefined(left) ? '' : `left: ${left}rem`)}; |
|
|
|
|
${({ right }) => (isUndefined(right) ? '' : `right: ${right}rem`)}; |
|
|
|
|
` |
|
|
|
|
|