Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
allenwei committed Nov 28, 2011
0 parents commit f526593
Show file tree
Hide file tree
Showing 10 changed files with 144 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
@@ -0,0 +1,4 @@
*.gem
.bundle
Gemfile.lock
pkg/*
4 changes: 4 additions & 0 deletions Gemfile
@@ -0,0 +1,4 @@
source "http://rubygems.org"

# Specify your gem's dependencies in jquery-lionbars.gemspec
gemspec
36 changes: 36 additions & 0 deletions README.md
@@ -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)&nbsp;

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)
1 change: 1 addition & 0 deletions Rakefile
@@ -0,0 +1 @@
require "bundler/gem_tasks"
25 changes: 25 additions & 0 deletions jquery-lionbars.gemspec
@@ -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
3 changes: 3 additions & 0 deletions lib/jquery-lionbars.rb
@@ -0,0 +1,3 @@
require "jquery-lionbars/version"
require "jquery-lionbars/engine"

6 changes: 6 additions & 0 deletions lib/jquery-lionbars/engine.rb
@@ -0,0 +1,6 @@
module Jquery
module Lionbars
class Engine < ::Rails::Engine
end
end
end
5 changes: 5 additions & 0 deletions lib/jquery-lionbars/version.rb
@@ -0,0 +1,5 @@
module Jquery
module Lionbars
VERSION = "0.0.1"
end
end
1 change: 1 addition & 0 deletions vender/assets/javascripts/jquery-lionbars.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

59 changes: 59 additions & 0 deletions vender/assets/stylesheets/jquery-lionbars.css
@@ -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;
}

0 comments on commit f526593

Please sign in to comment.