This commit is contained in:
syuilo 2018-02-23 23:30:30 +09:00
parent cbdabc5bb4
commit 10994c2361
3 changed files with 59 additions and 37 deletions

View File

@ -124,15 +124,5 @@ pre
overflow auto
tab-size 2
mk-locker
display block
position fixed
top 0
left 0
z-index 65536
width 100%
height 100%
cursor wait
[data-fa]
display inline-block

View File

@ -1,7 +1,14 @@
<template>
<div class="nav" :style="{ display: isOpen ? 'block' : 'none' }">
<div class="backdrop" @click="$parent.isDrawerOpening = false"></div>
<div class="body">
<div class="nav">
<transition name="back">
<div class="backdrop"
v-if="isOpen"
@click="$parent.isDrawerOpening = false"
@touchstart="$parent.isDrawerOpening = false"
></div>
</transition>
<transition name="nav">
<div class="body" v-if="isOpen">
<router-link class="me" v-if="os.isSignedIn" :to="`/${os.i.username}`">
<img class="avatar" :src="`${os.i.avatar_url}?thumbnail&size=128`" alt="avatar"/>
<p class="name">{{ os.i.name }}</p>
@ -25,6 +32,7 @@
</div>
<a :href="aboutUrl"><p class="about">%i18n:mobile.tags.mk-ui-nav.about%</p></a>
</div>
</transition>
</div>
</template>
@ -197,4 +205,26 @@ export default Vue.extend({
a
color #777
.nav-enter-active,
.nav-leave-active {
opacity: 1;
transform: translateX(0);
transition: transform 300ms cubic-bezier(0.23, 1, 0.32, 1), opacity 300ms cubic-bezier(0.23, 1, 0.32, 1);
}
.nav-enter,
.nav-leave-active {
opacity: 0;
transform: translateX(-240px);
}
.back-enter-active,
.back-leave-active {
opacity: 1;
transition: opacity 300ms cubic-bezier(0.23, 1, 0.32, 1);
}
.back-enter,
.back-leave-active {
opacity: 0;
}
</style>

View File

@ -12,8 +12,8 @@
position relative
box-sizing border-box
background-clip padding-box !important
tap-highlight-color rgba($theme-color, 0.7)
-webkit-tap-highlight-color rgba($theme-color, 0.7)
tap-highlight-color transparent
-webkit-tap-highlight-color transparent
html, body
margin 0
@ -26,6 +26,8 @@ a
text-decoration none
color $theme-color
cursor pointer
tap-highlight-color rgba($theme-color, 0.7) !important
-webkit-tap-highlight-color rgba($theme-color, 0.7) !important
&:hover
text-decoration underline