From 1cdee303fe117a17af9f05202ffe071ca4d9b030 Mon Sep 17 00:00:00 2001
From: joeuhren <46763106+joeuhren@users.noreply.github.com>
Date: Tue, 1 Dec 2020 19:19:50 -0700
Subject: [PATCH] Enable better responsive/mobile support
---
public/stylesheets/style.css | 26 ++++++++++++++++++++++++
views/address.pug | 9 ++++++---
views/block.pug | 7 ++++---
views/claim_address.pug | 9 ++++++---
views/includes/address_history.pug | 10 ++++++++--
views/includes/net_addnodes.pug | 12 +++++++++++
views/includes/net_list.pug | 6 ++++++
views/includes/rl_balance.pug | 3 ++-
views/includes/rl_received.pug | 3 ++-
views/index.pug | 17 +++++++++++-----
views/layout.pug | 17 +++++++++++-----
views/market.pug | 32 ++++++++++++++++++++----------
views/movement.pug | 10 ++++++++--
views/network.pug | 19 +++++++++---------
views/reward.pug | 9 ++++++---
views/richlist.pug | 3 ++-
views/tx.pug | 19 +++++++++---------
17 files changed, 151 insertions(+), 60 deletions(-)
diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css
index 2ce2d56..6bd08d0 100644
--- a/public/stylesheets/style.css
+++ b/public/stylesheets/style.css
@@ -114,6 +114,32 @@ table {
padding-right: 5px;
}
+.pagination > .paginate_button > a, .pagination > .paginate_button.disabled > a {
+ border: 1px solid black;
+}
+
+ul.pagination {
+ justify-content: flex-start;
+ display: inline-block;
+}
+
+ul.pagination > li {
+ display: inline;
+}
+
+ul.pagination > li > a {
+ float: left;
+}
+
+@media(max-width:576px){
+ .dataTables_paginate {
+ font-size: 80%;
+ }
+ #marketChart {
+ display: none;
+ }
+}
+
.tab-pane {
margin-top: 5px;
}
diff --git a/views/address.pug b/views/address.pug
index 35ca43a..6a75b76 100644
--- a/views/address.pug
+++ b/views/address.pug
@@ -35,11 +35,14 @@ block content
thead
tr
if settings.show_sent_received == true
- th.d-none.d-sm-table-cell #{settings.locale.total_sent} (#{settings.symbol})
+ th.d-none.d-sm-table-cell #{settings.locale.total_sent}
+ span.small (#{settings.symbol})
if address.a_id !== 'coinbase'
if settings.show_sent_received == true
- th #{settings.locale.total_received} (#{settings.symbol})
- th #{settings.locale.rl_balance} (#{settings.symbol})
+ th #{settings.locale.total_received}
+ span.small (#{settings.symbol})
+ th #{settings.locale.rl_balance}
+ span.small (#{settings.symbol})
th #{settings.locale.a_qr}
tbody
tr
diff --git a/views/block.pug b/views/block.pug
index fc231d5..f629954 100644
--- a/views/block.pug
+++ b/views/block.pug
@@ -79,14 +79,15 @@ block content
table.table.table-bordered.table-striped.summary-table
thead
tr
- th #{settings.locale.tx_hash}
+ th.d-none.d-sm-table-cell #{settings.locale.tx_hash}
th #{settings.locale.tx_recipients}
- th #{settings.locale.mkt_amount} (#{settings.symbol})
+ th #{settings.locale.mkt_amount}
+ span.small (#{settings.symbol})
th
tbody
each txn in txs
tr
- td
+ td.d-none.d-sm-table-cell
a.breakWord(href='/tx/' + txn.txid) #{txn.txid}
td #{txn.vout.length}
if txn.vout.length > 0
diff --git a/views/claim_address.pug b/views/claim_address.pug
index 1118174..05c1de2 100644
--- a/views/claim_address.pug
+++ b/views/claim_address.pug
@@ -57,11 +57,14 @@ block content
thead
tr
if settings.show_sent_received == true
- th.d-none.d-sm-block #{settings.locale.total_sent} (#{settings.symbol})
+ th.d-none.d-sm-table-cell #{settings.locale.total_sent}
+ span.small (#{settings.symbol})
if address.a_id !== 'coinbase'
if settings.show_sent_received == true
- th.d-none.d-sm-block #{settings.locale.total_received} (#{settings.symbol})
- th #{settings.locale.rl_balance} (#{settings.symbol})
+ th.d-none.d-sm-table-cell #{settings.locale.total_received}
+ span.small (#{settings.symbol})
+ th #{settings.locale.rl_balance}
+ span.small (#{settings.symbol})
th #{settings.locale.a_qr}
tbody
tr
diff --git a/views/includes/address_history.pug b/views/includes/address_history.pug
index 340ddd0..3a4e255 100644
--- a/views/includes/address_history.pug
+++ b/views/includes/address_history.pug
@@ -29,6 +29,12 @@ script.
ajax: {
"url": '/ext/getaddresstxsajax/'+hashAddress
},
+ language: {
+ paginate: {
+ previous: '<',
+ next: '>'
+ }
+ },
rowCallback: function (row, data, index) {
var timestamp = data[0]; //variables for better readability
var txhash = data[1]; //variables for better readability
@@ -37,7 +43,7 @@ script.
var balance = (data[4] / 100000000).toLocaleString('en',{'minimumFractionDigits':2,'maximumFractionDigits':8,'useGrouping':true}); //variables for better readability
var balanceParts = balance.split('.');
$("td:eq(0)", row).html(format_unixtime(new Date(timestamp), true));
- $("td:eq(1)", row).html('' + txhash + '').addClass('breakWord');
+ $("td:eq(1)", row).html('' + txhash + '').addClass('breakWord d-none d-sm-table-cell');
var amount = 0;
var updown = '';
var rowclass = 'info';
@@ -72,7 +78,7 @@ table#address-txs.table.table-bordered.table-striped
thead
tr
th #{settings.locale.timestamp}
- th #{settings.locale.tx_hash}
+ th.d-none.d-sm-table-cell #{settings.locale.tx_hash}
th #{settings.locale.mkt_amount}
span.small (#{settings.symbol})
th #{settings.locale.rl_balance}
diff --git a/views/includes/net_addnodes.pug b/views/includes/net_addnodes.pug
index 7e0f12a..c210894 100644
--- a/views/includes/net_addnodes.pug
+++ b/views/includes/net_addnodes.pug
@@ -7,6 +7,12 @@ script.
responsive: true,
lengthChange: true,
processing: true,
+ language: {
+ paginate: {
+ previous: '<',
+ next: '>'
+ }
+ },
ajax: {
url: '/ext/connections',
dataSrc: function (json) {
@@ -31,6 +37,12 @@ script.
responsive: true,
lengthChange: true,
processing: true,
+ language: {
+ paginate: {
+ previous: '<',
+ next: '>'
+ }
+ },
ajax: {
url: '/ext/connections',
dataSrc: function (json) {
diff --git a/views/includes/net_list.pug b/views/includes/net_list.pug
index ba0634a..595447c 100644
--- a/views/includes/net_list.pug
+++ b/views/includes/net_list.pug
@@ -7,6 +7,12 @@ script.
responsive: true,
lengthChange: true,
processing: true,
+ language: {
+ paginate: {
+ previous: '<',
+ next: '>'
+ }
+ },
ajax: {
url: '/ext/connections',
dataSrc: function (json) {
diff --git a/views/includes/rl_balance.pug b/views/includes/rl_balance.pug
index 6f162f7..d95a0f1 100644
--- a/views/includes/rl_balance.pug
+++ b/views/includes/rl_balance.pug
@@ -7,7 +7,8 @@
th.text-center
span.fa.fa-flag-checkered
th #{settings.locale.tx_address}
- th #{settings.locale.rl_balance} (#{settings.symbol})
+ th #{settings.locale.rl_balance}
+ span.small (#{settings.symbol})
th.text-center %
tbody
- var count = 0;
diff --git a/views/includes/rl_received.pug b/views/includes/rl_received.pug
index d065867..8669f66 100644
--- a/views/includes/rl_received.pug
+++ b/views/includes/rl_received.pug
@@ -7,7 +7,8 @@
th.text-center
span.fa.fa-flag-checkered
th #{settings.locale.tx_address}
- th #{settings.locale.rl_received} (#{settings.symbol})
+ th #{settings.locale.rl_received}
+ span.small (#{settings.symbol})
tbody
- var count = 0;
each item in received
diff --git a/views/index.pug b/views/index.pug
index 268aff7..7eb367f 100644
--- a/views/index.pug
+++ b/views/index.pug
@@ -29,6 +29,12 @@ block content
iDisplayLength: displayLengthMax,
lengthMenu: lengthMenuOpts,
ajax: '/ext/getlasttxsajax/0',
+ language: {
+ paginate: {
+ previous: '<',
+ next: '>'
+ }
+ },
rowCallback: function(row, data, index) {
var blockindex = data[0]; //variables for better readability
var blockhash = data[1]; //variables for better readability
@@ -39,10 +45,10 @@ block content
var amount = amountParts[0] + '.' + amountParts[1] + '';
var timestamp = data[5];
$("td:eq(0)", row).html('' + blockindex + '');
- $("td:eq(1)", row).html('' + txhash + '').addClass("text-center breakWord");
+ $("td:eq(1)", row).html('' + txhash + '').addClass("text-center breakWord d-none d-sm-table-cell");
$("td:eq(2)", row).html(outputs).addClass("text-center");
$("td:eq(3)", row).html(amount);
- $("td:eq(4)", row).html(format_unixtime(new Date(timestamp), true));
+ $("td:eq(4)", row).html(format_unixtime(new Date(timestamp), true)).addClass("text-center d-none d-sm-table-cell");
},
});
setInterval( function () {
@@ -67,9 +73,10 @@ block content
thead
tr
th.text-center #{settings.locale.ex_block}
- th.text-center #{settings.locale.tx_hash}
+ th.text-center.d-none.d-sm-table-cell #{settings.locale.tx_hash}
th.text-center #{settings.locale.tx_recipients}
- th.text-center #{settings.locale.mkt_amount} (#{settings.symbol})
- th.text-center #{settings.locale.timestamp}
+ th.text-center #{settings.locale.mkt_amount}
+ span.small (#{settings.symbol})
+ th.text-center.d-none.d-sm-table-cell #{settings.locale.timestamp}
tbody.text-center
.footer-padding
\ No newline at end of file
diff --git a/views/layout.pug b/views/layout.pug
index 7c1d15f..8264671 100644
--- a/views/layout.pug
+++ b/views/layout.pug
@@ -1,6 +1,7 @@
doctype html
html
head
+ meta(name='viewport' content='width=device-width, initial-scale=1')
title= settings.title
link(rel='stylesheet', href='/themes/' + settings.theme + '/bootstrap.min.css')
link(rel='stylesheet', href='/vendor/jqplot/jquery.jqplot.css')
@@ -48,8 +49,8 @@ html
$("#difficulty").text(diffString);
$("#difficultyHybrid").text(json.data[0].difficultyHybrid);
$("#hashrate").text(hashrateString);
- $("#lastPrice").text(parseFloat(json.data[0].lastPrice).toFixed(8) + ' #{settings.markets.exchange}'.toUpperCase());
- $("#marketCap").text((parseFloat(json.data[0].lastPrice).toFixed(8) * parseInt(parseFloat(json.data[0].supply).toFixed(0))).toLocaleString('en') + ' #{settings.markets.exchange}'.toUpperCase());
+ $("#lastPrice").text(parseFloat(json.data[0].lastPrice).toFixed(8));
+ $("#marketCap").html((parseFloat(json.data[0].lastPrice).toFixed(8) * parseInt(parseFloat(json.data[0].supply).toFixed(0))).toLocaleString('en') + '' + '#{settings.markets.exchange}'.toUpperCase() + '');
$("#lblConnections").text(json.data[0].connections + ' connections');
$("#lblBlockcount").text(json.data[0].blockcount + ' blocks');
$("#lblX1").text(' ');
@@ -63,7 +64,13 @@ html
$('.history-table').dataTable({
searching: false,
ordering: false,
- responsive: true
+ responsive: true,
+ language: {
+ paginate: {
+ previous: '<',
+ next: '>'
+ }
+ }
});
}
$('.iquidus').css('color',$('.table').css('color'));
@@ -112,7 +119,7 @@ html
var supplyType='';
if ('#{settings.index.difficulty}' == 'Hybrid') supplyType+='
';
if (#{settings.index.show_market_cap} == true && #{settings.index.show_market_cap_over_price} != true) supplyType+='
';
- return '