feat(logo): add transition

This commit is contained in:
2021-01-14 22:54:57 +00:00
parent 83c7503d75
commit 19a31d6869
3 changed files with 8 additions and 1 deletions

View File

@@ -14,6 +14,8 @@ const Top = styled.div`
filter: grayscale(100%); filter: grayscale(100%);
opacity: 0; opacity: 0;
transform: translate3d(0, 50%, 0); transform: translate3d(0, 50%, 0);
transition: opacity 0.5s ease-in, filter 0.5s ease-in 0.5s,
transform 0.5s ease-in 0.5s;
path:first-child { path:first-child {
fill: var(--theme-color-primary); fill: var(--theme-color-primary);
@@ -35,6 +37,7 @@ const Top = styled.div`
const Middle = styled.div` const Middle = styled.div`
width: 100vw; width: 100vw;
opacity: 0; opacity: 0;
transition: opacity 0.5s ease-in 0.75s;
${props => ${props =>
props.visible && props.visible &&
css` css`
@@ -48,6 +51,8 @@ const Bottom = styled.div`
filter: grayscale(100%); filter: grayscale(100%);
opacity: 0; opacity: 0;
transform: translate3d(0, -50%, 0) rotate(180deg); transform: translate3d(0, -50%, 0) rotate(180deg);
transition: opacity 0.5s ease-in, filter 0.5s ease-in 0.5s,
transform 0.5s ease-in 0.5s;
path:first-child { path:first-child {
fill: var(--theme-color-dark); fill: var(--theme-color-dark);

View File

@@ -77,10 +77,12 @@ const Heading = styled(Link)`
const Content = styled.nav` const Content = styled.nav`
flex-grow: 1; flex-grow: 1;
margin: var(--spacing-y-lg) var(--spacing-x-md); margin: var(--spacing-y-lg) var(--spacing-x-md);
overflow-y: auto;
@media (min-width: 30em) { @media (min-width: 30em) {
display: flex; display: flex;
margin: 0; margin: 0;
overflow-y: visible;
} }
`; `;

View File

@@ -13,7 +13,7 @@ export default function Index({ data }) {
return ( return (
<Layout> <Layout>
<Header image={data.headerImage.childImageSharp.fluid}> <Header image={data.headerImage.childImageSharp.fluid}>
<HeaderLogo /> <HeaderLogo transition={true} />
</Header> </Header>
<Section> <Section>
<Text> <Text>