Skip to content

Commit

Permalink
[FEATURE] Adding the animation for the zoom on click
Browse files Browse the repository at this point in the history
  • Loading branch information
JustalK committed Oct 30, 2020
1 parent 63fd513 commit c0c4e95
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 20 deletions.
12 changes: 6 additions & 6 deletions dev/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/assets/less/home.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
.full();

& > div {
.transition(transform 0.5s cubic-bezier(0.8, 0, 0.25, 1));
.transition(transform 0.5s cubic-bezier(0.8, 0, 0.25, 1) 0.08s);

perspective: 1000px;
height: 100%;
Expand Down
10 changes: 2 additions & 8 deletions src/components/introduction/introduction_link.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,8 @@ export default {
}
},
methods: {
open: function(direction) {
this.goPortfolio = true;
setTimeout(() => {
this.goZoom = true;
setTimeout(() => {
return direction == 'portfolio' ? this.$router.push('portfolio') : this.$router.push('articles');
}, 500);
}, 500);
open: function(link) {
this.$emit(link);
}
}
};
Expand Down
28 changes: 26 additions & 2 deletions src/components/introduction/introduction_side.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<template>
<div
:class="props_link.side"
:class="[props_link.side,{active:props_go_open_door}]"
class="bloc">
<components_introduction :props_introduction="props_introduction" />
<components_introduction_link :props_link="props_link" />
<components_introduction_link
:props_link="props_link"
@articles="articles"
@portfolio="portfolio" />
</div>
</template>
<script>
Expand All @@ -23,6 +26,27 @@ export default {
props_link: {
type: Object,
required: true
},
props_go_open_door: {
type: Boolean,
required: true
}
},
methods: {
articles() {
this.animation_door('articles');
},
portfolio() {
this.animation_door('portfolio');
},
animation_door(link) {
this.$emit('zoom');
this.move_to_project(link, 1000);
},
move_to_project(link, delay) {
setTimeout(() => {
this.$router.push(link);
}, delay);
}
}
};
Expand Down
Loading

0 comments on commit c0c4e95

Please sign in to comment.