loader.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <div id="loader">
  2. <div class="loading-animation">
  3. <div class="svg-wrap">
  4. <svg class="l1" width="250px" height="250px">
  5. <path d="M242.8,131.8c-0.4-29.9-22.1-50.1-48.1-50c-16.9,0-28.6,8.4-28.6,8.4s12.7-16.2,12.6-36.9c-0.2-24.7-23-47.9-52.4-47.9C97.6,5.4,71.8,26,72.3,55.5C72.6,76.3,85,90.2,85,90.2c0,0-13.9-8.7-29-8.2C16.5,83,6.6,115.8,7.3,132.9c1.2,33.4,15.4,53.8,52.7,54.2c34.2,0.4,54.9-32.3,61-43.5c1.5-9.5,0-13.9,0-13.9c-3.1,1.6-14.5,27.9-35.6,16.1c-6.8-3.8-8.8-16.7-5.2-26.3c6.3-16.9,18.3-18.7,36-40.3c6.8-8.3,8.2-13.6,8.2-13.6s1.2,5.2,7.8,13.2c17.4,21.2,30.1,23.6,36.7,40.4c4.1,10.4,1.8,23-6,26.9c-20.3,10.1-31.4-15.1-34.9-16.5c0,0-1.2,4,0.1,12.8c2.6,5.7,21.7,44.2,64,44.2C226.3,186.6,243.1,156.2,242.8,131.8z"/>
  6. </svg>
  7. <svg class="l2" width="250px" height="250px">
  8. <path d="M124.5,154.1c0,0-10.8,37.5-12.7,41.9c-4.9,11.3-26.6,38.8-26.6,38.8s25.2-2.8,40.4-2.8c15.6,0,39.2,3.2,39.2,3.2s-22.8-28.1-27.6-39.6C135.4,191.2,124.5,154.1,124.5,154.1z"/>
  9. </svg>
  10. <svg class="l3" width="250px" height="250px">
  11. <path d="M0.5,125a124.5,124.5 0 1,0 249,0a124.5,124.5 0 1,0 -249,0"/>
  12. </svg>
  13. </div>
  14. </div>
  15. </div>
  16. <script>
  17. /* Hide the preloader on full page load, with a fail-safe so a hung resource
  18. (or a load event that already fired) can never leave it stuck. Vanilla, so it
  19. runs independently of jQuery / the per-page scripts. */
  20. (function () {
  21. var HOLD = 1000; // keep the loader up a beat after the page is ready
  22. var FADE = 2000; // slow fade-out (ms)
  23. var FAILSAFE = 9000; // hard cap so it can never stick
  24. var done = false;
  25. function hideLoader() {
  26. if (done) return;
  27. done = true;
  28. var el = document.getElementById('loader');
  29. if (!el) return;
  30. el.style.transition = 'opacity ' + FADE + 'ms ease';
  31. el.style.opacity = '0';
  32. setTimeout(function () { el.style.display = 'none'; }, FADE);
  33. }
  34. function schedule() { setTimeout(hideLoader, HOLD); }
  35. if (document.readyState === 'complete') schedule();
  36. else window.addEventListener('load', schedule);
  37. setTimeout(hideLoader, FAILSAFE); // fail-safe — never trap behind a hung resource
  38. })();
  39. </script>