-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathindex.html
317 lines (248 loc) · 11.6 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
<!DOCTYPE html>
<html>
<head>
<title>bitcoinaddress.js - simplified Bitcoin payment user interaction</title>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.no-icons.min.css" rel="stylesheet" />
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<style type="text/css">
body {
padding-top: 60px;
}
/* http://davidwalsh.name/html5-hidden */
*[hidden] { display: none; }
/* Action hints are slidedowns, hidden by default */
.bitcoin-action-hint {
display: none;
}
/* Show dashed underlining so people get a hint it's clickable */
.bitcoin-address-container .bitcoin-address {
border-bottom: 1px dashed gray;
cursor: pointer;
}
/* Center QR code image */
.bitcoin-address-qr-container > img,
.bitcoin-address-qr-container > canvas {
margin: 0 auto;
}
/* bitcoinprices.js - for bitcoinprices, donation nominated in USD */
.clickable-price {
cursor: pointer;
border-bottom: 1px #888 dashed;
}
/* Demo page splash styling */
#bitcoin-icon {
font-size: 128px;
color: #F7931A;
}
#bitcoin-icon .fa-circle {
text-shadow: 0 3px 3px rgba(32, 32, 32, 0.3);
}
#bitcoin-icon .fa-btc {
text-shadow: 0 -1px 1px black;
-moz-transform: rotate(20deg);
-webkit-transform: rotate(20deg);
transform: rotate(20deg);
}
.example-row {
margin: 30px 0;
}
.example-heading {
color: #357ebd;
}
</style>
</head>
<body>
<div class="navbar navbar-fixed-top navbar-default" id="navbar-site">
<div class="navbar-inner">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">bitcoinaddress.js</a>
</div>
<ul class="nav navbar-nav">
<li class="dropdown currency-dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-money"></i> <span class="currency-symbol">BTC</span><b class="caret"></b></a>
<ul class="dropdown-menu">
</ul>
</li>
</ul>
<div class="nav navbar-nav navbar-right">
<a class="navbar-brand" href="http://opensourcehacker.com"><i class="fa fa-star"></i> By Mikko Ohtamaa</a>
<a class="navbar-brand" href="http://opensourcehacker.com"><i class="fa fa-rss"></i></a>
<a class="navbar-brand" href="http://twitter.com/moo9000"><i class="fa fa-twitter"></i></a>
<a class="navbar-brand" href="https://www.facebook.com/pages/Open-Source-Hacker/181710458567630"><i class="fa fa-facebook"></i></a>
</div>
</div>
</div>
</div>
<div class="container" style="min-height:480px;">
<div class="jumbotron">
<div class="container">
<div class="row">
<div class="col-md-8 col-sm-8 text-center">
<h1>bitcoinaddress.js</h1>
<p>JavaScript library for simplified Bitcoin payment user interaction.</p>
<p><a class="btn btn-primary btn-lg" role="button" href="https://github.com/miohtama/bitcoinaddress.js"><i class="fa fa-github"></i> View on Github</a></p>
</div>
<div class="col-md-4 col-sm-4">
<span class="fa-stack" id="bitcoin-icon">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-btc fa-stack fa-inverse fa-stack-1x"></i>
</span>
</div>
</div>
</div>
</div>
<h2>Bitcoin address and payment examples</h2>
<div class="row example-row">
<div class="col-md-4">
<h3>Basic features</h3>
<ul>
<li>All JavaScript: no server-side components needed</li>
<li>Mobile friendly - no pop-ups</li>
<li>Copy-paste hinting</li>
<li>Automatic QR code generation</li>
<li>Support wallet apps: <strong>Armory</strong>, <strong>Electrum</strong>, <strong>blockchain.info</strong>, <strong>Coinbase</strong>, <strong>Multibit</strong>, <strong>Bitcoin-QT</strong> and others</li>
</ul>
<p>For usage instructions see <a href="">Github page</a>.</p>
</div>
<div class="col-md-8">
<h3 class="example-heading">
Example: Send donations to this project
</h3>
<p class="text-center text-muted">
<small>
A plain Bitcoin address without suggested payment amount and transaction notes.
</small>
</p>
<div class="well">
<p class="text-center">
<strong class="bitcoin-address" data-bc-address="19356KxTs9Bw5AAdxens5hoxDSp5bsUKse">19356KxTs9Bw5AAdxens5hoxDSp5bsUKse</strong>
</p>
</div>
<h4>Code</h4>
<pre>
<strong class="bitcoin-address"
data-bc-address="19356KxTs9Bw5AAdxens5hoxDSp5bsUKse">
19356KxTs9Bw5AAdxens5hoxDSp5bsUKse
</strong>
</pre>
</div>
</div>
<div class="row example-row">
<div class="col-md-4">
<h3>Payment details</h3>
<ul>
<li><a href="https://en.bitcoin.it/wiki/BIP_0021">Bitcoin URI scheme</a> supports <strong>amount</strong>, <strong>address label</strong> and <strong>transaction note</strong>
<li><a href="https://github.com/miohtama/bitcoin-prices">bitcoinprices.js</a> converts Bitcoin amounts to the user currency in fly</li>
</ul>
</div>
<div class="col-md-8">
<div id="donation-btc">
<h3 class="example-heading">
Example: Send <strong data-btc-price="0.1" class="clickable-price">0.1 BTC</strong> donation to this project
</h3>
<p class="text-center text-muted">
<small>
The donation amount is nominated in bitcoins and the fiat amount
<a href="https://github.com/miohtama/bitcoin-prices">reflects the market rates</a>.
Choose currency by clicking the price or from the top menu.
</small>
</p>
<div class="well">
<p class="text-center">
<strong class="bitcoin-address"
data-bc-amount="0.1"
data-bc-label="bitcoinaddress.js project"
data-bc-message="0.1 BTC donation"
data-bc-address="19356KxTs9Bw5AAdxens5hoxDSp5bsUKse">19356KxTs9Bw5AAdxens5hoxDSp5bsUKse</strong>
</p>
</div>
</div>
</div>
</div>
<div class="row example-row">
<div class="col-md-4">
<h3>Floating fiat amounts</h3>
<ul>
<li>
With <a href="https://github.com/miohtama/bitcoin-prices">bitcoinprices.js</a> you can also specify
the payment amount in the fiat currency (USD, EUR) and it will be converted to the Bitcoin amount
using the current exchange rate.</li>
</li>
</ul>
</div>
<div class="col-md-8">
<div id="donation-usd" data-usd-amount="20" hidden>
<h3 class="example-heading">
Send <strong>20 USD</strong> donation to this project
</h3>
<p class="text-center text-muted">
<small>
The donation amount is nominated in USD and the BTC amount
<a href="https://github.com/miohtama/bitcoin-prices">reflects the market rates</a>.
</small>
</p>
<!-- For the following, data-bc-amount will be filled in by JavaScript -->
<div class="well">
<p class="text-center">
<strong class="bitcoin-address-usd"
data-bc-address="19356KxTs9Bw5AAdxens5hoxDSp5bsUKse"
data-bc-label="bitcoinaddress.js project"
data-bc-message="20 USD donation">
19356KxTs9Bw5AAdxens5hoxDSp5bsUKse
</strong>
</p>
</div>
</div>
</div>
</div>
<div class="row">
<p class="text text-success lead text-center" style="margin-top: 3em">
<a href="https://github.com/miohtama/bitcoinaddress.js"><i class="fa fa-github"></i> Visit Github repository for more information</a>
</p>
</div>
</div>
<!-- Use HTML5 templates when they are more widespread http://www.html5rocks.com/en/tutorials/webcomponents/template/ -->
<div id="bitcoin-address-template" class="bitcoin-address-container" hidden>
<div>
<span class="bitcoin-address"></span>
</div>
<a href="#" class="bitcoin-address-action bitcoin-address-action-send">
<i class="fa fa-btc"></i>
Pay from wallet
</a>
<a href="#" class="bitcoin-address-action bitcoin-address-action-copy">
<i class="fa fa-copy"></i>
Copy
</a>
<a href="#" class="bitcoin-address-action bitcoin-address-action-qr">
<i class="fa fa-qrcode"></i>
QR code
</a>
<div class="bitcoin-action-hint bitcoin-action-hint-send">
Sending payment to the address from locally installed Bitcoin wallet app.
</div>
<div class="bitcoin-action-hint bitcoin-action-hint-copy">
Press CTRL + C or ⌘ + C to copy the Bitcoin address.
</div>
<div class="bitcoin-action-hint bitcoin-action-hint-qr">
<p>
Scan the QR code with your mobile Bitcoin app to
make the payment:
</p>
<div class="bitcoin-address-qr-container">
<!-- Filled in by JS on action click -->
</div>
</div>
</div>
<!-- beefy dev server live reloads -->
<script src="/-/live-reload.js"></script>
<script src="dist/demo.js"></script>
<!-- We include Bootstrap after demo.js which bundles jQuery -->
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
</body>