File tree Expand file tree Collapse file tree 12 files changed +845
-12
lines changed Expand file tree Collapse file tree 12 files changed +845
-12
lines changed Original file line number Diff line number Diff line change 15
15
<script >
16
16
import RotateSquare from ' ./components/RotateSquare'
17
17
import RotateSquare2 from ' ./components/RotateSquare2'
18
+ import RotateSquare3 from ' ./components/RotateSquare3'
19
+ import RotateSquare4 from ' ./components/RotateSquare4'
18
20
import DoubleBounce from ' ./components/DoubleBounce'
19
21
import Stretch from ' ./components/Stretch'
20
22
import Cube from ' ./components/Cube'
@@ -33,11 +35,19 @@ import Gauge from './components/Gauge'
33
35
import Origami from ' ./components/Origami'
34
36
import Hexagon from ' ./components/Hexagon'
35
37
import Socket from ' ./components/Socket'
38
+ import HourGlass from ' ./components/HourGlass'
39
+ import Pencil from ' ./components/Pencil'
40
+ import Jawn from ' ./components/Jawn'
41
+ import LetterCube from ' ./components/LetterCube'
42
+ import PingPong from ' ./components/PingPong'
43
+ import Diamond from ' ./components/Diamond'
36
44
export default {
37
45
name: ' app' ,
38
46
components: {
39
47
RotateSquare,
40
48
RotateSquare2,
49
+ RotateSquare3,
50
+ RotateSquare4,
41
51
DoubleBounce,
42
52
Stretch,
43
53
Cube,
@@ -55,14 +65,22 @@ export default {
55
65
Gauge,
56
66
Hexagon,
57
67
Socket,
58
- Origami
68
+ Origami,
69
+ HourGlass,
70
+ Pencil,
71
+ Jawn,
72
+ LetterCube,
73
+ PingPong,
74
+ Diamond
59
75
},
60
76
data () {
61
77
return {
62
78
size: ' 50px' ,
63
79
spinners: [
64
80
' RotateSquare' ,
65
81
' RotateSquare2' ,
82
+ ' RotateSquare3' ,
83
+ ' RotateSquare4' ,
66
84
' DoubleBounce' ,
67
85
' Stretch' ,
68
86
' Cube' ,
@@ -80,7 +98,13 @@ export default {
80
98
' Gauge' ,
81
99
' Origami' ,
82
100
' Hexagon' ,
83
- ' Socket'
101
+ ' Socket' ,
102
+ ' HourGlass' ,
103
+ ' Pencil' ,
104
+ ' Jawn' ,
105
+ ' LetterCube' ,
106
+ ' PingPong' ,
107
+ ' Diamond'
84
108
]
85
109
}
86
110
}
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <span v-bind:style =" styles" class =" spinner spinner--rotate-diamond" >
3
+ <div v-bind:style =" diamondStyle" class =' diamond' ></div >
4
+ <div v-bind:style =" diamondStyle" class =' diamond' ></div >
5
+ <div v-bind:style =" diamondStyle" class =' diamond' ></div >
6
+ </span >
7
+ </template >
8
+
9
+ <script >
10
+ export default {
11
+ props: {
12
+ size: {
13
+ default: ' 40px'
14
+ },
15
+ color: {
16
+ default: ' #41b883'
17
+ }
18
+ },
19
+ computed: {
20
+ diamondStyle () {
21
+ let size = parseInt (this .size )
22
+ return {
23
+ width: size / 4 + ' px' ,
24
+ height: size / 4 + ' px'
25
+ }
26
+ },
27
+ styles () {
28
+ let size = parseInt (this .size )
29
+ return {
30
+ width: this .size ,
31
+ height: size / 4 + ' px'
32
+ }
33
+ }
34
+ }
35
+ }
36
+ </script >
37
+
38
+ <style lang="scss" scoped>
39
+ $base : #1C78C5 ; $accent : #41b883 ;
40
+ $duration : 1500ms ; $timing : linear ;
41
+
42
+ .spinner {
43
+ position : relative ;
44
+ .diamond {
45
+ position : absolute ;
46
+ left : 0 ;
47
+ top : 0 ;
48
+ border-radius : 2px ;
49
+ background : $accent ;
50
+ transform : translateX (-50% ) rotate (45deg ) scale (0 );
51
+ animation : diamonds $duration $timing infinite ;
52
+ @for $i from 1 through 4 {
53
+ & :nth-child (#{$i } ) {
54
+ animation-delay : - ($duration / 1.5 ) * $i ;
55
+ }
56
+ }
57
+ }
58
+ }
59
+ @keyframes diamonds {
60
+ 50% {
61
+ left : 50% ;
62
+ transform : translateX (-50% ) rotate (45deg ) scale (1 );
63
+ }
64
+ 100% {
65
+ left : 100% ;
66
+ transform : translateX (-50% ) rotate (45deg ) scale (0 );
67
+ }
68
+ }
69
+ </style >
Original file line number Diff line number Diff line change @@ -26,14 +26,14 @@ export default {
26
26
text-indent : -9999px ;
27
27
display : inline-block ;
28
28
background : #f86 ;
29
- border-radius : 24 px ;
29
+ border-radius : 50 % ;
30
30
transform : rotateZ (90deg );
31
31
transform-origin : 50% 50% ;
32
32
animation : plus- loader- background 3s infinite ease-in-out ;
33
33
}
34
34
.spinner ::after {
35
35
background : #f86 ;
36
- border-radius : 24 px 0 0 24 px ;
36
+ border-radius : 50 % 0 0 50 % ;
37
37
content : ' ' ;
38
38
position : absolute ;
39
39
right : 50% ;
@@ -45,7 +45,7 @@ export default {
45
45
}
46
46
.spinner ::before {
47
47
background : #fc6 ;
48
- border-radius : 24 px 0 0 24 px ;
48
+ border-radius : 50 % 0 0 50 % ;
49
49
content : ' ' ;
50
50
position : absolute ;
51
51
right : 50% ;
@@ -190,4 +190,4 @@ export default {
190
190
animation-timing-function : step-start ;
191
191
}
192
192
}
193
- </style >
193
+ </style >
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ export default {
57
57
height : 164px ;
58
58
display : block ;
59
59
position : absolute ;
60
- border : 2 px solid #41b883 ;
60
+ border : 7 px solid #41b883 ;
61
61
border-radius : 50% ;
62
62
top : -2px ;
63
63
left : -2px ;
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <div v-bind:style =" styles" class =" spinner spinner--hour-glass" >
3
+ <div v-bind:style =" innerStyles" class =" spinner-inner" >
4
+ <svg class =" hourglass" xmlns =" http://www.w3.org/2000/svg" viewBox =" 0 0 120 206" preserveAspectRatio =" none" >
5
+ <path class =" middle" d =" M120 0H0v206h120V0zM77.1 133.2C87.5 140.9 92 145 92 152.6V178H28v-25.4c0-7.6 4.5-11.7 14.9-19.4 6-4.5 13-9.6 17.1-17 4.1 7.4 11.1 12.6 17.1 17zM60 89.7c-4.1-7.3-11.1-12.5-17.1-17C32.5 65.1 28 61 28 53.4V28h64v25.4c0 7.6-4.5 11.7-14.9 19.4-6 4.4-13 9.6-17.1 16.9z" />
6
+ <path class =" outer" d =" M93.7 95.3c10.5-7.7 26.3-19.4 26.3-41.9V0H0v53.4c0 22.5 15.8 34.2 26.3 41.9 3 2.2 7.9 5.8 9 7.7-1.1 1.9-6 5.5-9 7.7C15.8 118.4 0 130.1 0 152.6V206h120v-53.4c0-22.5-15.8-34.2-26.3-41.9-3-2.2-7.9-5.8-9-7.7 1.1-2 6-5.5 9-7.7zM70.6 103c0 18 35.4 21.8 35.4 49.6V192H14v-39.4c0-27.9 35.4-31.6 35.4-49.6S14 81.2 14 53.4V14h92v39.4C106 81.2 70.6 85 70.6 103z" />
7
+ </svg >
8
+ </div >
9
+ </div >
10
+ </template >
11
+
12
+ <script >
13
+ export default {
14
+ props: {
15
+ size: {
16
+ default: ' 40px'
17
+ }
18
+ },
19
+ computed: {
20
+ innerStyles () {
21
+ let size = parseInt (this .size )
22
+ let baseSize = 64
23
+ let ratio = 1
24
+ if (size > baseSize) {
25
+ ratio = baseSize / size
26
+ } else {
27
+ ratio = size / baseSize
28
+ }
29
+ return {
30
+ transform: ' scale(' + ratio + ' )'
31
+ }
32
+ },
33
+ styles () {
34
+ return {
35
+ width: this .size ,
36
+ height: this .size
37
+ }
38
+ }
39
+ }
40
+ }
41
+ </script >
42
+
43
+ <style lang="scss" scoped>
44
+ $bg : #fff ;
45
+ $fill :#41b883 ;
46
+ .spinner {
47
+ display : flex ;
48
+ justify-content : center ;
49
+ align-items : center ;
50
+ }
51
+ .hourglass {
52
+ display :block ;
53
+ background :$bg ;
54
+ width :32px ;
55
+ height :64px ;
56
+ box-shadow :
57
+ inset $bg 0 0 0 0 ,
58
+ inset $fill 0 32px 0 0 ,
59
+ inset $bg 0 0 64px 0 ;
60
+ animation :hourglass 1s linear infinite ;
61
+ }
62
+
63
+ .outer {
64
+ fill :$fill ;
65
+ }
66
+
67
+ .middle {
68
+ fill :$bg ;
69
+ }
70
+
71
+ @keyframes hourglass {
72
+ 0% {
73
+ transform :rotate (0deg );
74
+ box-shadow :
75
+ inset $bg 0 0 0 0 ,
76
+ inset $fill 0 32px 0 0 ,
77
+ inset $bg 0 64px 0 0 ,
78
+ inset $fill 0 64px 0 0 ;
79
+ }
80
+ 80% {
81
+ transform :rotate (0deg );
82
+ box-shadow :
83
+ inset $bg 0 32px 0 0 ,
84
+ inset $fill 0 32px 0 0 ,
85
+ inset $bg 0 32px 0 0 ,
86
+ inset $fill 0 64px 0 0 ;
87
+ }
88
+ 100% {
89
+ transform :rotate (180deg );
90
+ box-shadow :
91
+ inset $bg 0 32px 0 0 ,
92
+ inset $fill 0 32px 0 0 ,
93
+ inset $bg 0 32px 0 0 ,
94
+ inset $fill 0 64px 0 0 ;
95
+ }
96
+ }
97
+ </style >
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <div class =" spinner spinner--jawn" >
3
+ <div :style =" styles" class =" spinner-inner" >
4
+ <div :style =" innerStyles" class =" jawn" ></div >
5
+ </div >
6
+ </div >
7
+ </template >
8
+
9
+ <script >
10
+ export default {
11
+ props: {
12
+ size: {
13
+ default: ' 40px'
14
+ },
15
+ color: {
16
+ default: ' #41b883'
17
+ }
18
+ },
19
+ computed: {
20
+ innerStyles () {
21
+ let size = parseInt (this .size )
22
+ return {
23
+ transform: ' scale(' + (size / 70 ) + ' )'
24
+ }
25
+ },
26
+ styles () {
27
+ return {
28
+ width: this .size ,
29
+ height: this .size
30
+ }
31
+ }
32
+ }
33
+ }
34
+ </script >
35
+
36
+ <style lang="scss" scoped>
37
+ $blue : #41b883 ;
38
+ .spinner-inner {
39
+ width : 70px ;
40
+ height : 70px ;
41
+ display : flex ;
42
+ justify-content : center ;
43
+ align-items : center ;
44
+ }
45
+ .jawn {
46
+ position : relative ;
47
+ background-color : #F8E71C ;
48
+ width : 15px ;
49
+ height : 15px ;
50
+ margin : 0 auto ;
51
+ border-radius : 50% ;
52
+
53
+ & :after , & :before {
54
+ content : " " ;
55
+ position : absolute ;
56
+ width : 6px ;
57
+ height : 6px ;
58
+ border-radius : 50% ;
59
+ }
60
+
61
+ & :after {
62
+ left : -10px ;
63
+ top : -5px ;
64
+ background-color : #f7484e ;
65
+ transform-origin : 15px 10px ;
66
+ animation : jawn- axis 1s linear infinite ;
67
+ }
68
+ & :before {
69
+ left : -25px ;
70
+ top : -15px ;
71
+ background-color : $blue ;
72
+ transform-origin : 30px 20px ;
73
+ animation : jawn- axis 2s linear infinite ;
74
+ }
75
+ }
76
+
77
+ @keyframes jawn-axis {
78
+ 0% {
79
+ transform : rotateZ (0deg ) translate3d (0 ,0 ,0 );
80
+ }
81
+ 100% {
82
+ transform : rotateZ (360deg ) translate3d (0 ,0 ,0 );
83
+ }
84
+ }
85
+ </style >
You can’t perform that action at this time.
0 commit comments