cat_ 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/cat/skeleton.rb +1 -1
- data/lib/cat/skin.rb +24 -0
- data/lib/cat/skin_node.rb +6 -0
- data/lib/cat/style/animation.rb +19 -0
- data/lib/cat/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9defdd5b87bada7c9a8028a76eddec8a793902f
|
4
|
+
data.tar.gz: 75190d2e055180fed00d74c20d505ae52ca446f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f34551b8fd2ec1acc28e34dc8dfa995245a4888b50e0c0037e68c4d4e8f51db333f6ed6a7c5a80ab6b152759f616d4edbb25861c9f191288319ae172602e25fd
|
7
|
+
data.tar.gz: eac9ba9abb5060678e11838435841d6f8191658d4c8d65b41427ce6150c45cc933be34bf550784ed5412c851337f4fc8688573d68ad2e6093e0baad8795adc1c
|
data/lib/cat/skeleton.rb
CHANGED
data/lib/cat/skin.rb
CHANGED
@@ -8,6 +8,30 @@ module Cat
|
|
8
8
|
body {
|
9
9
|
background-color: $bgColor;
|
10
10
|
}
|
11
|
+
|
12
|
+
@keyframes rotating {
|
13
|
+
from {
|
14
|
+
transform: rotate(0deg);
|
15
|
+
}
|
16
|
+
|
17
|
+
to {
|
18
|
+
transform: rotate(720deg);
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
@keyframes speedup {
|
23
|
+
0% {
|
24
|
+
transform: rotate(0deg);
|
25
|
+
}
|
26
|
+
|
27
|
+
75% {
|
28
|
+
transform: rotate(280deg)
|
29
|
+
}
|
30
|
+
|
31
|
+
100% {
|
32
|
+
transform: rotate(360deg);
|
33
|
+
}
|
34
|
+
}
|
11
35
|
}
|
12
36
|
|
13
37
|
@variables = {
|
data/lib/cat/skin_node.rb
CHANGED
@@ -9,6 +9,7 @@ require 'cat/style/clip'
|
|
9
9
|
require 'cat/style/position'
|
10
10
|
require 'cat/style/offset'
|
11
11
|
require 'cat/style/rounded'
|
12
|
+
require 'cat/style/animation'
|
12
13
|
|
13
14
|
module Cat
|
14
15
|
class SkinNode
|
@@ -77,6 +78,11 @@ module Cat
|
|
77
78
|
self
|
78
79
|
end
|
79
80
|
|
81
|
+
def animation(name = :rotating)
|
82
|
+
@styles << Style::Animation.new(name)
|
83
|
+
self
|
84
|
+
end
|
85
|
+
|
80
86
|
def to_s
|
81
87
|
@styles.join("\n")
|
82
88
|
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Cat
|
2
|
+
module Style
|
3
|
+
class Animation
|
4
|
+
def initialize(name)
|
5
|
+
@name = name
|
6
|
+
end
|
7
|
+
|
8
|
+
def to_s
|
9
|
+
%{
|
10
|
+
animation-name: #{@name};
|
11
|
+
animation-duration: 2.79s;
|
12
|
+
animation-direction: reverse;
|
13
|
+
animation-iteration-count: infinite;
|
14
|
+
animation-timing-function: linear;
|
15
|
+
}
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/cat/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cat_
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 蒼時弦也
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -119,6 +119,7 @@ files:
|
|
119
119
|
- lib/cat/skeleton_node.rb
|
120
120
|
- lib/cat/skin.rb
|
121
121
|
- lib/cat/skin_node.rb
|
122
|
+
- lib/cat/style/animation.rb
|
122
123
|
- lib/cat/style/center.rb
|
123
124
|
- lib/cat/style/clip.rb
|
124
125
|
- lib/cat/style/ellipse.rb
|