Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export default {
- transition: {
- name: "js-swipe-out",
- mode: "",
- beforeEnter(el) {
- var loader = document.querySelector(".o-loader");
- var wrap = document.querySelector(".o-wrapper");
- setTimeout(() => {
- loader.classList.add("is-loading");
- setTimeout(() => {
- wrap.classList.remove("is-active");
- setTimeout(() => {
- loader.classList.add("is-loaded");
- setTimeout(() => {
- loader.classList.remove("is-loaded");
- loader.classList.remove("is-loading");
- setTimeout(() => {
- wrap.classList.add("is-active");
- }, 0);
- }, 1099);
- }, 500);
- }, 1099);
- }, 0);
- }
- }
- };
- export default ({ isServer }) => {
- if (isServer) return
- // Return a promise to tell nuxt.js to wait for the end of it
- return new Promise((resolve) => {
- setTimeout(resolve, 1000);
- })
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement