fix(header): improve layout
This commit is contained in:
@@ -37,7 +37,6 @@ const Top = styled.div`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
const Middle = styled.div`
|
const Middle = styled.div`
|
||||||
width: 100vw;
|
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transition: opacity 0.5s ease-in 0.75s;
|
transition: opacity 0.5s ease-in 0.75s;
|
||||||
${props =>
|
${props =>
|
||||||
@@ -82,7 +81,7 @@ export default function HeaderLogo({ transition }) {
|
|||||||
<LogoArrows />
|
<LogoArrows />
|
||||||
</Top>
|
</Top>
|
||||||
<Middle visible={visible}>
|
<Middle visible={visible}>
|
||||||
<Heading withShadow noMargin>
|
<Heading withShadow noMargin noWrap>
|
||||||
Abc Project Design Ltd
|
Abc Project Design Ltd
|
||||||
</Heading>
|
</Heading>
|
||||||
<Text size="lg">Easy as ABC</Text>
|
<Text size="lg">Easy as ABC</Text>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import styled from "@emotion/styled";
|
|||||||
import { css } from "@emotion/react";
|
import { css } from "@emotion/react";
|
||||||
const Container = styled.header`
|
const Container = styled.header`
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 60vh;
|
height: 50vh;
|
||||||
max-height: 1200px;
|
max-height: 1200px;
|
||||||
color: white;
|
color: white;
|
||||||
`;
|
`;
|
||||||
@@ -36,7 +36,6 @@ const Content = styled.div`
|
|||||||
${props => (props.posY === "middle" ? "-50%" : 0)}
|
${props => (props.posY === "middle" ? "-50%" : 0)}
|
||||||
);
|
);
|
||||||
max-width: var(--theme-max-width);
|
max-width: var(--theme-max-width);
|
||||||
margin: var(--spacing-y-sm) var(--spacing-x-sm);
|
|
||||||
padding: var(--spacing-y-sm) var(--spacing-x-sm);
|
padding: var(--spacing-y-sm) var(--spacing-x-sm);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -6,7 +6,12 @@ const Styles = styled.h1`
|
|||||||
margin: ${props => (props.noMargin ? 0 : `0 0 var(--spacing-y-sm)`)};
|
margin: ${props => (props.noMargin ? 0 : `0 0 var(--spacing-y-sm)`)};
|
||||||
font-size: ${props => `var(--font-size-${props.size})`};
|
font-size: ${props => `var(--font-size-${props.size})`};
|
||||||
${props =>
|
${props =>
|
||||||
props.shadow &&
|
props.noWrap &&
|
||||||
|
css`
|
||||||
|
white-space: nowrap;
|
||||||
|
`}
|
||||||
|
${props =>
|
||||||
|
props.withShadow &&
|
||||||
css`
|
css`
|
||||||
text-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
|
text-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
|
||||||
`};
|
`};
|
||||||
@@ -21,10 +26,10 @@ const sizes = {
|
|||||||
h6: "lg"
|
h6: "lg"
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function Heading({ el = "h1", withShadow, noMargin, children }) {
|
export default function Heading({ el = "h1", children, ...other }) {
|
||||||
const Container = Styles.withComponent(el);
|
const Container = Styles.withComponent(el);
|
||||||
return (
|
return (
|
||||||
<Container size={sizes[el]} shadow={withShadow} noMargin={noMargin}>
|
<Container size={sizes[el]} {...other}>
|
||||||
{children}
|
{children}
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -64,7 +64,6 @@ const GlobalStyles = css`
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-family: "Cooper Hewitt", sans-serif;
|
font-family: "Cooper Hewitt", sans-serif;
|
||||||
overflow-x: hidden;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
*,
|
*,
|
||||||
|
|||||||
Reference in New Issue
Block a user