loading.html 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <style>
  2. #nuxt-loading {
  3. background: white;
  4. visibility: hidden;
  5. opacity: 0;
  6. position: absolute;
  7. left: 0;
  8. right: 0;
  9. top: 0;
  10. bottom: 0;
  11. display: flex;
  12. justify-content: center;
  13. align-items: center;
  14. flex-direction: column;
  15. animation: nuxtLoadingIn 10s ease;
  16. -webkit-animation: nuxtLoadingIn 10s ease;
  17. animation-fill-mode: forwards;
  18. overflow: hidden;
  19. }
  20. @keyframes nuxtLoadingIn {
  21. 0% {
  22. visibility: hidden;
  23. opacity: 0;
  24. }
  25. 20% {
  26. visibility: visible;
  27. opacity: 0;
  28. }
  29. 100% {
  30. visibility: visible;
  31. opacity: 1;
  32. }
  33. }
  34. @-webkit-keyframes nuxtLoadingIn {
  35. 0% {
  36. visibility: hidden;
  37. opacity: 0;
  38. }
  39. 20% {
  40. visibility: visible;
  41. opacity: 0;
  42. }
  43. 100% {
  44. visibility: visible;
  45. opacity: 1;
  46. }
  47. }
  48. #nuxt-loading>div,
  49. #nuxt-loading>div:after {
  50. border-radius: 50%;
  51. width: 5rem;
  52. height: 5rem;
  53. }
  54. #nuxt-loading>div {
  55. font-size: 10px;
  56. position: relative;
  57. text-indent: -9999em;
  58. border: .5rem solid #F5F5F5;
  59. border-left: .5rem solid black;
  60. -webkit-transform: translateZ(0);
  61. -ms-transform: translateZ(0);
  62. transform: translateZ(0);
  63. -webkit-animation: nuxtLoading 1.1s infinite linear;
  64. animation: nuxtLoading 1.1s infinite linear;
  65. }
  66. #nuxt-loading.error>div {
  67. border-left: .5rem solid #ff4500;
  68. animation-duration: 5s;
  69. }
  70. @-webkit-keyframes nuxtLoading {
  71. 0% {
  72. -webkit-transform: rotate(0deg);
  73. transform: rotate(0deg);
  74. }
  75. 100% {
  76. -webkit-transform: rotate(360deg);
  77. transform: rotate(360deg);
  78. }
  79. }
  80. @keyframes nuxtLoading {
  81. 0% {
  82. -webkit-transform: rotate(0deg);
  83. transform: rotate(0deg);
  84. }
  85. 100% {
  86. -webkit-transform: rotate(360deg);
  87. transform: rotate(360deg);
  88. }
  89. }
  90. </style>
  91. <script>
  92. window.addEventListener('error', function () {
  93. var e = document.getElementById('nuxt-loading');
  94. if (e) {
  95. e.className += ' error';
  96. }
  97. });
  98. </script>
  99. <div id="nuxt-loading" aria-live="polite" role="status"><div>Loading...</div></div>
  100. <!-- https://projects.lukehaas.me/css-loaders -->