|
1 | 1 | <style> |
2 | 2 | body, html, #<%= globals.id %> { |
3 | | - background: <%= options.background %>; |
| 3 | + background: <%= (options.theme === 'dark' ? '#2F4A5F' : 'white') %>; |
4 | 4 | width: 100%; |
5 | 5 | height: 100%; |
6 | 6 | display: flex; |
|
9 | 9 | margin: 0; |
10 | 10 | padding: 0; |
11 | 11 | } |
12 | | - |
13 | | -.logo { |
14 | | - animation: turn 2s linear forwards 1s; |
15 | | - transform: rotateX(180deg); |
16 | | - position: relative; |
17 | | - height: 346px; |
18 | | - width: 536px; |
19 | | -} |
20 | | - |
21 | | -.triangle { |
22 | | - position: absolute; |
23 | | - top: 0; |
24 | | - left: 0; |
25 | | - width: 0; |
26 | | - height: 0; |
27 | | -} |
28 | | -.triangle--one { |
29 | | - border-left: 210px solid transparent; |
30 | | - border-right: 210px solid transparent; |
31 | | - border-bottom: 360px solid #41B883; |
32 | | -} |
33 | | -.triangle--two { |
34 | | - top: 60px; |
35 | | - left: 70px; |
36 | | - animation: goright 0.5s linear forwards 3.5s; |
37 | | - border-left: 175px solid transparent; |
38 | | - border-right: 175px solid transparent; |
39 | | - border-bottom: 300px solid #3B8070; |
40 | | -} |
41 | | -.triangle--three { |
42 | | - top: 120px; |
43 | | - left: 70px; |
44 | | - animation: goright 0.5s linear forwards 3.5s; |
45 | | - border-left: 140px solid transparent; |
46 | | - border-right: 140px solid transparent; |
47 | | - border-bottom: 240px solid #35495E; |
| 12 | +#nuxt-loading { |
| 13 | + animation: opacity 1s ease-in-out; |
| 14 | + animation-fill-mode: forwards; |
| 15 | + animation-delay: 1s; |
| 16 | + opacity: 0; |
48 | 17 | } |
49 | | -.triangle--four { |
50 | | - top: 240px; |
51 | | - left: 140px; |
52 | | - animation: godown 0.5s linear forwards 3s; |
53 | | - border-left: 70px solid transparent; |
54 | | - border-right: 70px solid transparent; |
55 | | - border-bottom: 120px solid #fff; |
| 18 | +#nuxt-loading .logo { |
| 19 | + position: relative; |
| 20 | + height: 166px; |
| 21 | + width: 220px; |
56 | 22 | } |
57 | | - |
58 | | -@keyframes turn { |
59 | | - 100% { |
60 | | - transform: rotateX(0deg); |
61 | | - } |
| 23 | +#nuxt-loading-status { |
| 24 | + font-family: sans-serif; |
| 25 | + font-weight: 500; |
| 26 | + text-align: center; |
| 27 | + color: <%= (options.theme === 'dark' ? 'white' : '#2F4A5F') %>; |
62 | 28 | } |
63 | | -@keyframes godown { |
64 | | - 100% { |
65 | | - top: 360px; |
66 | | - } |
| 29 | +#nuxt-loading-status.errored { |
| 30 | + color: <%= (options.theme === 'dark' ? '#da6371' : '#D0021B') %>; |
67 | 31 | } |
68 | | -@keyframes goright { |
| 32 | +@keyframes opacity { |
69 | 33 | 100% { |
70 | | - left: 140px; |
| 34 | + opacity: 1; |
71 | 35 | } |
72 | 36 | } |
73 | 37 | </style> |
74 | 38 |
|
75 | | -<div class="logo"> |
76 | | -<div class="triangle triangle--two"></div> |
77 | | -<div class="triangle triangle--one"></div> |
78 | | -<div class="triangle triangle--three"></div> |
79 | | -<div class="triangle triangle--four"></div> |
| 39 | +<div id="nuxt-loading"> |
| 40 | + <svg class="logo" width="220" height="166" xmlns="http://www.w3.org/2000/svg"> |
| 41 | + <g transform="translate(-18 -29)" fill="none" fill-rule="evenodd"> |
| 42 | + <path d="M0 176h67.883a22.32 22.32 0 0 1 2.453-7.296L134 57.718 100.881 0 0 176zM218.694 176H250L167.823 32 153 58.152l62.967 110.579a21.559 21.559 0 0 1 2.727 7.269z" /> |
| 43 | + <path d="M86.066 189.388a8.241 8.241 0 0 1-.443-.908 11.638 11.638 0 0 1-.792-6.566H31.976l78.55-138.174 33.05 58.932L154 94.882l-32.69-58.64C120.683 35.1 116.886 29 110.34 29c-2.959 0-7.198 1.28-10.646 7.335L20.12 176.185c-.676 1.211-3.96 7.568-.7 13.203C20.912 191.95 24.08 195 31.068 195h66.646c-6.942 0-10.156-3.004-11.647-5.612z" fill="#00C58E" /> |
| 44 | + <path d="M235.702 175.491L172.321 62.216c-.655-1.191-4.313-7.216-10.68-7.216-2.868 0-6.977 1.237-10.32 7.193L143 75.706v26.104l18.709-32.31 62.704 111.626h-23.845c.305 1.846.134 3.74-.496 5.498a7.06 7.06 0 0 1-.497 1.122l-.203.413c-3.207 5.543-10.139 5.841-11.494 5.841h37.302c1.378 0 8.287-.298 11.493-5.841 1.423-2.52 2.439-6.758-.97-12.668z" fill="#108775" /> |
| 45 | + <path d="M201.608 189.07l.21-.418c.206-.364.378-.745.515-1.139a10.94 10.94 0 0 0 .515-5.58 16.938 16.938 0 0 0-2.152-5.72l-49.733-87.006L143.5 76h-.136l-7.552 13.207-49.71 87.006a17.534 17.534 0 0 0-1.917 5.72c-.4 2.21-.148 4.486.725 6.557.13.31.278.613.444.906 1.497 2.558 4.677 5.604 11.691 5.604h92.592c1.473 0 8.651-.302 11.971-5.93zm-58.244-86.657l45.455 79.52H97.934l45.43-79.52z" fill="<%= (options.theme === 'dark' ? 'white' : '#2F4A5F') %>" fill-rule="nonzero" /> |
| 46 | + </g> |
| 47 | + </svg> |
| 48 | + <h3 id="nuxt-loading-status">Loading...</h3> |
80 | 49 | </div> |
81 | 50 |
|
82 | | - |
83 | | -<!-- https://codepen.io/alexchopin/pen/jBWrej --> |
| 51 | +<script> |
| 52 | + window.addEventListener('error', function () { |
| 53 | + var e = document.getElementById('nuxt-loading-status'); |
| 54 | + if (e) { |
| 55 | + e.innerHTML = 'An error occurred'; |
| 56 | + e.className += 'errored' |
| 57 | + } |
| 58 | + }); |
| 59 | + </script> |
0 commit comments