-
Notifications
You must be signed in to change notification settings - Fork 26
/
index.html
114 lines (107 loc) · 4.72 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>donuts - by Mattia Larentis</title>
<meta name="author" content="Mattia Larentis">
<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8;" />
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css">
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/docs.css">
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/js/google-code-prettify/prettify.css">
<link rel="stylesheet" href="static/stylesheets/donuts.css" />
<style>
h1 {
margin-bottom: 20px;
text-align: center;
}
h3 {
margin-top: 20px;
}
</style>
</head>
<body>
<a href="https://github.com/nostalgiaz/donuts"><img
style="position: absolute; top: 0; right: 0; border: 0;"
src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"
alt="Fork me on GitHub"></a>
<div class="container">
<div class="row-fluid">
<div class="span12">
<h1>Donuts
<small>- by <a href="http://larentis.eu">Mattia Larentis</a> <a href="https://twitter.com/spiritualguru">(@SpiritualGuru)</a>
</small>
</h1>
</div>
</div>
<div class="row-fluid">
<div class="span8 offset2" style="text-align: center;">
<iframe src="http://ghbtns.com/github-btn.html?user=nostalgiaz&repo=donuts&type=watch&count=true"
allowtransparency="true" frameborder="0" scrolling="0" width="170" height="30"></iframe>
<iframe src="http://ghbtns.com/github-btn.html?user=nostalgiaz&repo=donuts&type=fork&count=true"
allowtransparency="true" frameborder="0" scrolling="0" width="170" height="30"></iframe>
<iframe src="http://ghbtns.com/github-btn.html?user=nostalgiaz&type=follow&count=true"
allowtransparency="true" frameborder="0" scrolling="0" width="170" height="30"></iframe>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<h3>Donuts</h3>
<div class="bs-docs-example">
<div class="donut donut-big">
<div class="donut-arrow" data-percentage="10"></div>
</div>
<div class="donut">
<div class="donut-arrow" data-percentage="30"></div>
</div>
<div class="donut donut">
<div class="donut-arrow" data-percentage="60"></div>
</div>
<div class="donut donut-small">
<div class="donut-arrow" data-percentage="90"></div>
</div>
</div>
<pre class="prettyprint linenums">
<div class="donut donut-big">
<div class="donut-arrow" data-percentage="10"></div>
</div>
<div class="donut">
<div class="donut-arrow" data-percentage="30"></div>
</div>
<div class="donut donut">
<div class="donut-arrow" data-percentage="60"></div>
</div>
<div class="donut donut-small">
<div class="donut-arrow" data-percentage="90"></div>
</div></pre>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<div class="bs-docs-example">
<div id="myDonut" class="donut donut-big">
<div class="donut-arrow" data-percentage="10"></div>
</div>
<div id="myButton" class="btn btn-danger" style="margin-left: 10px">Update percentage</div>
</div>
<pre class="prettyprint linenums">
$('#myButton').on('click', function () {
$('#myDonut').find('.donut-arrow').trigger('updatePercentage', Math.floor((Math.random()*100)))
});</pre>
</div>
</div>
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="http://twitter.github.com/bootstrap/assets/js/google-code-prettify/prettify.js"></script>
<script src="static/js/donuts.js"></script>
<script>
window.prettyPrint && prettyPrint();
$(function () {
/*to select a button tag,whenever it is clicked,div my donut tag is selected and the value off the percentage is updated
to a random value */
$('#myButton').on('click', function () {
$('#myDonut').find('.donut-arrow').trigger('updatePercentage', Math.floor((Math.random()*100)))
});
});
</script>
</body>
</html>