forked from zhoutuo/ngRainbow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
83 lines (83 loc) · 3.79 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!DOCTYPE html>
<html ng-app="ngRainbowDemo">
<head>
<title>ngRainbow Demo</title>
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
<script type="text/javascript" src="ngRainbow.js"></script>
<script type="text/javascript" src="app.js"></script>
</head>
<body ng-controller="demoController">
<div class="row">
<div class="col-lg-4 col-lg-offset-4">
<h1>ngRainbow.js</h1>
</div>
<div class="col-lg-4 col-lg-offset-4" id="content">
<div>
<h3>Introduction</h3>
<p>
This is a <a href="http://buunguyen.github.io/rainbow.js/">Rainbow.js</a>
plug-in for AngularJS and most code is used from <a href="http://buunguyen.github.io/rainbow.js/">Rainbow.js</a>.
Kudos to its author: <a href="https://github.com/buunguyen">Buu Nguyen</a>.
</p>
</div>
<div>
<h3>Demo</h3>
<button ng-click="showBar()">Show Rainbow Bar</button>
<button ng-click="hideBar()">Hide Rainbow Bar</button>
</div>
<div>
<h3>Usages</h3>
<h5>Installation</h5>
<p>
Download ngRainbow.js and include it in the page:
<code>
<script src="ngRainbow.js"></script>
</code>
<br>
Include the corresponding module in your module:
<code>
var app = angular.module('ngRainbow', []);
</code>
<br>
Import the Rainbow.js provider in the controller:
<code>
app.controller('Controller', ['rainbowBar', function(rainbowBar) {}]);
</code>
</p>
<h5>API</h5>
<h6>Show</h6>
<p>
<code>rainbowBar.show();</code>
</p>
<h6>Hide</h6>
<p>
<code>rainbowBar.hide();</code>
</p>
<h6>Configuration</h6>
<p>
Use the corresponding provider to configure the rainbowBar
before using it. <br>
Options available(Most quoted from <a href="http://buunguyen.github.io/rainbow.js/">Rainbow.js</a>):
<ul>
<li>autoRun (default: true): if false, call rainbowBar.addProgress() manually to run.</li>
<li>barThickness (default: 3): the progress bar thickness.</li>
<li>barColors: list of gradient color stops used to draw the progress bar.</li>
<li>shadowBlur (default: 10): the shadow blur.</li>
<li>shadowColor: the shadow color.</li>
</ul>
<code>
app.config(['rainbowBarProvider', function(rainbowBarProvider) {<br>
rainbowBarProvider.configure({<br>
barThickness: 5<br>
shadowColor: 'rgba(0, 0, 0, .5)'<br>
});}]);<br>
</code>
</p>
</div>
</div>
</div>
</body>
</html>