MyScrollUp
Customizable scroll up for monolith projects
Preview: https://myscrollup.herokuapp.com/
Installation
Add this line to your application's Gemfile:
gem 'jquery-rails'
gem 'my_scroll_up'
And then execute:
$ bundle install
$ rails g my_scroll_up:install
If you don't use bootstrap, then add this line to your head:
...
<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">
...
Add this code to your body:
app/views/layouts/application.html.erb
...
<%= MyScrollUp.render.html_safe %>
...
Add requirements to js and css:
app/assets/javascripts/application.js
...
...
app/assets/stylesheets/application.css
...
*= require my_scroll_up
...
Usage:
You can customize your icon style:
You can choose an icon from https://fontawesome.com/v3.2.1/icons/
(Default 'icon-chevron-up')
app/config/initializers/my_scroll_up.rb
MyScrollUp.configure do |config|
end
License
The MIT License
Contributing
- Fork it ( https://github.com/sOM2H/my_scroll_up/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request