-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Working on demo page
- Loading branch information
Showing
10 changed files
with
449 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
<template lang="html"> | ||
<footer> | ||
<transition name="menu-appear" mode="out-in"> | ||
<div | ||
v-show="isLoaded" | ||
:class="['menu', isActive ? 'menu_active' : 'menu_inactive']" | ||
> | ||
<button | ||
:class="[ | ||
'menu-toggle-btn', | ||
isActive | ||
? 'menu-toggle-btn_active' | ||
: 'menu-toggle-btn_inactive' | ||
]" | ||
@click="toggleButtonHandler" | ||
/> | ||
<AppFooterPresets :isActive="isActive" /> | ||
</div> | ||
</transition> | ||
</footer> | ||
</template> | ||
|
||
<script> | ||
import AppFooterPresets from './AppFooterPresets.vue'; | ||
export default { | ||
components: { | ||
AppFooterPresets | ||
}, | ||
data() { | ||
return { | ||
isActive: false, | ||
isLoaded: false | ||
}; | ||
}, | ||
mounted() { | ||
setTimeout(() => (this.isLoaded = true), 500); | ||
}, | ||
methods: { | ||
toggleButtonHandler() { | ||
this.isActive = !this.isActive; | ||
this.isClicked = true; | ||
} | ||
} | ||
}; | ||
</script> | ||
|
||
<style lang="css" scoped> | ||
/* menu block */ | ||
.menu { | ||
position: fixed; | ||
left: 0; | ||
display: flex; | ||
width: 100%; | ||
height: 60vh; | ||
background-color: var(--app-grey); | ||
transition: bottom .4s ease-out; | ||
padding-left: calc(var(--side-padding) + var(--column) + var(--gutter)); | ||
padding-right: calc(var(--side-padding) + var(--column) + var(--gutter)); | ||
/* menu toggle btn */ | ||
& .menu-toggle-btn { | ||
position: absolute; | ||
top: -30px; | ||
left: calc(50% - 30px); | ||
width: 60px; | ||
height: 60px; | ||
margin: 0; | ||
padding: 0; | ||
background-color: var(--app-light-grey); | ||
border: 3px solid var(--app-grey); | ||
border-radius: 60px; | ||
overflow: hidden; | ||
cursor: pointer; | ||
&:before { | ||
content: ""; | ||
display: block; | ||
width: 50px; | ||
height: 50px; | ||
margin-top: 5px; | ||
margin: 0 auto; | ||
background-image: url('/arrow.svg'); | ||
background-position: center center; | ||
background-repeat: no-repeat; | ||
background-size: 80%; | ||
transition: transform .4s ease-in; | ||
} | ||
} /* menu toggle btn end*/ | ||
&.menu_inactive { | ||
bottom: -50vh; | ||
& .menu-toggle-btn { | ||
&:before { | ||
transform: rotate(180deg); | ||
} | ||
} | ||
} | ||
&.menu_active { | ||
bottom: 0%; | ||
& .menu-toggle-btn { | ||
&:before { | ||
transform: rotate(0deg); | ||
} | ||
} | ||
} | ||
} /* menu block end*/ | ||
/* Transition */ | ||
.menu-appear-enter, | ||
.menu-appear-leave-to { | ||
transform: translateY(calc(20vh)); | ||
} | ||
.menu-appear-enter-active, | ||
.menu-appear-leave-active { | ||
transition: transform .6s ease-in .6s; | ||
} | ||
</style> |
Oops, something went wrong.