fancy-progress-bars 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +8 -0
- data/CHANGELOG.md +3 -0
- data/Gemfile +4 -0
- data/LICENSE +19 -0
- data/README.md +53 -0
- data/Rakefile +7 -0
- data/example/basics.html +30 -0
- data/example/colors.html +30 -0
- data/example/config.rb +21 -0
- data/example/javascripts/progress.js +71 -0
- data/example/sass/_page-styles.scss +45 -0
- data/example/sass/basics.scss +14 -0
- data/example/sass/colors.scss +16 -0
- data/example/sass/ie.scss +5 -0
- data/example/sass/size.scss +14 -0
- data/example/sass/styles.scss +14 -0
- data/example/size.html +30 -0
- data/example/styles.html +30 -0
- data/fancy-progress-bars.gemspec +25 -0
- data/lib/fancy-progress-bars.rb +10 -0
- data/lib/fancy-progress-bars/stylesheets/_fancy-progress-bars.scss +22 -0
- data/lib/fancy-progress-bars/stylesheets/fancy-progress-bars/_animated.scss +18 -0
- data/lib/fancy-progress-bars/stylesheets/fancy-progress-bars/_background.scss +13 -0
- data/lib/fancy-progress-bars/stylesheets/fancy-progress-bars/_common.scss +19 -0
- data/lib/fancy-progress-bars/stylesheets/fancy-progress-bars/_defaults.scss +6 -0
- data/lib/fancy-progress-bars/stylesheets/fancy-progress-bars/_glossy-gradient.scss +42 -0
- data/lib/fancy-progress-bars/stylesheets/fancy-progress-bars/_label.scss +25 -0
- data/lib/fancy-progress-bars/stylesheets/fancy-progress-bars/_matte-gradient.scss +36 -0
- data/lib/fancy-progress-bars/stylesheets/fancy-progress-bars/_plain.scss +26 -0
- data/lib/fancy-progress-bars/stylesheets/fancy-progress-bars/_stripes.scss +36 -0
- data/lib/fancy-progress-bars/templates/project/manifest.rb +2 -0
- data/lib/fancy-progress-bars/templates/project/screen.scss +3 -0
- data/lib/fancy-progress-bars/version.rb +11 -0
- metadata +103 -0
data/.gitignore
ADDED
data/CHANGELOG.md
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (C) 2011 by Stefan Huber
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
11
|
+
all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
## Install
|
2
|
+
|
3
|
+
Install the plugin: (should automatically install latest dependencies for Compass, and Haml)
|
4
|
+
gem install fancy-progress-bars
|
5
|
+
|
6
|
+
To create a new project based on fancy-progress-bars:
|
7
|
+
|
8
|
+
compass install -r fancy-progress-bars -f fancy-progress-bars
|
9
|
+
|
10
|
+
To add fancy-progress-bars to an existing compass project:
|
11
|
+
|
12
|
+
# Add the following lines to your compass configuration file:
|
13
|
+
require 'fancy-progress-bars'
|
14
|
+
|
15
|
+
# Then run the following command:
|
16
|
+
compass install -r fancy-progress-bars -f fancy-progress-bars
|
17
|
+
|
18
|
+
## Basic usage
|
19
|
+
|
20
|
+
In order to work correctly fancy-progress-bars assume the following html (the class name is - of course - arbitrary):
|
21
|
+
|
22
|
+
<div class="progress">
|
23
|
+
<div><span></span></div>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
fancy-progress-bars are added by simply including the progress-bar mixin:
|
27
|
+
|
28
|
+
@import "fancy-progress-bars";
|
29
|
+
|
30
|
+
.progress {
|
31
|
+
@include progress-bar;
|
32
|
+
}
|
33
|
+
|
34
|
+
Various options are available (check [examples](https://github.com/MSNexploder/fancy-progress-bars/tree/master/example) for more details).
|
35
|
+
|
36
|
+
## Note on Patches/Pull Requests
|
37
|
+
|
38
|
+
* Fork the project.
|
39
|
+
* Make your feature addition or bug fix.
|
40
|
+
* Commit, do not mess with rakefile, gemspec, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
41
|
+
* Send me a pull request. Bonus points for topic branches.
|
42
|
+
|
43
|
+
## License
|
44
|
+
|
45
|
+
(The MIT License)
|
46
|
+
|
47
|
+
Copyright © 2011 Stefan Huber
|
48
|
+
|
49
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
50
|
+
|
51
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
52
|
+
|
53
|
+
THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
data/example/basics.html
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
5
|
+
<title>Fancy Progress Bars - Basics Demo</title>
|
6
|
+
<link href="stylesheets/basics.css" media="screen, projection" rel="stylesheet" type="text/css" />
|
7
|
+
<!--[if IE]>
|
8
|
+
<link href="stylesheets/ie.css" media="screen, projection" rel="stylesheet" type="text/css" />
|
9
|
+
<![endif]-->
|
10
|
+
</head>
|
11
|
+
<body>
|
12
|
+
<h1>Fancy Progress Bars</h1>
|
13
|
+
<div class="base">
|
14
|
+
<div class="basics">
|
15
|
+
<div><span></span></div>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<div class="striped">
|
19
|
+
<div><span></span></div>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<div class="animated">
|
23
|
+
<div><span></span></div>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
|
27
|
+
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js" charset="utf-8"></script>
|
28
|
+
<script src="javascripts/progress.js" charset="utf-8"></script>
|
29
|
+
</body>
|
30
|
+
</html>
|
data/example/colors.html
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
5
|
+
<title>Fancy Progress Bars - Basics Demo</title>
|
6
|
+
<link href="stylesheets/colors.css" media="screen, projection" rel="stylesheet" type="text/css" />
|
7
|
+
<!--[if IE]>
|
8
|
+
<link href="stylesheets/ie.css" media="screen, projection" rel="stylesheet" type="text/css" />
|
9
|
+
<![endif]-->
|
10
|
+
</head>
|
11
|
+
<body>
|
12
|
+
<h1>Fancy Progress Bars</h1>
|
13
|
+
<div class="base">
|
14
|
+
<div class="bluish">
|
15
|
+
<div><span></span></div>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<div class="background">
|
19
|
+
<div><span></span></div>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<div class="stripes">
|
23
|
+
<div><span></span></div>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
|
27
|
+
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js" charset="utf-8"></script>
|
28
|
+
<script src="javascripts/progress.js" charset="utf-8"></script>
|
29
|
+
</body>
|
30
|
+
</html>
|
data/example/config.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
# Require any additional compass plugins here.
|
3
|
+
require 'fancy-progress-bars'
|
4
|
+
# Set this to the root of your project when deployed:
|
5
|
+
http_path = "/"
|
6
|
+
css_dir = "stylesheets"
|
7
|
+
sass_dir = "sass"
|
8
|
+
images_dir = "images"
|
9
|
+
javascripts_dir = "javascripts"
|
10
|
+
# You can select your preferred output style here (can be overridden via the command line):
|
11
|
+
# output_style = :expanded or :nested or :compact or :compressed
|
12
|
+
# To enable relative paths to assets via compass helper functions. Uncomment:
|
13
|
+
relative_assets = true
|
14
|
+
# To disable debugging comments that display the original location of your selectors. Uncomment:
|
15
|
+
# line_comments = false
|
16
|
+
|
17
|
+
# If you prefer the indented syntax, you might want to regenerate this
|
18
|
+
# project again passing --syntax sass, or you can uncomment this:
|
19
|
+
# preferred_syntax = :sass
|
20
|
+
# and then run:
|
21
|
+
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
|
@@ -0,0 +1,71 @@
|
|
1
|
+
// Copyright (c) 2010 Ivan Vanderbyl
|
2
|
+
// Originally found at http://ivan.ly/ui
|
3
|
+
//
|
4
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
|
+
// of this software and associated documentation files (the "Software"), to deal
|
6
|
+
// in the Software without restriction, including without limitation the rights
|
7
|
+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
+
// copies of the Software, and to permit persons to whom the Software is
|
9
|
+
// furnished to do so, subject to the following conditions:
|
10
|
+
//
|
11
|
+
// The above copyright notice and this permission notice shall be included in
|
12
|
+
// all copies or substantial portions of the Software.
|
13
|
+
//
|
14
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20
|
+
// THE SOFTWARE.
|
21
|
+
|
22
|
+
// slightly modified for fancy-progress-bars examples by Stefan Huber
|
23
|
+
|
24
|
+
(function($) {
|
25
|
+
// Simple wrapper around jQuery animate to simplify animating progress from your app
|
26
|
+
// Inputs: Progress as a percent, Callback
|
27
|
+
// TODO: Add options and jQuery UI support.
|
28
|
+
$.fn.animateProgress = function(progress, callback) {
|
29
|
+
return this.each(function() {
|
30
|
+
$(this).animate({
|
31
|
+
width: progress+'%'
|
32
|
+
}, {
|
33
|
+
duration: 2000,
|
34
|
+
|
35
|
+
// swing or linear
|
36
|
+
easing: 'swing',
|
37
|
+
|
38
|
+
// this gets called every step of the animation, and updates the label
|
39
|
+
step: function(progress) {
|
40
|
+
var labelEl = $('> span', this);
|
41
|
+
|
42
|
+
if (Math.ceil(progress) == 100) {
|
43
|
+
labelEl.text('Done');
|
44
|
+
} else {
|
45
|
+
labelEl.text('processing... ' + Math.ceil(progress) + '%');
|
46
|
+
}
|
47
|
+
},
|
48
|
+
complete: function(scope, i, elem) {
|
49
|
+
if (callback) {
|
50
|
+
callback.call(this, i, elem);
|
51
|
+
}
|
52
|
+
}
|
53
|
+
});
|
54
|
+
});
|
55
|
+
};
|
56
|
+
})(jQuery);
|
57
|
+
|
58
|
+
$(function() {
|
59
|
+
// Set initial value
|
60
|
+
$('.base > div > div').css('width', '7%');
|
61
|
+
|
62
|
+
// Simulate some progress
|
63
|
+
$('.base > div > div').animateProgress(43, function() {
|
64
|
+
$(this).animateProgress(79, function() {
|
65
|
+
setTimeout(function() {
|
66
|
+
$('.base > div > div').animateProgress(100, function() {
|
67
|
+
});
|
68
|
+
}, 2000);
|
69
|
+
});
|
70
|
+
});
|
71
|
+
});
|
@@ -0,0 +1,45 @@
|
|
1
|
+
@import "compass";
|
2
|
+
@include global-reset;
|
3
|
+
@include reset-html5;
|
4
|
+
|
5
|
+
html {
|
6
|
+
@include background-image(linear-gradient(#ddd, darken(#ddd, 20)));
|
7
|
+
background-color: #ddd;
|
8
|
+
height: 100%;
|
9
|
+
}
|
10
|
+
|
11
|
+
body {
|
12
|
+
background: none;
|
13
|
+
text-align: center;
|
14
|
+
padding-top: 10px;
|
15
|
+
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
16
|
+
color: #fff;
|
17
|
+
}
|
18
|
+
|
19
|
+
#{headings()} {
|
20
|
+
@include text-shadow(rgba(#000, 0.3) 1px 1px 4px);
|
21
|
+
letter-spacing: -1px;
|
22
|
+
margin: 0.4em 0 0.8em;
|
23
|
+
font-weight: bold;
|
24
|
+
}
|
25
|
+
|
26
|
+
h1 {
|
27
|
+
font-size: 50px;
|
28
|
+
}
|
29
|
+
h2 {
|
30
|
+
font-size: 30px;
|
31
|
+
}
|
32
|
+
|
33
|
+
div.base {
|
34
|
+
@include box-shadow(rgba(#000, 0.4) 0 0 1px 1px inset);
|
35
|
+
@include border-radius(10px);
|
36
|
+
@include background-clip(padding-box);
|
37
|
+
background: #eee;
|
38
|
+
width: 810px;
|
39
|
+
margin: 0 auto;
|
40
|
+
padding: 40px 20px;
|
41
|
+
|
42
|
+
& > div {
|
43
|
+
margin: 1em 0;
|
44
|
+
}
|
45
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
@import "page-styles";
|
2
|
+
@import "fancy-progress-bars";
|
3
|
+
|
4
|
+
.bluish {
|
5
|
+
@include progress-bar-plain-animated($default-progress-bar-height, #87cefa);
|
6
|
+
}
|
7
|
+
|
8
|
+
.background {
|
9
|
+
@include progress-bar-plain-animated;
|
10
|
+
@include progress-bar-background($default-progress-bar-height, #87cefa);
|
11
|
+
}
|
12
|
+
|
13
|
+
.stripes {
|
14
|
+
@include progress-bar-plain-animated;
|
15
|
+
@include progress-bar-stripes(#87cefa);
|
16
|
+
}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/* Welcome to Compass. Use this file to write IE specific override styles.
|
2
|
+
* Import this file using the following HTML or equivalent:
|
3
|
+
* <!--[if IE]>
|
4
|
+
* <link href="/stylesheets/ie.css" media="screen, projection" rel="stylesheet" type="text/css" />
|
5
|
+
* <![endif]--> */
|
data/example/size.html
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
5
|
+
<title>Fancy Progress Bars - Basics Demo</title>
|
6
|
+
<link href="stylesheets/size.css" media="screen, projection" rel="stylesheet" type="text/css" />
|
7
|
+
<!--[if IE]>
|
8
|
+
<link href="stylesheets/ie.css" media="screen, projection" rel="stylesheet" type="text/css" />
|
9
|
+
<![endif]-->
|
10
|
+
</head>
|
11
|
+
<body>
|
12
|
+
<h1>Fancy Progress Bars</h1>
|
13
|
+
<div class="base">
|
14
|
+
<div class="smallish">
|
15
|
+
<div><span></span></div>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<div class="big">
|
19
|
+
<div><span></span></div>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<div class="huge">
|
23
|
+
<div><span></span></div>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
|
27
|
+
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js" charset="utf-8"></script>
|
28
|
+
<script src="javascripts/progress.js" charset="utf-8"></script>
|
29
|
+
</body>
|
30
|
+
</html>
|
data/example/styles.html
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
5
|
+
<title>Fancy Progress Bars - Basics Demo</title>
|
6
|
+
<link href="stylesheets/styles.css" media="screen, projection" rel="stylesheet" type="text/css" />
|
7
|
+
<!--[if IE]>
|
8
|
+
<link href="stylesheets/ie.css" media="screen, projection" rel="stylesheet" type="text/css" />
|
9
|
+
<![endif]-->
|
10
|
+
</head>
|
11
|
+
<body>
|
12
|
+
<h1>Fancy Progress Bars</h1>
|
13
|
+
<div class="base">
|
14
|
+
<div class="plain">
|
15
|
+
<div><span></span></div>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<div class="matte">
|
19
|
+
<div><span></span></div>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<div class="glossy">
|
23
|
+
<div><span></span></div>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
|
27
|
+
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js" charset="utf-8"></script>
|
28
|
+
<script src="javascripts/progress.js" charset="utf-8"></script>
|
29
|
+
</body>
|
30
|
+
</html>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "fancy-progress-bars/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "fancy-progress-bars"
|
7
|
+
s.version = FancyProgressBars::VERSION::STRING
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ["Stefan Huber"]
|
10
|
+
s.email = ["MSNexploder@gmail.com"]
|
11
|
+
s.homepage = "https://github.com/MSNexploder/fancy-progress-bars"
|
12
|
+
s.summary = %q{Make fancy CSS3 progress bars with the Compass stylesheet authoring framework.}
|
13
|
+
s.description = %q{Fancy Progress Bars helps you easily style progress bars with beautiful CSS3 features without any images. This requires the Compass stylesheet authoring framework.}
|
14
|
+
|
15
|
+
s.add_development_dependency 'bundler', '~> 1.0.10'
|
16
|
+
|
17
|
+
s.add_dependency 'compass', '~> 0.11.beta.7'
|
18
|
+
|
19
|
+
s.rubyforge_project = "fancy-progress-bars"
|
20
|
+
|
21
|
+
s.files = `git ls-files`.split("\n")
|
22
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
23
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
24
|
+
s.require_paths = ["lib"]
|
25
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
module FancyProgressBars
|
3
|
+
def self.register_module
|
4
|
+
Compass::Frameworks.register('fancy-progress-bars',
|
5
|
+
:stylesheets_directory => File.join(File.dirname(__FILE__), 'fancy-progress-bars/stylesheets'),
|
6
|
+
:templates_directory => File.join(File.dirname(__FILE__), 'fancy-progress-bars/templates'))
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
FancyProgressBars.register_module
|
@@ -0,0 +1,22 @@
|
|
1
|
+
// This is your framework's main stylesheet. Use it to import all default modules.
|
2
|
+
@import "fancy-progress-bars/defaults";
|
3
|
+
@import "fancy-progress-bars/common";
|
4
|
+
@import "fancy-progress-bars/label";
|
5
|
+
@import "fancy-progress-bars/stripes";
|
6
|
+
@import "fancy-progress-bars/animated";
|
7
|
+
@import "fancy-progress-bars/background";
|
8
|
+
@import "fancy-progress-bars/glossy-gradient";
|
9
|
+
@import "fancy-progress-bars/matte-gradient";
|
10
|
+
@import "fancy-progress-bars/plain";
|
11
|
+
|
12
|
+
@mixin progress-bar($height: $default-progress-bar-height, $base-color: $default-progress-bar-base-color, $background-color: $default-progress-bar-background-color) {
|
13
|
+
@include progress-bar-glossy($height, $base-color, $background-color);
|
14
|
+
}
|
15
|
+
|
16
|
+
@mixin progress-bar-striped($height: $default-progress-bar-height, $base-color: $default-progress-bar-base-color, $background-color: $default-progress-bar-background-color, $strip-color: $default-progress-bar-stripes-color) {
|
17
|
+
@include progress-bar-glossy-striped($height, $base-color, $background-color, $strip-color);
|
18
|
+
}
|
19
|
+
|
20
|
+
@mixin progress-bar-animated($height: $default-progress-bar-height, $base-color: $default-progress-bar-base-color, $background-color: $default-progress-bar-background-color, $strip-color: $default-progress-bar-stripes-color) {
|
21
|
+
@include progress-bar-glossy-animated($height, $base-color, $background-color, $strip-color);
|
22
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
@import "fancy-progress-bars/defaults";
|
2
|
+
|
3
|
+
@-webkit-keyframes animate-stripes {
|
4
|
+
0% {
|
5
|
+
background-position: 0 0;
|
6
|
+
}
|
7
|
+
100% {
|
8
|
+
background-position: -50px -50px;
|
9
|
+
}
|
10
|
+
}
|
11
|
+
|
12
|
+
// Only webkit supported right now
|
13
|
+
// TODO find similar stuff for other browsers
|
14
|
+
@mixin progress-bar-animation {
|
15
|
+
& > div > span {
|
16
|
+
-webkit-animation: animate-stripes 2s linear infinite;
|
17
|
+
}
|
18
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
@import "fancy-progress-bars/defaults";
|
2
|
+
|
3
|
+
@import "compass/css3/border-radius";
|
4
|
+
|
5
|
+
@mixin progress-bar-background($height: $default-progress-bar-height, $background-color: $default-progress-bar-background-color) {
|
6
|
+
$border-radius: ceil($height / 2);
|
7
|
+
@include border-radius($border-radius);
|
8
|
+
@include box-shadow(
|
9
|
+
rgba(0, 0, 0, 0.5) 0 ($height / 20) ($height / 10) inset,
|
10
|
+
rgba(255, 255, 255, 1.0) 0 ($height / 20) 0 0
|
11
|
+
);
|
12
|
+
background: $background-color;
|
13
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
@import "compass/css3/border-radius";
|
2
|
+
|
3
|
+
@import "fancy-progress-bars/defaults";
|
4
|
+
@import "fancy-progress-bars/label";
|
5
|
+
@import "fancy-progress-bars/background";
|
6
|
+
|
7
|
+
@mixin progress-bar-base($height, $base-color, $background-color) {
|
8
|
+
@include progress-bar-label($height);
|
9
|
+
@include progress-bar-background($height, $background-color);
|
10
|
+
height: $height;
|
11
|
+
|
12
|
+
& > div {
|
13
|
+
@include border-radius(ceil($height / 2));
|
14
|
+
background-color: $base-color;
|
15
|
+
position: relative;
|
16
|
+
height: 100%;
|
17
|
+
overflow: hidden;
|
18
|
+
}
|
19
|
+
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
$default-progress-bar-height: 20px !default;
|
2
|
+
$default-progress-bar-base-color: rgb(52, 210, 94) !default;
|
3
|
+
$default-progress-bar-stripes-color: rgba(255, 255, 255, 0.3) !default;
|
4
|
+
$default-progress-bar-background-color: rgb(171, 178, 188) !default;
|
5
|
+
$default-progress-bar-label-position: right !default;
|
6
|
+
$default-progress-bar-label-text-color: rgba(0, 0, 0, 0.6) !default;
|
@@ -0,0 +1,42 @@
|
|
1
|
+
@import "compass/css3/images";
|
2
|
+
@import "compass/css3/box-shadow";
|
3
|
+
|
4
|
+
@import "fancy-progress-bars/defaults";
|
5
|
+
@import "fancy-progress-bars/common";
|
6
|
+
@import "fancy-progress-bars/stripes";
|
7
|
+
@import "fancy-progress-bars/animated";
|
8
|
+
|
9
|
+
@mixin progress-bar-glossy($height: $default-progress-bar-height, $base-color: $default-progress-bar-base-color, $background-color: $default-progress-bar-background-color) {
|
10
|
+
@include progress-bar-base($height, $base-color, $background-color);
|
11
|
+
& > div {
|
12
|
+
@include glossy-gradient($base-color);
|
13
|
+
& > span {
|
14
|
+
@include box-shadow(
|
15
|
+
rgba(255, 255, 255, (lightness($base-color) / 100)) 0 0 ($height / 20) 0 inset
|
16
|
+
);
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
@mixin progress-bar-glossy-striped($height: $default-progress-bar-height, $base-color: $default-progress-bar-base-color, $background-color: $default-progress-bar-background-color, $strip-color: $default-progress-bar-stripes-color) {
|
22
|
+
@include progress-bar-glossy($height, $base-color, $background-color);
|
23
|
+
@include progress-bar-stripes($strip-color);
|
24
|
+
}
|
25
|
+
|
26
|
+
@mixin progress-bar-glossy-animated($height: $default-progress-bar-height, $base-color: $default-progress-bar-base-color, $background-color: $default-progress-bar-background-color, $strip-color: $default-progress-bar-stripes-color) {
|
27
|
+
@include progress-bar-glossy-striped($height, $base-color, $background-color, $strip-color);
|
28
|
+
@include progress-bar-animation;
|
29
|
+
}
|
30
|
+
|
31
|
+
@mixin glossy-gradient($base-color) {
|
32
|
+
$gradient-top: lighten($base-color, 15%);
|
33
|
+
$gradient-bottom: darken($base-color, 6%);
|
34
|
+
|
35
|
+
@include background(linear-gradient(
|
36
|
+
lighten($gradient-top, 18%),
|
37
|
+
$gradient-top 10%,
|
38
|
+
lighten($gradient-bottom, 3%) 50%,
|
39
|
+
$gradient-bottom 50%,
|
40
|
+
lighten($gradient-bottom, 10%)
|
41
|
+
));
|
42
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
@import "compass/css3/border-radius";
|
2
|
+
|
3
|
+
@import "fancy-progress-bars/defaults";
|
4
|
+
|
5
|
+
@mixin progress-bar-label($height: $default-progress-bar-height, $label-position: $default-progress-bar-label-position, $label-color: $default-progress-bar-label-text-color) {
|
6
|
+
& > div > span {
|
7
|
+
@if $height < 25px {
|
8
|
+
font-size: $height * 0.7;
|
9
|
+
} @else {
|
10
|
+
font-size: (25px * 0.7);
|
11
|
+
}
|
12
|
+
$border-radius: ceil($height / 2);
|
13
|
+
|
14
|
+
@include border-radius($border-radius);
|
15
|
+
overflow: hidden;
|
16
|
+
text-align: $label-position;
|
17
|
+
color: $label-color;
|
18
|
+
line-height: $height;
|
19
|
+
text-shadow: rgba(255, 255, 255, 0.45) 0 1px 0px;
|
20
|
+
padding: 0 ceil($height / 2);
|
21
|
+
white-space: nowrap;
|
22
|
+
position: absolute;
|
23
|
+
top: 0; left: 0; bottom: 0; right: 0;
|
24
|
+
}
|
25
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
@import "compass/css3/images";
|
2
|
+
@import "compass/css3/box-shadow";
|
3
|
+
|
4
|
+
@import "fancy-progress-bars/defaults";
|
5
|
+
@import "fancy-progress-bars/common";
|
6
|
+
@import "fancy-progress-bars/stripes";
|
7
|
+
@import "fancy-progress-bars/animated";
|
8
|
+
|
9
|
+
@mixin progress-bar-matte($height: $default-progress-bar-height, $base-color: $default-progress-bar-base-color, $background-color: $default-progress-bar-background-color) {
|
10
|
+
@include progress-bar-base($height, $base-color, $background-color);
|
11
|
+
& > div {
|
12
|
+
@include matte-gradient($base-color);
|
13
|
+
& > span {
|
14
|
+
@include box-shadow(
|
15
|
+
rgba(255, 255, 255, (lightness($base-color) / 100)) 0 0 ($height / 20) 0 inset
|
16
|
+
);
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
@mixin progress-bar-matte-striped($height: $default-progress-bar-height, $base-color: $default-progress-bar-base-color, $background-color: $default-progress-bar-background-color, $strip-color: $default-progress-bar-stripes-color) {
|
22
|
+
@include progress-bar-matte($height, $base-color, $background-color);
|
23
|
+
@include progress-bar-stripes($strip-color);
|
24
|
+
}
|
25
|
+
|
26
|
+
@mixin progress-bar-matte-animated($height: $default-progress-bar-height, $base-color: $default-progress-bar-base-color, $background-color: $default-progress-bar-background-color, $strip-color: $default-progress-bar-stripes-color) {
|
27
|
+
@include progress-bar-matte-striped($height, $base-color, $background-color, $strip-color);
|
28
|
+
@include progress-bar-animation;
|
29
|
+
}
|
30
|
+
|
31
|
+
@mixin matte-gradient($base-color) {
|
32
|
+
@include background(linear-gradient(
|
33
|
+
lighten($base-color, 15%),
|
34
|
+
darken($base-color, 6%)
|
35
|
+
));
|
36
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
@import "compass/css3/box-shadow";
|
2
|
+
|
3
|
+
@import "fancy-progress-bars/defaults";
|
4
|
+
@import "fancy-progress-bars/common";
|
5
|
+
@import "fancy-progress-bars/stripes";
|
6
|
+
@import "fancy-progress-bars/animated";
|
7
|
+
|
8
|
+
@mixin progress-bar-plain($height: $default-progress-bar-height, $base-color: $default-progress-bar-base-color, $background-color: $default-progress-bar-background-color) {
|
9
|
+
@include progress-bar-base($height, $base-color, $background-color);
|
10
|
+
& > div > span {
|
11
|
+
@include box-shadow(
|
12
|
+
darken($base-color, 30%) 0 ($height / 20) 0 0 inset,
|
13
|
+
darken($base-color, 20%) ($height / 20 * -1) ($height / 20) inset
|
14
|
+
);
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
18
|
+
@mixin progress-bar-plain-striped($height: $default-progress-bar-height, $base-color: $default-progress-bar-base-color, $background-color: $default-progress-bar-background-color, $strip-color: $default-progress-bar-stripes-color) {
|
19
|
+
@include progress-bar-plain($height, $base-color, $background-color);
|
20
|
+
@include progress-bar-stripes($strip-color);
|
21
|
+
}
|
22
|
+
|
23
|
+
@mixin progress-bar-plain-animated($height: $default-progress-bar-height, $base-color: $default-progress-bar-base-color, $background-color: $default-progress-bar-background-color, $strip-color: $default-progress-bar-stripes-color) {
|
24
|
+
@include progress-bar-plain-striped($height, $base-color, $background-color, $strip-color);
|
25
|
+
@include progress-bar-animation;
|
26
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
@import "compass/css3/images";
|
2
|
+
|
3
|
+
@import "fancy-progress-bars/defaults";
|
4
|
+
|
5
|
+
@mixin progress-bar-stripes($strip-color: $default-progress-bar-stripes-color) {
|
6
|
+
& > div > span {
|
7
|
+
@include progress-bar-stripes-webkit-fix($strip-color);
|
8
|
+
@include background(linear-gradient(
|
9
|
+
-45deg,
|
10
|
+
$strip-color 0%,
|
11
|
+
$strip-color 25%,
|
12
|
+
rgba(0, 0, 0, 0.0) 25%, // TODO switch to transparent once supported
|
13
|
+
rgba(0, 0, 0, 0.0) 50%, // TODO switch to transparent once supported
|
14
|
+
$strip-color 50%,
|
15
|
+
$strip-color 75%,
|
16
|
+
rgba(0, 0, 0, 0.0) 75%, // TODO switch to transparent once supported
|
17
|
+
rgba(0, 0, 0, 0.0) 100% // TODO switch to transparent once supported
|
18
|
+
));
|
19
|
+
background-size: 50px 50px;
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
// Fix for older webkit not supporting the offical gradient syntax
|
24
|
+
@mixin progress-bar-stripes-webkit-fix ($strip-color) {
|
25
|
+
background-image:
|
26
|
+
-webkit-gradient(linear, 0 0, 100% 100%,
|
27
|
+
color-stop(0.0, $strip-color),
|
28
|
+
color-stop(0.25, $strip-color),
|
29
|
+
color-stop(0.25, transparent),
|
30
|
+
color-stop(0.5, transparent),
|
31
|
+
color-stop(0.5, $strip-color),
|
32
|
+
color-stop(0.75, $strip-color),
|
33
|
+
color-stop(0.75, transparent),
|
34
|
+
color-stop(1.0, transparent)
|
35
|
+
);
|
36
|
+
}
|
metadata
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fancy-progress-bars
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Stefan Huber
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2011-04-21 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: bundler
|
16
|
+
requirement: &2152911800 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 1.0.10
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *2152911800
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: compass
|
27
|
+
requirement: &2152911300 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ~>
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 0.11.beta.7
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *2152911300
|
36
|
+
description: Fancy Progress Bars helps you easily style progress bars with beautiful
|
37
|
+
CSS3 features without any images. This requires the Compass stylesheet authoring
|
38
|
+
framework.
|
39
|
+
email:
|
40
|
+
- MSNexploder@gmail.com
|
41
|
+
executables: []
|
42
|
+
extensions: []
|
43
|
+
extra_rdoc_files: []
|
44
|
+
files:
|
45
|
+
- .gitignore
|
46
|
+
- CHANGELOG.md
|
47
|
+
- Gemfile
|
48
|
+
- LICENSE
|
49
|
+
- README.md
|
50
|
+
- Rakefile
|
51
|
+
- example/basics.html
|
52
|
+
- example/colors.html
|
53
|
+
- example/config.rb
|
54
|
+
- example/javascripts/progress.js
|
55
|
+
- example/sass/_page-styles.scss
|
56
|
+
- example/sass/basics.scss
|
57
|
+
- example/sass/colors.scss
|
58
|
+
- example/sass/ie.scss
|
59
|
+
- example/sass/size.scss
|
60
|
+
- example/sass/styles.scss
|
61
|
+
- example/size.html
|
62
|
+
- example/styles.html
|
63
|
+
- fancy-progress-bars.gemspec
|
64
|
+
- lib/fancy-progress-bars.rb
|
65
|
+
- lib/fancy-progress-bars/stylesheets/_fancy-progress-bars.scss
|
66
|
+
- lib/fancy-progress-bars/stylesheets/fancy-progress-bars/_animated.scss
|
67
|
+
- lib/fancy-progress-bars/stylesheets/fancy-progress-bars/_background.scss
|
68
|
+
- lib/fancy-progress-bars/stylesheets/fancy-progress-bars/_common.scss
|
69
|
+
- lib/fancy-progress-bars/stylesheets/fancy-progress-bars/_defaults.scss
|
70
|
+
- lib/fancy-progress-bars/stylesheets/fancy-progress-bars/_glossy-gradient.scss
|
71
|
+
- lib/fancy-progress-bars/stylesheets/fancy-progress-bars/_label.scss
|
72
|
+
- lib/fancy-progress-bars/stylesheets/fancy-progress-bars/_matte-gradient.scss
|
73
|
+
- lib/fancy-progress-bars/stylesheets/fancy-progress-bars/_plain.scss
|
74
|
+
- lib/fancy-progress-bars/stylesheets/fancy-progress-bars/_stripes.scss
|
75
|
+
- lib/fancy-progress-bars/templates/project/manifest.rb
|
76
|
+
- lib/fancy-progress-bars/templates/project/screen.scss
|
77
|
+
- lib/fancy-progress-bars/version.rb
|
78
|
+
homepage: https://github.com/MSNexploder/fancy-progress-bars
|
79
|
+
licenses: []
|
80
|
+
post_install_message:
|
81
|
+
rdoc_options: []
|
82
|
+
require_paths:
|
83
|
+
- lib
|
84
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
85
|
+
none: false
|
86
|
+
requirements:
|
87
|
+
- - ! '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
91
|
+
none: false
|
92
|
+
requirements:
|
93
|
+
- - ! '>='
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
96
|
+
requirements: []
|
97
|
+
rubyforge_project: fancy-progress-bars
|
98
|
+
rubygems_version: 1.7.2
|
99
|
+
signing_key:
|
100
|
+
specification_version: 3
|
101
|
+
summary: Make fancy CSS3 progress bars with the Compass stylesheet authoring framework.
|
102
|
+
test_files: []
|
103
|
+
has_rdoc:
|