volt-spinner 0.0.1

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 4db26ad92927dc8d7f2be11f7766d5d4e27f2116
4
+ data.tar.gz: 223adb9fe4095e4b7c42a404f1eb8a136defdca1
5
+ SHA512:
6
+ metadata.gz: dd17b449b02b25d65ab1dc7c9778772a5939676016baf9e8949bccbea45cb6e15321c6b2be8e8954d81b6af0cf63c7406fdd977e43fa7fd0a691c7d1d33de484
7
+ data.tar.gz: 0d6f6a9d22bfba46e1e2bb8dc1f21b11146014007e1d82ae4da45fa4ee54d3847a64df2212e70bf720204303c6bb1e74d3b074c7fa8c3c71ae163885d3bed80a
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in volt-spinner.gemspec
4
+ gemspec
data/README.md ADDED
@@ -0,0 +1,44 @@
1
+ # Volt Spinner
2
+
3
+ This gem is a simple spinner component for Volt.
4
+
5
+
6
+ # Install
7
+
8
+ Add this line to your application's Gemfile:
9
+
10
+ gem 'volt-spinner'
11
+
12
+ And then execute:
13
+
14
+ $ bundle
15
+
16
+ Add the following code to your Dependencies file:
17
+
18
+ component 'spinner'
19
+
20
+
21
+ # Use
22
+
23
+ Place this code in any view:
24
+
25
+ <:spinner />
26
+
27
+ This will create a simple spinner.
28
+
29
+ <:spinner size='1.5' />
30
+
31
+ Change the size by entering a value from 0.1 to 5. The default value is 1.
32
+
33
+ <:spinner size='1.5' color='#545454' />
34
+
35
+ Set the color by passing in any hex color.
36
+
37
+
38
+ # Contributing
39
+
40
+ 1. Fork it ( http://github.com/[my-github-username]/volt-spinner/fork )
41
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
42
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
43
+ 4. Push to the branch (`git push origin my-new-feature`)
44
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.1
@@ -0,0 +1,53 @@
1
+ .spinner {
2
+ margin: 100px auto;
3
+ width: 50px;
4
+ height: 52px;
5
+ text-align: center;
6
+ font-size: 10px;
7
+ }
8
+
9
+ .spinner > div {
10
+ background-color: #333;
11
+ height: 100%;
12
+ width: 6px;
13
+ display: block;
14
+ float:left;
15
+
16
+ -webkit-animation: stretchdelay 1.2s infinite ease-in-out;
17
+ animation: stretchdelay 1.2s infinite ease-in-out;
18
+ }
19
+
20
+ .spinner .rect2 {
21
+ -webkit-animation-delay: -1.1s;
22
+ animation-delay: -1.1s;
23
+ }
24
+
25
+ .spinner .rect3 {
26
+ -webkit-animation-delay: -1.0s;
27
+ animation-delay: -1.0s;
28
+ }
29
+
30
+ .spinner .rect4 {
31
+ -webkit-animation-delay: -0.9s;
32
+ animation-delay: -0.9s;
33
+ }
34
+
35
+ .spinner .rect5 {
36
+ -webkit-animation-delay: -0.8s;
37
+ animation-delay: -0.8s;
38
+ }
39
+
40
+ @-webkit-keyframes stretchdelay {
41
+ 0%, 40%, 100% { -webkit-transform: scaleY(0.4) }
42
+ 20% { -webkit-transform: scaleY(1.0) }
43
+ }
44
+
45
+ @keyframes stretchdelay {
46
+ 0%, 40%, 100% {
47
+ transform: scaleY(0.4);
48
+ -webkit-transform: scaleY(0.4);
49
+ } 20% {
50
+ transform: scaleY(1.0);
51
+ -webkit-transform: scaleY(1.0);
52
+ }
53
+ }
@@ -0,0 +1,34 @@
1
+ module Spinner
2
+ class IndexController
3
+
4
+ def initialize(data=nil)
5
+ @data = data
6
+ end
7
+
8
+ def color
9
+ @data.color if @data && @data.locals.has_key?("color")
10
+ end
11
+
12
+ def size
13
+ if @data && @data.locals.has_key?("size")
14
+ s = ReactiveValue.new(@data.size).to_i
15
+ s.with{|v| [[v, 0.25].max, 4].min }
16
+ else
17
+ 1
18
+ end
19
+ end
20
+
21
+ def width
22
+ (size * 7).round
23
+ end
24
+
25
+ def margin
26
+ (size * 3).round
27
+ end
28
+
29
+ def height
30
+ (size * 52).round
31
+ end
32
+
33
+ end
34
+ end
@@ -0,0 +1,10 @@
1
+ <:body>
2
+ <div class="spinner" style='height: {height}px; width: {(width + margin) * 5}px;'>
3
+ <div class="rect1" style='background: {color}; width: {width}px; margin-right:{margin}px;'></div>
4
+ <div class="rect2" style='background: {color}; width: {width}px; margin-right:{margin}px;'></div>
5
+ <div class="rect3" style='background: {color}; width: {width}px; margin-right:{margin}px;'></div>
6
+ <div class="rect4" style='background: {color}; width: {width}px; margin-right:{margin}px;'></div>
7
+ <div class="rect5" style='background: {color}; width: {width}px; margin-right:{margin}px;'></div>
8
+ </div>
9
+ <div style='clear:both;'></div>
10
+ </:body>
@@ -0,0 +1,7 @@
1
+ require "volt/spinner/version"
2
+
3
+ class Volt
4
+ class Spinner
5
+ # Your code goes here...
6
+ end
7
+ end
@@ -0,0 +1,25 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ version = File.read(File.expand_path('../VERSION', __FILE__)).strip
6
+
7
+
8
+ Gem::Specification.new do |spec|
9
+ spec.name = "volt-spinner"
10
+ spec.version = version
11
+ spec.authors = ["Corey"]
12
+ spec.email = ["coreystout@gmail.com"]
13
+ spec.summary = "Volt Spinner"
14
+ spec.description = "A simple spinner for Volt."
15
+ spec.homepage = "https://github.com/voltrb/volt-spinner"
16
+ spec.license = "MIT"
17
+
18
+ spec.files = `git ls-files -z`.split("\x0")
19
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
20
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
21
+ spec.require_paths = ["lib"]
22
+
23
+ spec.add_development_dependency "volt", "~> 0.4.0"
24
+ spec.add_development_dependency "rake"
25
+ end
metadata ADDED
@@ -0,0 +1,83 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: volt-spinner
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Corey
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-01-31 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: volt
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: 0.4.0
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: 0.4.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: A simple spinner for Volt.
42
+ email:
43
+ - coreystout@gmail.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - .gitignore
49
+ - Gemfile
50
+ - README.md
51
+ - Rakefile
52
+ - VERSION
53
+ - app/spinner/assets/css/spinner.css.scss
54
+ - app/spinner/controllers/index_controller.rb
55
+ - app/spinner/views/index/index.html
56
+ - lib/volt/spinner.rb
57
+ - volt-spinner.gemspec
58
+ homepage: https://github.com/voltrb/volt-spinner
59
+ licenses:
60
+ - MIT
61
+ metadata: {}
62
+ post_install_message:
63
+ rdoc_options: []
64
+ require_paths:
65
+ - lib
66
+ required_ruby_version: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - '>='
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ required_rubygems_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ requirements: []
77
+ rubyforge_project:
78
+ rubygems_version: 2.1.11
79
+ signing_key:
80
+ specification_version: 4
81
+ summary: Volt Spinner
82
+ test_files: []
83
+ has_rdoc: