click_effects-rails 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: d9430eda9bbd6470cc5ffcda8cbb99812375355f
4
+ data.tar.gz: 83c112dce73206bf4a7ee48d73b03b907c6fc4da
5
+ SHA512:
6
+ metadata.gz: b6fd6b1d5097850773cceae338c8b8e6891fb32bc747a1c38c9b91ba9221aca1a8e92e172dc2238368cdbcd0e8b5af0403d31750aa2c51901cd2ebec97d52058
7
+ data.tar.gz: 7d71ea83bb40766da60e2500ddc0dc763df8575288fb34d67321a2460122d45db3af4cfc54df6bdfbe7854320cd15211391b18b219dddadcc7ce13c7c5bc6dfe
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in click_effects-rails.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 brettimus
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,68 @@
1
+ # click_effects-rails
2
+
3
+ **NB: This is very rough**
4
+
5
+ An asset gem for the stellar [ClickEffects library](https://github.com/codrops/ClickEffects) from [codrops](http://tympanus.net/codrops/).
6
+
7
+ I haven't included any of the custom SVG from codrop's original implementation, which means some of the animations may not work (e.g., _zorka_).
8
+
9
+ Also, I am lazy and this is rails, so I just used some hacky jQuery to add/remove the `cbutton--click` class.
10
+
11
+ Also also, I'm super lazy. I didn't include any of the modernizr code. You're free to lend a hand (pull request) to fix my lazy.
12
+
13
+ ## TODO
14
+
15
+ If you're awesome, you'll consider modularizing all of the animation code so one can include only the animations one needs.
16
+
17
+ Or, maybe you want to create a soild javascript interface for this little design-ditty.
18
+
19
+ Who knows? Go wild!
20
+
21
+ ## Installation
22
+
23
+ Add this line to your application's Gemfile:
24
+
25
+ ```ruby
26
+ gem 'click_effects-rails'
27
+ ```
28
+
29
+ Then, add this line to your `application.css` file:
30
+ ```
31
+ *= require click_effects
32
+ ```
33
+
34
+ And this line to your `application.js` file:
35
+ ```
36
+ //= require click_effects
37
+ ```
38
+
39
+ And then execute:
40
+
41
+ $ bundle
42
+
43
+
44
+ ## Usage
45
+
46
+ See the [article](http://tympanus.net/codrops/2015/02/11/subtle-click-feedback-effects/) at codrops, or check out [the demos](http://tympanus.net/Development/ClickEffects/).
47
+
48
+ ## Versioning
49
+
50
+ ClickEffects was not published with a version, so this Gem is starting out with `0.0.1`.
51
+ (I.e., please DO NOT consider it stable.)
52
+
53
+ ## License
54
+
55
+ See the original license for the codrop project [here](http://tympanus.net/codrops/licensing/)
56
+
57
+ ## Contributing
58
+
59
+ 1. Fork it ( https://github.com/brettimus/click_effects-rails/fork )
60
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
61
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
62
+ 4. Push to the branch (`git push origin my-new-feature`)
63
+ 5. Create a new Pull Request - we'll do the honor system that you tested it
64
+
65
+ ## Testing
66
+
67
+ I created an ad-hoc rails app to test the gem.
68
+ Maybe I'll put that up later. `¯\_(ツ)_/¯`
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
@@ -0,0 +1,23 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'click_effects/rails/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "click_effects-rails"
8
+ spec.version = ClickEffects::Rails::VERSION
9
+ spec.authors = ["brettimus"]
10
+ spec.email = ["brbeut@gmail.com"]
11
+ spec.summary = %q{asset gem for ClickEffects by codrop}
12
+ spec.description = %q{}
13
+ spec.homepage = "https://github.com/brettimus/click_effects-rails"
14
+ spec.license = "http://tympanus.net/codrops/licensing/"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.require_paths = ["lib"]
18
+
19
+ spec.add_development_dependency "bundler", "~> 1.7"
20
+ spec.add_development_dependency "rake", "~> 10.0"
21
+ spec.add_dependency 'railties" '
22
+ spec.add_dependency 'jquery-rails'
23
+ end
@@ -0,0 +1,5 @@
1
+ module ClickEffects
2
+ module Rails
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,8 @@
1
+ require "click_effects/rails/version"
2
+
3
+ module ClickEffects
4
+ module Rails
5
+ class Engine < ::Rails::Engine
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,11 @@
1
+ var clickEffectHandler = function() {
2
+ $(".cbutton").click(function() {
3
+ $el = $(this);
4
+ $el.addClass("cbutton--click");
5
+ setTimeout(function() {
6
+ $el.removeClass("cbutton--click");
7
+ }, 800);
8
+ });
9
+ };
10
+ $(document).ready(clickEffectHandler);
11
+ $(document).on('page:load', clickEffectHandler);