arctic-scroll-rails 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +2 -0
- data/arctic-scroll-rails.gemspec +22 -0
- data/lib/arctic-scroll/rails.rb +7 -0
- data/lib/arctic-scroll/rails/engine.rb +6 -0
- data/lib/arctic-scroll/rails/version.rb +5 -0
- data/lib/spoiler-alert-rails.rb +1 -0
- data/vendor/assets/javascripts/jquery.arctic_scroll.js +36 -0
- metadata +79 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: f36efd98be81a6604d92e92242fd25d08bb7fcba
|
4
|
+
data.tar.gz: 7e4d21f1613920f45f320bbab08a86542163e76c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ec4fed6d8a5ecc5fc7937dc442607e23f87caebb372905700f4afbada391a1fd67026c99d5c7539693762f001092cba146cfe516ba1aa1f8eb5bda7f8211ea2e
|
7
|
+
data.tar.gz: 28c4cc11fc7cc8d56a5a9edb6a4858bf75de515abec40c7f8d17f1edb6710f3436bab5acebc754808ef04e2d55306753ffe27111ac344f503cb9df66e1a8c990
|
data/README.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'arctic-scroll/rails/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "arctic-scroll-rails"
|
8
|
+
spec.version = ArcticScroll::Rails::VERSION
|
9
|
+
spec.authors = ["Andreas N."]
|
10
|
+
spec.email = ["andy@pixelde.su"]
|
11
|
+
spec.summary = %q{A simple jQuery link scroll-to plugin for your Rails asset pipeline}
|
12
|
+
spec.homepage = "https://github.com/pixeldesu/arctic-scroll-rails"
|
13
|
+
spec.license = "MIT"
|
14
|
+
|
15
|
+
spec.files = `git ls-files -z`.split("\x0")
|
16
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
|
+
spec.require_paths = ["lib"]
|
19
|
+
|
20
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
21
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
22
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'arctic-scroll/rails'
|
@@ -0,0 +1,36 @@
|
|
1
|
+
(function ($) {
|
2
|
+
$.fn.arctic_scroll = function (options) {
|
3
|
+
|
4
|
+
var defaults = {
|
5
|
+
elem: $(this),
|
6
|
+
speed: 500,
|
7
|
+
scroll_selector: 'html,body'
|
8
|
+
};
|
9
|
+
|
10
|
+
var options = $.extend(defaults, options),
|
11
|
+
to_scroll = options.scroll_selector,
|
12
|
+
ua = $.browser;
|
13
|
+
|
14
|
+
if ( ua.msie && ua.version.slice(0,1) == "8" ) {
|
15
|
+
to_scroll = window;
|
16
|
+
} else if ( ua.msie && ua.version.slice(0,1) == "7" ) {
|
17
|
+
to_scroll = window;
|
18
|
+
}
|
19
|
+
|
20
|
+
options.elem.click(function(event){
|
21
|
+
event.preventDefault();
|
22
|
+
var offset = ($(this).attr('data-offset')) ? $(this).attr('data-offset') : false,
|
23
|
+
position = ($(this).attr('data-position')) ? $(this).attr('data-position') : false;
|
24
|
+
if (offset) {
|
25
|
+
var toMove = parseInt(offset);
|
26
|
+
$(options.scroll_selector).stop(true, false).animate({scrollTop: ($(this.hash).offset().top + toMove) }, options.speed);
|
27
|
+
} else if (position) {
|
28
|
+
var toMove = parseInt(position);
|
29
|
+
$(options.scroll_selector).stop(true, false).animate({scrollTop: toMove }, options.speed);
|
30
|
+
} else {
|
31
|
+
$(options.scroll_selector).stop(true, false).animate({scrollTop: ($(this.hash).offset().top) }, options.speed);
|
32
|
+
}
|
33
|
+
});
|
34
|
+
|
35
|
+
};
|
36
|
+
})(jQuery);
|
metadata
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: arctic-scroll-rails
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Andreas N.
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-09-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.7'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.7'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
description:
|
42
|
+
email:
|
43
|
+
- andy@pixelde.su
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- README.md
|
49
|
+
- arctic-scroll-rails.gemspec
|
50
|
+
- lib/arctic-scroll/rails.rb
|
51
|
+
- lib/arctic-scroll/rails/engine.rb
|
52
|
+
- lib/arctic-scroll/rails/version.rb
|
53
|
+
- lib/spoiler-alert-rails.rb
|
54
|
+
- vendor/assets/javascripts/jquery.arctic_scroll.js
|
55
|
+
homepage: https://github.com/pixeldesu/arctic-scroll-rails
|
56
|
+
licenses:
|
57
|
+
- MIT
|
58
|
+
metadata: {}
|
59
|
+
post_install_message:
|
60
|
+
rdoc_options: []
|
61
|
+
require_paths:
|
62
|
+
- lib
|
63
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - '>='
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
69
|
+
requirements:
|
70
|
+
- - '>='
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '0'
|
73
|
+
requirements: []
|
74
|
+
rubyforge_project:
|
75
|
+
rubygems_version: 2.4.8
|
76
|
+
signing_key:
|
77
|
+
specification_version: 4
|
78
|
+
summary: A simple jQuery link scroll-to plugin for your Rails asset pipeline
|
79
|
+
test_files: []
|