Skip to content

Commit

Permalink
Merge pull request #2 from vedovelli/transitions
Browse files Browse the repository at this point in the history
Transitions
  • Loading branch information
vedovelli authored Nov 27, 2016
2 parents 1df41d4 + 83f59c9 commit 6b7e01e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
13 changes: 12 additions & 1 deletion client/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,20 @@ export default {
<cc-nav-bar v-show="shouldShowNavigation"></cc-nav-bar>
<cc-alerts></cc-alerts>
<div class="container">
<router-view></router-view>
<transition name="fade">
<router-view></router-view>
</transition>
</div>
</div>
</template>

<style lang="sass" src="assets/sass/app.scss"></style>

<style scoped>
.fade-enter-active {
transition: opacity .5s ease;
}
.fade-enter {
opacity: 0;
}
</style>
11 changes: 4 additions & 7 deletions client/src/modules/categories/main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
<!-- Form to create/edit will be inserted here -->
<!-- when navigate to /nova or /editar/{id} -->
<!-- see /src/modules/categories/routes.js -->
<transition name="slide">
<transition name="fade">
<router-view></router-view>
</transition>

Expand All @@ -237,7 +237,7 @@
<th colspan="2">Category</th>
</tr>
</thead>
<tbody :class="{ blur: fetching }">
<tbody>
<tr v-for="category in categories">
<td width="1%" nowrap>{{ category.id }}</td>
<td>{{ category.name }}</td>
Expand Down Expand Up @@ -276,13 +276,10 @@
.button-within-header {
margin-top: 32px;
}
.blur {
filter: blur(7px);
}
.slide-enter-active, .slide-leave-active {
.fade-enter-active, .fade-leave-active {
transition: opacity .7s ease;
}
.slide-enter, .slide-leave-active {
.fade-enter, .fade-leave-active {
opacity: 0;
}
</style>

0 comments on commit 6b7e01e

Please sign in to comment.