jobiqo-cl
Version:
[](https://circleci.com/gh/jobiqo/jobiqo-cl)
117 lines (108 loc) • 2.77 kB
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var styled = require('styled-components');
var styled__default = _interopDefault(styled);
var index_esm$9 = require('../../../../../node_modules/@styled-system/space/dist/index.esm.js');
require('../../../../../node_modules/styled-system/dist/index.esm.js');
var styles = require('../../../02-atoms/07-box/styles.js');
var index = require('../../../02-atoms/09-picture/index.js');
const HeroWrapper = styled__default.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__default.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__default(index.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__default.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};
color: white;
${index_esm$9.space};
`;
const BoxContent = styled__default(styles.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;
}
`
: ``}
`;
exports.BoxContent = BoxContent;
exports.HeroText = HeroText;
exports.HeroWrapper = HeroWrapper;
exports.Overlay = Overlay;
exports.StyledPicture = StyledPicture;