Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f526593
Showing
10 changed files
with
144 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.gem | ||
.bundle | ||
Gemfile.lock | ||
pkg/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
source "http://rubygems.org" | ||
|
||
# Specify your gem's dependencies in jquery-lionbars.gemspec | ||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# jQuery LionBars | ||
|
||
Port jQuery plugin LionBars to a gem, works with asset pipeline. | ||
|
||
Demo: [http://www.nikolaydyankov.com/lionbars/#demo](http://www.nikolaydyankov.com/lionbars/#demo) | ||
|
||
Usage: | ||
|
||
require js and stylesheets | ||
|
||
require js: | ||
|
||
//= require 'jquery-lionbars' | ||
|
||
require scss: | ||
|
||
@import 'jquery-lionbars'; | ||
|
||
use: | ||
|
||
<script> | ||
$('#div1').lionbars(); | ||
</script> | ||
|
||
|
||
Options: | ||
|
||
lionbars(color, showOnMouseOver, visibleBar, visibleBg) | ||
|
||
color: Either "light" or "dark". Choose wisely! Defaults to "dark". | ||
showOnMouseOver: When the mouse moves over the content element, the scrollbar is shown. Defaults to false. | ||
visibleBar: Scrollbar is always visible. Defaults to false. | ||
visibleBg: Full length scrollbar (or scrollbar background) is always visible. Defaults to false. | ||
|
||
|
||
see more detail from: [http://www.nikolaydyankov.com/lionbars](http://www.nikolaydyankov.com/lionbars) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
require "bundler/gem_tasks" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# -*- encoding: utf-8 -*- | ||
$:.push File.expand_path("../lib", __FILE__) | ||
require "jquery-lionbars/version" | ||
|
||
Gem::Specification.new do |s| | ||
s.name = "jquery-lionbars" | ||
s.version = Jquery::Lionbars::VERSION | ||
s.authors = ["Allen Wei"] | ||
s.email = ["digruby@gmail.com"] | ||
s.homepage = "http://www.nikolaydyankov.com/lionbars/" | ||
s.summary = %q{http://www.nikolaydyankov.com/lionbars} | ||
s.description = %q{http://www.nikolaydyankov.com/lionbars} | ||
|
||
s.rubyforge_project = "jquery-lionbars" | ||
|
||
s.files = `git ls-files`.split("\n") | ||
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") | ||
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } | ||
s.require_paths = ["lib"] | ||
|
||
# specify any dependencies here; for example: | ||
# s.add_development_dependency "rspec" | ||
s.add_runtime_dependency "rails", ">= 3.1.0" | ||
s.add_runtime_dependency "jquery-rails" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
require "jquery-lionbars/version" | ||
require "jquery-lionbars/engine" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module Jquery | ||
module Lionbars | ||
class Engine < ::Rails::Engine | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module Jquery | ||
module Lionbars | ||
VERSION = "0.0.1" | ||
end | ||
end |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
.scrollbar { | ||
position: absolute; | ||
content: ""; | ||
display: block; | ||
border-radius: 100px; | ||
opacity: 0; | ||
z-index: 100; | ||
} | ||
|
||
.vertical { | ||
width: 7px; | ||
right: 2px; | ||
top: 2px; | ||
} | ||
|
||
.horizontal { | ||
height: 7px; | ||
bottom: 2px; | ||
left: 2px; | ||
} | ||
|
||
.scrollbar_bg { | ||
position: absolute; | ||
content: ""; | ||
display: block; | ||
border-radius: 100px; | ||
opacity: 0; | ||
z-index: 99; | ||
} | ||
|
||
.scrollbar_bg.horizontal { | ||
width: 100%; | ||
} | ||
|
||
.scrollbar_bg.vertical { | ||
height: 100%; | ||
} | ||
|
||
.scrollbar.light { | ||
background: rgba(255,255,255,0.5); | ||
} | ||
|
||
.scrollbar_bg.light { | ||
background: rgba(255,255,255,0.10); | ||
} | ||
|
||
|
||
.scrollbar.dark { | ||
background: rgba(0,0,0,0.3); | ||
} | ||
|
||
.scrollbar_bg.dark { | ||
background: rgba(0,0,0,0.10); | ||
} | ||
|
||
.nWrap { | ||
overflow: auto; | ||
display: inline-block; | ||
} |