11<template >
22 <div id =" loader-wrapper" >
3- <Background ></Background >
43 <div class =" loader-main" >
5- <div class =" loader-squ" v-for =" item in 4" :key =" `out${item}`" >
6- <span v-for =" subItem in 3" :key =" `in${subItem}`" :style =" {background: _tagColor()}" ></span >
4+ <div v-for =" item in 4" :key =" `out${item}`" >
75 </div >
86 </div >
9- <h3 class =" title" >{{isPage ? $frontmatter.title : $site.title}}</h3 >
10- <p class =" description" v-if = " !isPage " >{{$site.description}} </p >
7+ <h3 class =" title" >Welcome {{ $site.title}}</h3 >
8+ <p class =" description" >Just wait a minute! </p >
119 </div >
1210</template >
1311
1412<script >
15- import Background from ' @theme/components/Background'
1613import mixin from ' @theme/mixins/index.js'
1714export default {
18- mixins: [mixin],
19- components: {Background}
15+ mixins: [mixin]
2016};
2117 </script >
2218<style lang="stylus" scoped>
2319#loader-wrapper {
2420 height :100vh ;
2521 width :100vw ;
2622 // background:#888;
27- // background-image: radial-gradient(at center top, green 0px, rgb(0, 1, 5) 100%);
23+ // background-image: radial-gradient(at center top, $accentColor 0px, rgb(0, 1, 5) 100%);
2824 .loader-main {
29- position :absolute ;
30- top :60% ;
25+ position :fixed ;
26+ width :120px ;
27+ height :50px ;
28+ top :45% ;
3129 left :50% ;
32- width :172px ;
33- height :128px ;
34- margin :0 ;
35- -webkit- transform :translate (- 50% ,- 50% );
36- transform :translate (- 50% ,- 50% );
30+ z-index :555 ;
31+ transform :translate (- 50% ,0 );
32+ div {
33+ & :nth-child (2 ){ animation :pacman-balls 1s 0s infinite linear ; }
34+ & :nth-child (3 ){ animation :pacman-balls 1s 0.33s infinite linear ; }
35+ & :nth-child (4 ){ animation :pacman-balls 1s 0.66s infinite linear ; }
36+ & :nth-child (5 ){ animation :pacman-balls 1s 0.99s infinite linear ; }
37+ & :first-of-type {
38+ width :0px ;
39+ height :0px ;
40+ border-right :25px solid transparent ;
41+ border-top :25px solid $accentColor ;
42+ border-left :25px solid $accentColor ;
43+ border-bottom :25px solid $accentColor ;
44+ border-radius :25px ;
45+ animation :rotate_pacman_half_up 0.5s 0s infinite ;
46+ }
47+ & :nth-child (2 ){
48+ width :0px ;
49+ height :0px ;
50+ border-right :25px solid transparent ;
51+ border-top :25px solid $accentColor ;
52+ border-left :25px solid $accentColor ;
53+ border-bottom :25px solid $accentColor ;
54+ border-radius :25px ;
55+ animation :rotate_pacman_half_down 0.5s 0s infinite ;
56+ margin-top :- 50px ;}
57+ & :nth-child (3 ), & :nth-child (4 ), & :nth-child (5 ), & :nth-child (6 ){
58+ background-color :$accentColor ;
59+ width :15px ;
60+ height :15px ;
61+ border-radius :100% ;
62+ margin :2px ;
63+ width :10px ;
64+ height :10px ;
65+ position :absolute ;
66+ transform :translate (0 ,- 6.25px );
67+ top :25px ;
68+ left :100px ;
69+ }
70+ }
3771 }
72+
3873 .title {
3974 position : absolute ;
4075 left 0
@@ -61,104 +96,21 @@ export default {
6196 padding : 0 10px ;
6297 text-shadow 0 2px 10px rgba (0 ,0 ,0 ,0.2 );
6398 }
64- }
6599
66- .loader-squ {
67- position :relative ;
68- & :nth-child (1 ){
69- margin-left :0px ;
70- span {
71- -webkit- animation :animsquare1 2s infinite ease-in ;
72- animation :animsquare1 2s infinite ease-in ;
73- & :nth-child (1 ){
74- -webkit- animation-delay :0.00s ;
75- animation-delay :0.00s
76- }
77- & :nth-child (2 ){
78- -webkit- animation-delay :0.15s ;
79- animation-delay :0.15s
80- }
81- & :nth-child (3 ){
82- -webkit- animation-delay :0.30s ;
83- animation-delay :0.30s
84- }
85- }
86- }
87- & :nth-child (2 ){
88- margin-left :44px ;
89- span {
90- -webkit- animation :animsquare2 2s infinite ease-in ;
91- animation :animsquare2 2s infinite ease-in
92- }
93- }
94- & :nth-child (3 ){
95- margin-left :88px ;
96- span {
97- -webkit- animation :animsquare3 2s infinite ease-in ;
98- animation :animsquare3 2s infinite ease-in
99- }
100+ @keyframes pacman-balls {
101+ 75% {opacity :0.7 ;}
102+ 100% {-webkit- transform :translate (- 100px ,- 6.25px );transform :translate (- 100px ,- 6.25px );}
100103 }
101- & :nth-child (4 ){
102- margin-left :132px ;
103- span {
104- -webkit- animation :animsquare4 2s infinite ease-in ;
105- animation :animsquare4 2s infinite ease-in
106- }
104+ @keyframes rotate_pacman_half_up {
105+ 0% {-webkit- transform :rotate (270deg );transform :rotate (270deg );}
106+ 50% {-webkit- transform :rotate (360deg );transform :rotate (360deg );}
107+ 100% {-webkit- transform :rotate (270deg );transform :rotate (270deg );}
107108 }
108- span {
109- position :absolute ;
110- top :0px ;
111- left :20px ;
112- height :36px ;
113- width :36px ;
114- border-radius :2px ;
115- background-color :#FF FF FF ;
116- box-shadow 0 2px 10px rgba (0 ,0 ,0 ,0.2 );
117- & :nth-child (1 ){top :0px }
118- & :nth-child (2 ){top :44px }
119- & :nth-child (3 ){top :88px }
109+ @keyframes rotate_pacman_half_down {
110+ 0% {-webkit- transform :rotate (90deg );transform :rotate (90deg );}
111+ 50% {-webkit- transform :rotate (0deg );transform :rotate (0deg );}
112+ 100% {-webkit- transform :rotate (90deg );transform :rotate (90deg );}
120113 }
121114}
122115
123- @keyframes animsquare1 {
124- 0% ,5% ,95% ,100% {
125- -webkit- transform :translate (0px ,0px ) rotate (0deg );
126- transform :translate (0px ,0px ) rotate (0deg )
127- }
128- 30% ,70% {
129- -webkit- transform :translate (- 40px ,0px ) rotate (- 90deg );
130- transform :translate (- 40px ,0px ) rotate (- 90deg )
131- }
132- }
133-
134- @keyframes animsquare2 {
135- 0% ,10% ,90% ,100% {
136- -webkit- transform :translate (0px ,0px ) rotate (0deg );
137- transform :translate (0px ,0px ) rotate (0deg )
138- }
139- 35% ,65% {
140- -webkit- transform :translate (- 40px ,0px ) rotate (- 90deg );
141- transform :translate (- 40px ,0px ) rotate (- 90deg )
142- }
143- }
144- @keyframes animsquare3 {
145- 0% ,15% ,85% ,100% {
146- -webkit- transform :translate (0px ,0px ) rotate (0deg );
147- transform :translate (0px ,0px ) rotate (0deg )
148- }
149- 40% ,60% {
150- -webkit- transform :translate (- 40px ,0px ) rotate (- 90deg );
151- transform :translate (- 40px ,0px ) rotate (- 90deg )
152- }
153- }
154- @keyframes animsquare4 {
155- 0% ,20% ,80% ,100% {
156- -webkit- transform :translate (0px ,0px ) rotate (0deg );
157- transform :translate (0px ,0px ) rotate (0deg )
158- }
159- 45% ,55% {
160- -webkit- transform :translate (- 40px ,0px ) rotate (- 90deg );
161- transform :translate (- 40px ,0px ) rotate (- 90deg )
162- }
163- }
164116 </style >
0 commit comments