Skip to content

Commit 812303f

Browse files
committed
Added JQuery Nice Scroll
1 parent efc9f16 commit 812303f

4 files changed

Lines changed: 30 additions & 2 deletions

File tree

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ gem 'turbolinks', '5.0.1'
1919
gem 'jbuilder', '2.7.0'
2020
gem 'email_validator', '~> 1.6'
2121
gem 'figaro'
22+
gem 'nicescroll-rails', '~> 3.5', '>= 3.5.4.1'
2223

2324
group :development, :test do
2425
gem 'sqlite3', '1.3.13'

Gemfile.lock

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,8 @@ GEM
296296
multi_json (1.12.2)
297297
nenv (0.3.0)
298298
netrc (0.11.0)
299+
nicescroll-rails (3.5.4.1)
300+
railties (>= 3.1)
299301
nio4r (2.2.0)
300302
nokogiri (1.8.1-x64-mingw32)
301303
mini_portile2 (~> 2.3.0)
@@ -430,6 +432,7 @@ DEPENDENCIES
430432
mini_magick (= 4.8.0)
431433
minitest (= 5.10.3)
432434
minitest-reporters (= 1.1.19)
435+
nicescroll-rails (~> 3.5, >= 3.5.4.1)
433436
nokogiri (= 1.8.1)
434437
pg (= 0.18.4)
435438
puma (= 3.9.1)

app/assets/javascripts/application.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,18 @@
1010
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
1111
// about supported directives.
1212
//
13+
1314
//= require jquery
14-
//= require bootstrap
15-
//= require rails-ujs
15+
//= require jquery_ujs
1616
//= require turbolinks
1717
//= require_tree .
18+
//= require bootstrap
19+
//= require jquery.nicescroll
20+
21+
// 1. Simple mode, it styles document scrollbar:
22+
// var nice = false;
23+
$(function() {
24+
$("body").niceScroll();
25+
// nice = $("body").niceScroll();
26+
});
27+
// console.log(nice);

app/assets/stylesheets/custom.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
@import "bootstrap-sprockets";
22
@import "bootstrap";
33

4+
//
5+
// ::-webkit-scrollbar-track {
6+
// -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .4);
7+
// background-color: #CFCFCF
8+
// }
9+
// ::-webkit-scrollbar {
10+
// width: 12px;
11+
// background-color: #F5F5F5
12+
// }
13+
// ::-webkit-scrollbar-thumb {
14+
// background-color: #2C3E50
15+
// }
16+
17+
418
/* mixins, variables, etc. */
519
$gray-medium-light: #eaeaea;
620

0 commit comments

Comments
 (0)