add page and layout transitions
This commit is contained in:
parent
8ead8b8928
commit
fa14506eaa
4 changed files with 41 additions and 5 deletions
|
@ -1,4 +1,5 @@
|
|||
@import "./colors";
|
||||
@import "./transitions";
|
||||
@import url('https://fonts.googleapis.com/css?family=Raleway');
|
||||
|
||||
html, body, #__nuxt, #__layout {
|
||||
|
|
29
assets/transitions.scss
Normal file
29
assets/transitions.scss
Normal file
|
@ -0,0 +1,29 @@
|
|||
.page-enter-active, .page-leave-active {
|
||||
transition: opacity 0.5s;
|
||||
}
|
||||
|
||||
.page-enter, .page-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.layout-enter-active {
|
||||
transition: transform 0.5s ease, opacity 0.6s ease;
|
||||
}
|
||||
|
||||
.layout-leave-active {
|
||||
transition: transform 0.5s ease, opacity 0.1s ease;
|
||||
}
|
||||
|
||||
.layout-enter {
|
||||
transform: translateX(-100%);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.layout-leave-to {
|
||||
transform: translateX(100%);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.layout-enter-to, .layout-leave {
|
||||
opacity: 1;
|
||||
}
|
|
@ -2,6 +2,12 @@
|
|||
<nuxt/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "default"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<template>
|
||||
<div id="layout">
|
||||
<nuxt-link class="button" to="/"></nuxt-link>
|
||||
<div class="content">
|
||||
<nuxt/>
|
||||
</div>
|
||||
<div id="layout">
|
||||
<nuxt-link class="button" to="/"></nuxt-link>
|
||||
<div class="content">
|
||||
<nuxt/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue