Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tomoyahiroe/#59 add page animation #60

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,14 @@
<NuxtPage />
</NuxtLayout>
</template>
<style>
.page-enter-active,
.page-leave-active {
transition: all 0.4s;
}
.page-enter-from,
.page-leave-to {
opacity: 0;
filter: blur(1rem);
}
</style>
3 changes: 2 additions & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ export default defineNuxtConfig({
bodyAttrs: {
class: 'test'
}
}
},
pageTransition: { name: 'page', mode: 'out-in' }
},
typescript: {
shim: false,
Expand Down
10 changes: 10 additions & 0 deletions pages/login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,14 @@ const goAuthURL = async () => {
height: 90vh;
}
}
// page transitionのアニメーション
.page-enter-active,
.page-leave-active {
transition: all 0.4s;
}
.page-enter-from,
.page-leave-to {
opacity: 0;
filter: blur(1rem);
}
</style>
12 changes: 12 additions & 0 deletions pages/welcome.vue
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,15 @@ const user = await useLogin().getCurrentUser()
</div>
</main>
</template>
<style scoped lang="scss">
// page transition のアニメーション
.page-enter-active,
.page-leave-active {
transition: all 0.4s;
}
.page-enter-from,
.page-leave-to {
opacity: 0;
filter: blur(1rem);
}
</style>
Loading