UNPKG

jobiqo-cl

Version:

[![CircleCI](https://circleci.com/gh/jobiqo/jobiqo-cl.svg?style=svg&circle-token=5a24efa5b8bbc4879276123e77d0d3f35ca7144c)](https://circleci.com/gh/jobiqo/jobiqo-cl)

112 lines (106 loc) 2.5 kB
import styled from 'styled-components'; import { space } from '../../../../../node_modules/@styled-system/space/dist/index.esm.js'; import '../../../../../node_modules/styled-system/dist/index.esm.js'; import { Box } from '../../../02-atoms/07-box/styles.js'; import { Picture } from '../../../02-atoms/09-picture/index.js'; const HeroWrapper = styled.div ` position: relative; min-height: 400px; display: flex; flex-direction: column; ${props => props.boxPosition === 'left' ? ` ${props.theme.mediaQueries.medium} { background: ${props.theme.box.background}; border-bottom: 4px solid ${props.theme.colors.primary}; } ` : ``} `; const Overlay = styled.div ` position: absolute; top: 0; left: 0; z-index: 0; height: 100%; width: 100%; overflow: hidden; &:before { content: ''; position: absolute; z-index: 1; top: 0; left: 0; width: 100%; height: 100%; background-color: ${props => props.theme.heroBanner.overlayBackground}; } ${props => props.boxPosition === 'left' ? ` ${props.theme.mediaQueries.medium} { left: 20%; width: 80%; } ` : ``} `; const StyledPicture = styled(Picture) ` img { object-fit: cover; position: absolute; top: -100%; bottom: -100%; left: -100%; right: -100%; margin: auto; min-height: 0; min-width: 100%; max-width: 100%; height: 100%; width: 100%; } `; const HeroText = styled.div ` display: flex; align-self: center; flex-wrap: wrap; flex-direction: column; justify-content: center; align-items: center; height: 100%; position: relative; margin: auto; padding: ${props => props.theme.heroBanner.padding}; ${props => props.boxPosition === 'left' ? ` ${props.theme.mediaQueries.smallRevert} { display: none; }` : ``} color: white; ${space}; `; const BoxContent = styled(Box) ` position: relative; z-index: 10; width: 80%; border-radius: 0; margin-left: auto; margin-right: auto; transform: translate(0, 40%); ${props => props.theme.mediaQueries.small} { max-width: 70%; } ${props => props.boxPosition === 'left' ? ` transform: none; ${props.theme.mediaQueries.medium} { max-width: 50%; margin-left: 0; transform: translate(0, -15%); box-shadow: none; } ` : ``} `; export { BoxContent, HeroText, HeroWrapper, Overlay, StyledPicture };