my_scroll_up 1.0.0 → 1.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 +4 -4
- data/README.md +7 -4
- data/img/example.png +0 -0
- data/lib/my_scroll_up/version.rb +1 -1
- data/vendor/assets/javascripts/my_scroll_up.js +1 -1
- metadata +3 -3
- data/img/Screenshot.png +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a685f98dfb91ddfaebb82f572ad1b9329c9f38fb29a31d3999ceaf51f5a68327
|
4
|
+
data.tar.gz: 9b80fc1a9f3280ac07601bbbdb79e5f82d146875749e9033b943df6433f9c410
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ccc824d49a496a560cee2bc0e3c05be6fe3b432f383793863c951b0aa003d920832f2dfd3e1ba482fa28cde977c06a59dce660b3141702d27d2cec29f4f294c0
|
7
|
+
data.tar.gz: ce16be5a1fecfca90eb4099c5440b8ba75e830383f61b2fa1869bca5b2f0c2932bce16373be660639386c63981e11e2fc5590ea57b8883cb767380948898cedd
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# MyScrollUp
|
2
2
|
Customizable scroll up for monolith projects.
|
3
3
|
|
4
|
-

|
5
5
|
## Installation
|
6
6
|
|
7
7
|
Add this line to your application's Gemfile:
|
@@ -17,7 +17,7 @@ And then execute:
|
|
17
17
|
$ bundle install
|
18
18
|
$ rails g my_scroll_up:install
|
19
19
|
|
20
|
-
If you don't use
|
20
|
+
If you don't use bootstrap, then add this line to your head:
|
21
21
|
|
22
22
|
```html
|
23
23
|
...
|
@@ -32,8 +32,7 @@ Add this code to your body:
|
|
32
32
|
|
33
33
|
|
34
34
|
```erb
|
35
|
-
|
36
|
-
<title>My title</title>
|
35
|
+
...
|
37
36
|
<%= MyScrollUp.render.html_safe %>
|
38
37
|
...
|
39
38
|
```
|
@@ -58,8 +57,12 @@ Add requirements to js and css:
|
|
58
57
|
## Usage:
|
59
58
|
|
60
59
|
You can customize your icon style:
|
60
|
+
|
61
|
+
You can choose an icon from https://fontawesome.com/v3.2.1/icons/
|
62
|
+
|
61
63
|
(Default 'icon-chevron-up')
|
62
64
|
|
65
|
+
|
63
66
|
`/app/config/initializers/my_scroll_up.rb`
|
64
67
|
|
65
68
|
```ruby
|
data/img/example.png
ADDED
Binary file
|
data/lib/my_scroll_up/version.rb
CHANGED
@@ -8,7 +8,7 @@ $(window).scroll(function() {
|
|
8
8
|
|
9
9
|
$( document ).ready(function() {
|
10
10
|
$( document.body ).click(function(e) {
|
11
|
-
if (e.target.id == "scroll-up" || e.target.
|
11
|
+
if (e.target.id == "scroll-up" || e.target.parentNode.id == "scroll-up"){
|
12
12
|
$('html, body').animate({scrollTop : 0}, 500);
|
13
13
|
event.preventDefault();
|
14
14
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: my_scroll_up
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikhail Melnyk
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -69,7 +69,7 @@ files:
|
|
69
69
|
- Rakefile
|
70
70
|
- bin/console
|
71
71
|
- bin/setup
|
72
|
-
- img/
|
72
|
+
- img/example.png
|
73
73
|
- lib/generators/my_scroll_up/install_generator.rb
|
74
74
|
- lib/generators/templates/my_scroll_up_initializer.rb
|
75
75
|
- lib/my_scroll_up.rb
|
data/img/Screenshot.png
DELETED
Binary file
|