cat_ 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bb5f603f6636c29a42b27ee5d18219ec1bcb1f96
4
- data.tar.gz: 871847c23294bf53fdb126cbde597795e28903a3
3
+ metadata.gz: a9defdd5b87bada7c9a8028a76eddec8a793902f
4
+ data.tar.gz: 75190d2e055180fed00d74c20d505ae52ca446f0
5
5
  SHA512:
6
- metadata.gz: b7d2a1b3c52f93d9a2e869ef8f4b078f323bfd2610a02f751f3034282865283ad89c4090e3caa1f5db08fa7e1eaa661da21b6be84df7c3180d16caf975de796e
7
- data.tar.gz: bfe155ae99d300dc18d839d3da025afd1c79ad433d3466d301fd89b910a1946a43ac88d6ec0e9f2b7f2287c462de603ff7e230c8595d555dff6415aec94ad29f
6
+ metadata.gz: f34551b8fd2ec1acc28e34dc8dfa995245a4888b50e0c0037e68c4d4e8f51db333f6ed6a7c5a80ab6b152759f616d4edbb25861c9f191288319ae172602e25fd
7
+ data.tar.gz: eac9ba9abb5060678e11838435841d6f8191658d4c8d65b41427ce6150c45cc933be34bf550784ed5412c851337f4fc8688573d68ad2e6093e0baad8795adc1c
@@ -25,7 +25,7 @@ module Cat
25
25
  %{
26
26
  html
27
27
  head
28
- title Loading Car
28
+ title Loading Cat
29
29
  link(href="skin.css" rel="stylesheet")
30
30
  body
31
31
  #{cat}
@@ -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 = {
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Cat
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
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.1.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-15 00:00:00.000000000 Z
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