SHARE
TWEET

Untitled

a guest Jun 17th, 2019 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. export default {
  2.   transition: {
  3.     name: "js-swipe-out",
  4.     mode: "",
  5.     beforeEnter(el) {
  6.       var loader = document.querySelector(".o-loader");
  7.       var wrap = document.querySelector(".o-wrapper");
  8.  
  9.       setTimeout(() => {
  10.         loader.classList.add("is-loading");
  11.         setTimeout(() => {
  12.           wrap.classList.remove("is-active");
  13.           setTimeout(() => {
  14.             loader.classList.add("is-loaded");
  15.             setTimeout(() => {
  16.               loader.classList.remove("is-loaded");
  17.               loader.classList.remove("is-loading");
  18.               setTimeout(() => {
  19.                 wrap.classList.add("is-active");
  20.               }, 0);
  21.             }, 1099);
  22.           }, 500);
  23.         }, 1099);
  24.       }, 0);
  25.     }
  26.   }
  27. };
  28.      
  29. export default ({ isServer }) => {
  30.   if (isServer) return
  31.   // Return a promise to tell nuxt.js to wait for the end of it
  32.   return new Promise((resolve) => {
  33.     setTimeout(resolve, 1000);
  34.   })
  35. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top