Skip to content

Commit 6b7e01e

Browse files
authored
Merge pull request #2 from vedovelli/transitions
Transitions
2 parents 1df41d4 + 83f59c9 commit 6b7e01e

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

client/src/App.vue

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,20 @@ export default {
2121
<cc-nav-bar v-show="shouldShowNavigation"></cc-nav-bar>
2222
<cc-alerts></cc-alerts>
2323
<div class="container">
24-
<router-view></router-view>
24+
<transition name="fade">
25+
<router-view></router-view>
26+
</transition>
2527
</div>
2628
</div>
2729
</template>
2830

2931
<style lang="sass" src="assets/sass/app.scss"></style>
32+
33+
<style scoped>
34+
.fade-enter-active {
35+
transition: opacity .5s ease;
36+
}
37+
.fade-enter {
38+
opacity: 0;
39+
}
40+
</style>

client/src/modules/categories/main.vue

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@
226226
<!-- Form to create/edit will be inserted here -->
227227
<!-- when navigate to /nova or /editar/{id} -->
228228
<!-- see /src/modules/categories/routes.js -->
229-
<transition name="slide">
229+
<transition name="fade">
230230
<router-view></router-view>
231231
</transition>
232232

@@ -237,7 +237,7 @@
237237
<th colspan="2">Category</th>
238238
</tr>
239239
</thead>
240-
<tbody :class="{ blur: fetching }">
240+
<tbody>
241241
<tr v-for="category in categories">
242242
<td width="1%" nowrap>{{ category.id }}</td>
243243
<td>{{ category.name }}</td>
@@ -276,13 +276,10 @@
276276
.button-within-header {
277277
margin-top: 32px;
278278
}
279-
.blur {
280-
filter: blur(7px);
281-
}
282-
.slide-enter-active, .slide-leave-active {
279+
.fade-enter-active, .fade-leave-active {
283280
transition: opacity .7s ease;
284281
}
285-
.slide-enter, .slide-leave-active {
282+
.fade-enter, .fade-leave-active {
286283
opacity: 0;
287284
}
288285
</style>

0 commit comments

Comments
 (0)