my_scroll_up 1.0.0 → 1.0.1

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
  SHA256:
3
- metadata.gz: e94e2e9eba136743d387e0f3d70946e9c10495fd0cc8d85079c229f0cf3ad13f
4
- data.tar.gz: 3f7f3d8630804720fd4eb68a0ec6ad026c7ef11ffbf3afb0b5b39de596cb3568
3
+ metadata.gz: a685f98dfb91ddfaebb82f572ad1b9329c9f38fb29a31d3999ceaf51f5a68327
4
+ data.tar.gz: 9b80fc1a9f3280ac07601bbbdb79e5f82d146875749e9033b943df6433f9c410
5
5
  SHA512:
6
- metadata.gz: fa22c0b3f5c3a45a46556e4b10d993e849d651a8c1956c1d9d3f6ea5483760c6c60eaef7f1e4dc3dc616b9d1b647325c1b9221b715e6f66f546c959e4f08f4fb
7
- data.tar.gz: 8e1f306ee4ee99446ae18b7d5d526ab83d0d37f9e760232dff18303479a6ab388f855e414562f6bec9304c2218e94b8ddb67d8c97b107fd860e6efeabdf4b7f6
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
- ![Scroll UP](img/Screenshot.png)
4
+ ![ScrollUp examples](img/example.png)
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 bootsrap, then add this line to your head:
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
- <head>
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
@@ -1,3 +1,3 @@
1
1
  module MyScrollUp
2
- VERSION = '1.0.0'.freeze
2
+ VERSION = '1.0.1'.freeze
3
3
  end
@@ -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.className == "icon-chevron-up"){
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.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-22 00:00:00.000000000 Z
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/Screenshot.png
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