Skip to content

Commit

Permalink
Added transition
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasHirt committed May 11, 2020
1 parent 5ffd426 commit b5c440d
Showing 1 changed file with 21 additions and 11 deletions.
32 changes: 21 additions & 11 deletions src/Phoenix.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@
<router-view name="fullscreen" />
</template>
<div v-else key="core-content" class="uk-height-1-1 uk-flex uk-flex-row uk-flex-row">
<oc-sidebar
v-if="isSidebarVisible"
v-touch:swipe.left="handleNavSwipe"
class="oc-app-navigation"
:logo-img="logoImage"
:product-name="productName"
:nav-items="navItems"
:class="sidebarClasses"
:fixed="isSidebarFixed"
@closed="toggleAppNavigationVisibility"
/>
<transition :name="appNavigationAnimation">
<oc-sidebar
v-if="isSidebarVisible"
v-touch:swipe.left="handleNavSwipe"
class="oc-app-navigation"
:logo-img="logoImage"
:product-name="productName"
:nav-items="navItems"
:class="sidebarClasses"
:fixed="isSidebarFixed"
@close="toggleAppNavigationVisibility"
/>
</transition>
<div class="uk-width-expand">
<top-bar
class="uk-width-expand"
Expand Down Expand Up @@ -140,6 +142,14 @@ export default {
isSidebarVisible() {
return this.windowWidth >= 1200 || this.appNavigationVisible
},
appNavigationAnimation() {
if (this.windowWidth > 960) {
return 'push-right'
}
return 'fade'
}
},
watch: {
Expand Down

0 comments on commit b5c440d

Please sign in to comment.