Skip to content

Commit

Permalink
header button animation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hsurf22 committed Aug 16, 2018
1 parent ec060ea commit 223af69
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 10 deletions.
37 changes: 28 additions & 9 deletions src/containers/HeaderContainer/HeaderContainer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@
margin-left: 26px;
padding: 13px 0;

&.nopadding {
padding: 0;
}

a {
color: $text-color-3;
}
Expand Down Expand Up @@ -170,8 +174,9 @@

.get-free-wallet {
position: relative;
animation: fadeInFromNone 0.3s ease-out;
animation: fadeInFromNone 0.5s ease-out;
animation-fill-mode:forwards;
opacity: 1;

.get-free-wallet-button {
border: 1px solid $border-green;
Expand All @@ -183,6 +188,7 @@
transition: background-color .2s ease;
display: block;
position: relative;
overflow: hidden;

&:hover {
background-color: $text-color-green;
Expand All @@ -191,41 +197,54 @@
}

&.noshow {
animation: fadeOutFromBlock 0.3s ease-out;
animation: fadeOutFromBlock 0.5s ease-out;
animation-fill-mode: forwards;
}

@keyframes fadeInFromNone {
0% {
width: 0px;
height: 0px;
opacity: 0;
position: relative;
margin-left: 0px;
}

1% {
50% {
width: 173px;
height: 54px;
opacity: 0;
margin-left: 20px;
}

100% {
width: 173px;
height: 54px;
opacity: 1;
margin-left: 20px;
}
}


@keyframes fadeOutFromBlock {
0% {
width: 173px;
height: 54px;
opacity: 1;
position: relative;
margin-left: 20px;
}

99% {
50% {
width: 173px;
height: 54px;
opacity: 0;
position: relative;
margin-left: 20px;
}

100% {
width: 0px;
height: 0px;
opacity: 0;
z-index: -1;
position: absolute;
margin-left: 0px;
}
}
} // .get-free-wallet
Expand Down
2 changes: 1 addition & 1 deletion src/containers/HeaderContainer/HeaderContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</b-nav-item-dropdown>
</div>
<notification v-if="wallet !== null"></notification>
<b-nav-item class="get-free-wallet" to="/create-wallet" v-if="wallet === null && $route.fullPath === '/'" :class="isPageOnTop == true ? 'noshow' : ''">
<b-nav-item class="get-free-wallet nopadding" to="/create-wallet" v-if="wallet === null && $route.fullPath === '/'" :class="isPageOnTop == true ? 'noshow' : ''">
<div class="get-free-wallet-button">
Get a Free Wallet
</div>
Expand Down

1 comment on commit 223af69

@mew-bot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.