forked from blockcypher/explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.html
223 lines (199 loc) · 8.39 KB
/
home.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
{% extends "base.html" %}
{% block content %}
{% load i18n %}
<div class="bg-primary-gradient page-header">
<div class="container">
{% include "partials/messages.html" %}
<div class="row">
<div class="col-lg-8 col-lg-offset-2">
<h1>Search the block chain</h1>
<p class="lead">Find info that other block explorers don't have</p>
<form role="search" method="post" action="{% url "home" %}">
{% csrf_token %}
<input type="hidden" value="btc" id="id_coin_symbol" name="coin_symbol">
<input type="hidden" value="" id="search_filter" name="search_filter">
<div class="input-group input-group-lg">
<div class="input-group-btn">
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<span id="search-dropdown-label">BTC</span> <span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu">
<li><a href="javascript:void(0);" onclick="setCoin('btc', 'BTC')">Bitcoin</a></li>
<li><a href="javascript:void(0);" onclick="setCoin('btc-testnet', 'BTC Testnet')">Bitcoin Testnet</a></li>
<li><a href="javascript:void(0);" onclick="setCoin('ltc', 'LTC')">Litecoin</a></li>
<li><a href="javascript:void(0);" onclick="setCoin('doge', 'DOGE')">DogeCoin</a></li>
<li><a href="javascript:void(0);" onclick="setCoin('dash', 'DASH')">Dash</a></li>
<li><a href="javascript:void(0);" onclick="setCoin('bcy', 'BCY Testnet')">Blockcypher Testnet</a></li>
</ul>
</div>
<input autofocus class="form-control" id="id_search_string" maxlength="128" name="search_string" type="search" placeholder="Example: 16Fg2yjwrbtC6fZp61EV9mNVKmwCzGasw5">
</div>
<p class="help-block search-filter">
Enter an
<a href="javascript:void(0);" onclick="filterSearch('address', this)">address</a>,
<a href="javascript:void(0);" onclick="filterSearch('tx_hash', this)">transaction hash</a>,
<a href="javascript:void(0);" onclick="filterSearch('block_hash', this)">block hash</a>,
<a href="javascript:void(0);" onclick="filterSearch('block_num', this)">block number</a>, or
<a href="javascript:void(0);" onclick="filterSearch('wallet_name', this)">wallet name</a>.
</p>
<p class="text-center">
<button type="submit" class="btn btn-primary btn-lg btn-xl">
<i class="fa fa-search"></i>
{% trans "Search" %}
</button>
</p>
</form>
</div>
</div>
</div>
</div>
<div class="bg-white">
<div class="container">
<div class="ad">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Main explorer -->
<ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-8670884776365868"
data-ad-slot="7521279835"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
</div>
<div class="container">
<div class="row text-center">
<h2>Browse the Blockchain</h2>
<div class="col-lg-12">
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-4">
<a href="{% url 'coin_overview' 'btc' %}" class="btc coin">
<span class="mpsb">Bitcoin</span>
</a>
</div>
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-4">
<a href="https://grinmint.com/explorer/" class="grin coin">
<span class="mpsb">Grin</span>
</a>
</div>
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-4">
<a href="{% url 'coin_overview' 'ltc' %}" class="ltc coin">
<span class="mpsb">Litecoin</span>
</a>
</div>
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-4">
<a href="{% url 'coin_overview' 'doge' %}" class="doge coin">
<span class="mpsb">Dogecoin</span>
</a>
</div>
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-4">
<a href="{% url 'coin_overview' 'dash' %}" class="dash-logo coin">
<span class="mpsb">Dash</span>
</a>
</div>
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-4">
<a href="{% url 'coin_overview' 'bcy' %}" class="bc-testnet coin">
<span class="mpsb">BlockCypher Testnet</span>
</a>
</div>
</div>
</div>
<br />
<br />
<div class="row">
<p class="text-center">
Read more about what makes this block explorer different
<a href="{% url 'highlights' %}">here</a>.
</p>
</div>
</div>
</div>
{% endblock content %}
{% block extra_js %}
<script>
function filterSearch(filter, that) {
//Update search input
var coin_symbol_selected = $('#id_coin_symbol').val();
var search_placeholders = {
'btc': {
'address': '16Fg2yjwrbtC6fZp61EV9mNVKmwCzGasw5',
'wallet_name': 'sample.walletname.bit',
'tx_hash': '2509e5b65ed362557fcf2104e89f3c2430ceecc6a3275556c1b966eb641fe092',
'block_hash': '0000000000000000001e847e71b955482dab7228f4849a4659c0cf5cf323f247',
'block_num': '330,027',
},
'btc-testnet': {
'address': '2N1rjhumXA3ephUQTDMfGhufxGQPZuZUTMk',
'wallet_name': '',
'tx_hash': '7f827d4a3ae3b6e408fa1737f12f9dbfa2bb8fd79e0e3e63256a6e78310790a4',
'block_hash': '00000000b5017a924643958b430f073608142bf72a3cec1bfe30fed460246737',
'block_num': '308,576',
},
'ltc': {
'address': 'LcFFkbRUrr8j7TMi8oXUnfR4GPsgcXDepo',
'wallet_name': 'sample.walletname.bit',
'tx_hash': '3826e17bbac2724cd74b7377f0bd1489a82440d651016adda0132c42a179ad02',
'block_hash': '515683dee4ea5ec9341450b4f6a6c9f842a75680e96ee130bf8605e785ad59ff',
'block_num': '675,566',
},
'doge': {
'address': 'D7Y55r6Yoc1G8EECxkQ6SuSjTgGJJ7M6yD',
'wallet_name': 'sample.walletname.bit',
'tx_hash': '28132b9676b227f16bb687f49139fbb38d185caba4533a8c36d49f0fa470d83a',
'block_hash': '3c36f6b2abcc2e30111b997e551336db60bead9a0cd3c03fb192110bfbfe1841',
'block_num': '460,882',
},
'dash': {
'address': 'XdZW5Waa1i6D9za3qpFvgiwHzr8aFcXtNP ',
'wallet_name': 'sample.walletname.bit',
'tx_hash': 'a962e3b505d94d183c8eec832d56f0b7179564c91ed101b1f067d91ab34f5228',
'block_hash': '0000000000003cbbbe719c094fa09a645006090844f913ef9da62c04b4de04c4 ',
'block_num': '640,949',
},
'bcy': {
'address': 'CFr99841LyMkyX5ZTGepY58rjXJhyNGXHf',
'wallet_name': '',
'tx_hash': '48cebffe1ed93ae2ce758abb52375cc7f89ecc94fd8244f6a9f6dd07463fc1cb',
'block_hash': '0000a577e78b310c7a5fe75abfc70f8f638aa56aae33552955c2becf509cd19a',
'block_num': '32,528',
},
}
$('#id_search_string').val(search_placeholders[coin_symbol_selected][filter]);
$('#search_filter').val(filter);
$('.search-filter .active').removeClass('active');
$(that).addClass('active');
}
$(document).ready(function(){
$( "#id_search_string" ).keydown(function() {
// Mark any suggestions as no longer a suggestion
$('.search-filter .active').removeClass('active');
});
var ads = [];
if (ads.length > 0) {
var sites = {
piiko: "https://www.piiko.co",
texcent: "http://texcent.com",
grinmint: "https://grinmint.com",
tradecore: "https://tradecore.com/"
};
var chosen_idx = Date.now() % ads.length;
var chosen_ad = ads[chosen_idx];
var track_url = "https://live.blockcypher.com/ads/"+chosen_ad;
$('#ad-link img').attr("src", "/static/img/" + chosen_ad + "_ad.png");
$('#ad-link').attr("href", sites[chosen_ad]);
$('#ad-link').click(function(e) {
ga('send', 'event', 'outbound', 'click', track_url, {
'transport': 'beacon',
'hitCallback': function() {
setTimeout(function() {
document.location = sites[chosen_ad];
}, 200);
}
});
e.preventDefault();
e.stopPropagation();
});
$('div.ad').show();
}
})
</script>
{% endblock extra_js %}