Skip to content

Commit a23ad2a

Browse files
committed
More css and layout updates
1 parent a30f725 commit a23ad2a

File tree

2 files changed

+37
-11
lines changed

2 files changed

+37
-11
lines changed

css/ethplorer.css

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ a.local-link, a.local-link:visited, a.local-link:hover {
173173
}
174174

175175
#disqus_thread {
176-
margin-top: 20px;
176+
margin-top: 60px;
177177
display: none;
178178
padding-bottom: 70px;
179179
}
@@ -186,6 +186,11 @@ td.list-field {
186186
text-overflow: ellipsis;
187187
}
188188

189+
.token-related .blue td {
190+
font-size: 20px;
191+
white-space: normal;
192+
}
193+
189194
.navbar-logo {
190195
float: left;
191196
height: 50px;
@@ -302,16 +307,22 @@ a.dashed {
302307
text-overflow: ellipsis
303308
}
304309

310+
.same-address {
311+
opacity: 0.6;
312+
}
313+
305314
.incoming {
306-
color: #4f9450 !important;
315+
font-size: 16px;
316+
color: #1e8c1e !important;
307317
}
308318

309319
.outgoing {
310-
color: #900 !important;
320+
font-size: 16px;
321+
color: #8c1e1e !important;
311322
}
312323

313324
.hash-from-to {
314-
max-width: 50vw;
325+
max-width: 40vw;
315326
overflow: hidden;
316327
text-overflow: ellipsis
317328
}
@@ -325,6 +336,7 @@ a.dashed {
325336
display: block;
326337
padding-left: 16px;
327338
color: white;
339+
margin-bottom: 20px;
328340
}
329341

330342
#address-issuances tr td:last-child {
@@ -446,6 +458,10 @@ a.dashed {
446458
}
447459

448460
@media screen and (max-width: 699px) {
461+
.token-related .blue td {
462+
font-size: 18px;
463+
}
464+
449465
.hash-from-to {
450466
max-width: 56vw;
451467
}
@@ -462,6 +478,9 @@ a.dashed {
462478
}
463479

464480
@media screen and (max-width: 399px) {
481+
.token-related .blue td {
482+
font-size: 16px;
483+
}
465484
#address-token-transfers td {
466485
font-size: 11px;
467486
}

js/ethplorer.js

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -558,26 +558,33 @@ Ethplorer = {
558558
var date = Ethplorer.Utils.ts2date(tx.timestamp, false);
559559
var value = Ethplorer.Utils.formatNum(qty, true, txToken.decimals ? txToken.decimals : 18, 2) + ' ' + txToken.symbol;
560560
var token = Ethplorer.Utils.getEthplorerLink(tx.contract, txToken.name, false);
561-
var from = tx.from ? ((tx.from !== address) ? Ethplorer.Utils.getEthplorerLink(tx.from) : address) : false;
562-
var to = tx.to ? ((tx.to !== address) ? Ethplorer.Utils.getEthplorerLink(tx.to) : address) : false;
561+
var from = tx.from ? ((tx.from !== address) ? Ethplorer.Utils.getEthplorerLink(tx.from) : ('<span class="same-address">' + address + '</span>')) : false;
562+
var to = tx.to ? ((tx.to !== address) ? Ethplorer.Utils.getEthplorerLink(tx.to) : ('<span class="same-address">' + address + '</span>')) : false;
563+
var _address = (tx.address && (tx.address === address )) ? ('<span class="same-address">' + address + '</span>') : tx.address;
563564
var rowClass = '';
564565
if(from && (tx.from === address)){
565566
value = '-' + value;
566567
rowClass = 'outgoing';
567568
}else if(to && (tx.to === address)){
568569
rowClass = 'incoming';
570+
}else if(tx.address === address){
571+
if('burn' === tx.type){
572+
rowClass = 'outgoing';
573+
}else{
574+
rowClass = 'incoming';
575+
}
569576
}
570577
tdDate.html(Ethplorer.Utils.getEthplorerLink(tx.transactionHash, date, false));
578+
if(!from && tx.address){
579+
value = (tx.type && ('burn' === tx.type)) ? '-' + value + '<br>&#128293; Burn' : /*'+' + */value + '<br>&#9874; Issuance';
580+
}
571581
divData.html(
572582
'<span class="show_small">Date:&nbsp;' + date + '<br></span>' +
573583
(!data.token ? ('<span class="address-token-inline">Token:&nbsp;' + token + '<br></span>') : '') +
574584
'<span class="show_small ' + rowClass + '">Value:&nbsp;' + value + '<br></span>' +
575585
'Tx:&nbsp;' + Ethplorer.Utils.getEthplorerLink(tx.transactionHash) + '<br>' +
576-
(from ? ('From:&nbsp;' + from + '<br>To:&nbsp;' + to) : ('Address:&nbsp;' + address))
586+
(from ? ('From:&nbsp;' + from + '<br>To:&nbsp;' + to) : ('Address:&nbsp;' + _address))
577587
);
578-
if(!from && tx.address){
579-
value = (tx.type && ('burn' === tx.type)) ? '-' + value + '<br>Burn' : /*'+' + */value + '<br>Issuance';
580-
}
581588
tdQty.addClass(rowClass);
582589
tdQty.html(value);
583590
tdData.append(divData);
@@ -593,7 +600,7 @@ Ethplorer = {
593600
$('#' + tableId + ' .table').append(row);
594601
}
595602
}
596-
if(50 == data.transfers.length){
603+
if(50 === data.transfers.length){
597604
$('#' + tableId + ' .block-header').html($('#' + tableId + ' .block-header').html().replace('Transfers', 'Last 50 Transfers').replace('Operations', 'Last 50 Operations'))
598605
$('#address-transfers-more, #address-token-transfers-more').html(Ethplorer.Utils.getEtherscanLink(address, 'View full history', false));
599606
}

0 commit comments

Comments
 (0)