Add new table_header_bgcolor setting

This commit is contained in:
joeuhren
2020-12-20 18:13:24 -07:00
parent 52a5487071
commit 27f96fa4fc
17 changed files with 339 additions and 40 deletions
+1
View File
@@ -92,6 +92,7 @@ exports.display = {
"network": true,
"page_header_bgcolor": "",
"page_footer_bgcolor": "",
"table_header_bgcolor": "",
"networkpnl": 1,
"difficultypnl": 2,
"masternodespnl": 3,
+254
View File
@@ -69,6 +69,246 @@
}
}
@mixin thead-dark-border-color() {
@if theme-selector.$theme-name == "Cerulean" {
border-color: #454d55; /* Hardcoded value not present in _variables.scss */
} @else if theme-selector.$theme-name == "Cosmo" {
border-color: #494d50; /* Hardcoded value not present in _variables.scss */
} @else if theme-selector.$theme-name == "Cyborg" {
border-color: #757575; /* Hardcoded value not present in _variables.scss */
} @else if theme-selector.$theme-name == "Darkly" {
border-color: #434343; /* Hardcoded value not present in _variables.scss */
} @else if theme-selector.$theme-name == "Flatly" {
border-color: #454d55; /* Hardcoded value not present in _variables.scss */
} @else if theme-selector.$theme-name == "Journal" {
border-color: #464646; /* Hardcoded value not present in _variables.scss */
} @else if theme-selector.$theme-name == "Litera" {
border-color: #454d55; /* Hardcoded value not present in _variables.scss */
} @else if theme-selector.$theme-name == "Lumen" {
border-color: #464646; /* Hardcoded value not present in _variables.scss */
} @else if theme-selector.$theme-name == "Lux" {
border-color: #454d55; /* Hardcoded value not present in _variables.scss */
} @else if theme-selector.$theme-name == "Materia" {
border-color: #353535; /* Hardcoded value not present in _variables.scss */
} @else if theme-selector.$theme-name == "Minty" {
border-color: Minty.$table-border-color;
} @else if theme-selector.$theme-name == "Pulse" {
border-color: Pulse.$table-border-color;
} @else if theme-selector.$theme-name == "Sandstone" {
border-color: #52534c; /* Hardcoded value not present in _variables.scss */
} @else if theme-selector.$theme-name == "Simplex" {
border-color: #494d50; /* Hardcoded value not present in _variables.scss */
} @else if theme-selector.$theme-name == "Sketchy" {
border-color: #464646; /* Hardcoded value not present in _variables.scss */
} @else if theme-selector.$theme-name == "Slate" {
border-color: Slate.$table-border-color;
} @else if theme-selector.$theme-name == "Solar" {
border-color: #a5adb6; /* Hardcoded value not present in _variables.scss */
} @else if theme-selector.$theme-name == "Spacelab" {
border-color: #464646; /* Hardcoded value not present in _variables.scss */
} @else if theme-selector.$theme-name == "Superhero" {
border-color: Superhero.$gray-200;
} @else if theme-selector.$theme-name == "United" {
border-color: #642246; /* Hardcoded value not present in _variables.scss */
} @else if theme-selector.$theme-name == "Yeti" {
border-color: #464646; /* Hardcoded value not present in _variables.scss */
} @else {
border-color: #000000;
}
}
@mixin thead-light-border-color() {
@if theme-selector.$theme-name == "Cerulean" {
border-color: Cerulean.$gray-300;
} @else if theme-selector.$theme-name == "Cosmo" {
border-color: Cosmo.$gray-300;
} @else if theme-selector.$theme-name == "Cyborg" {
border-color: Cyborg.$gray-700;
} @else if theme-selector.$theme-name == "Darkly" {
border-color: Darkly.$gray-700;
} @else if theme-selector.$theme-name == "Flatly" {
border-color: Flatly.$gray-300;
} @else if theme-selector.$theme-name == "Journal" {
border-color: Journal.$gray-300;
} @else if theme-selector.$theme-name == "Litera" {
border-color: Litera.$table-border-color;
} @else if theme-selector.$theme-name == "Lumen" {
border-color: Lumen.$gray-300;
} @else if theme-selector.$theme-name == "Lux" {
border-color: Lux.$table-border-color;
} @else if theme-selector.$theme-name == "Materia" {
border-color: Materia.$gray-300;
} @else if theme-selector.$theme-name == "Minty" {
border-color: Minty.$table-border-color;
} @else if theme-selector.$theme-name == "Pulse" {
border-color: Pulse.$table-border-color;
} @else if theme-selector.$theme-name == "Sandstone" {
border-color: Sandstone.$gray-300;
} @else if theme-selector.$theme-name == "Simplex" {
border-color: Simplex.$gray-300;
} @else if theme-selector.$theme-name == "Sketchy" {
border-color: Sketchy.$gray-800;
} @else if theme-selector.$theme-name == "Slate" {
border-color: Slate.$table-border-color;
} @else if theme-selector.$theme-name == "Solar" {
border-color: Solar.$gray-800;
} @else if theme-selector.$theme-name == "Spacelab" {
border-color: Spacelab.$gray-300;
} @else if theme-selector.$theme-name == "Superhero" {
border-color: Superhero.$table-border-color;
} @else if theme-selector.$theme-name == "United" {
border-color: United.$gray-300;
} @else if theme-selector.$theme-name == "Yeti" {
border-color: Yeti.$gray-300;
} @else {
border-color: #dee2e6;
}
}
@mixin thead-dark() {
@if theme-selector.$theme-name == "Cerulean" {
color: Cerulean.$white;
background-color: Cerulean.$gray-800;
} @else if theme-selector.$theme-name == "Cosmo" {
color: Cosmo.$white;
background-color: Cosmo.$gray-800;
} @else if theme-selector.$theme-name == "Cyborg" {
color: Cyborg.$white;
background-color: Cyborg.$gray-500;
} @else if theme-selector.$theme-name == "Darkly" {
color: Darkly.$white;
background-color: Darkly.$gray-800;
} @else if theme-selector.$theme-name == "Flatly" {
color: Flatly.$white;
background-color: Flatly.$gray-800;
} @else if theme-selector.$theme-name == "Journal" {
color: Journal.$white;
background-color: Journal.$gray-800;
} @else if theme-selector.$theme-name == "Litera" {
color: Litera.$white;
background-color: Litera.$gray-800;
} @else if theme-selector.$theme-name == "Lumen" {
color: Lumen.$white;
background-color: Lumen.$gray-800;
} @else if theme-selector.$theme-name == "Lux" {
color: Lux.$white;
background-color: Lux.$gray-800;
} @else if theme-selector.$theme-name == "Materia" {
color: Materia.$white;
background-color: Materia.$gray-800;
} @else if theme-selector.$theme-name == "Minty" {
color: Minty.$white;
background-color: Minty.$primary;
} @else if theme-selector.$theme-name == "Pulse" {
color: Pulse.$white;
background-color: Pulse.$secondary;
} @else if theme-selector.$theme-name == "Sandstone" {
color: Sandstone.$white;
background-color: Sandstone.$gray-800;
} @else if theme-selector.$theme-name == "Simplex" {
color: Simplex.$white;
background-color: Simplex.$gray-800;
} @else if theme-selector.$theme-name == "Sketchy" {
color: Sketchy.$white;
background-color: Sketchy.$gray-800;
} @else if theme-selector.$theme-name == "Slate" {
color: Slate.$white;
background-color: Slate.$gray-800;
} @else if theme-selector.$theme-name == "Solar" {
color: Solar.$white;
background-color: Solar.$gray-500;
} @else if theme-selector.$theme-name == "Spacelab" {
color: Spacelab.$white;
background-color: Spacelab.$gray-800;
} @else if theme-selector.$theme-name == "Superhero" {
color: Superhero.$white;
background-color: #abb6c2; /* Hardcoded value not present in _variables.scss */
} @else if theme-selector.$theme-name == "United" {
color: United.$white;
background-color: United.$purple;
} @else if theme-selector.$theme-name == "Yeti" {
color: Yeti.$white;
background-color: Yeti.$gray-800;
} @else {
color: #FFFFFF;
background-color: #343a40;
}
@include thead-dark-border-color;
}
@mixin thead-light() {
@if theme-selector.$theme-name == "Cerulean" {
color: Cerulean.$gray-700;
background-color: Cerulean.$gray-200;
} @else if theme-selector.$theme-name == "Cosmo" {
color: Cosmo.$gray-700;
background-color: Cosmo.$gray-200;
} @else if theme-selector.$theme-name == "Cyborg" {
color: Cyborg.$gray-700;
background-color: Cyborg.$gray-200;
} @else if theme-selector.$theme-name == "Darkly" {
color: Darkly.$gray-700;
background-color: Darkly.$gray-200;
} @else if theme-selector.$theme-name == "Flatly" {
color: Flatly.$gray-700;
background-color: Flatly.$gray-200;
} @else if theme-selector.$theme-name == "Journal" {
color: Journal.$gray-700;
background-color: Journal.$gray-200;
} @else if theme-selector.$theme-name == "Litera" {
color: Litera.$gray-700;
background-color: Litera.$gray-200;
} @else if theme-selector.$theme-name == "Lumen" {
color: Lumen.$gray-700;
background-color: Lumen.$gray-200;
} @else if theme-selector.$theme-name == "Lux" {
color: Lux.$gray-700;
background-color: Lux.$gray-200;
} @else if theme-selector.$theme-name == "Materia" {
color: Materia.$gray-700;
background-color: Materia.$gray-200;
} @else if theme-selector.$theme-name == "Minty" {
color: Minty.$gray-700;
background-color: Minty.$gray-200;
} @else if theme-selector.$theme-name == "Pulse" {
color: Pulse.$gray-700;
background-color: Pulse.$gray-200;
} @else if theme-selector.$theme-name == "Sandstone" {
color: Sandstone.$gray-700;
background-color: Sandstone.$gray-200;
} @else if theme-selector.$theme-name == "Simplex" {
color: Simplex.$gray-700;
background-color: Simplex.$gray-200;
} @else if theme-selector.$theme-name == "Sketchy" {
color: Sketchy.$gray-700;
background-color: Sketchy.$gray-200;
} @else if theme-selector.$theme-name == "Slate" {
color: Slate.$gray-700;
background-color: Slate.$gray-200;
} @else if theme-selector.$theme-name == "Solar" {
color: Solar.$gray-700;
background-color: Solar.$gray-200;
} @else if theme-selector.$theme-name == "Spacelab" {
color: Spacelab.$gray-700;
background-color: Spacelab.$gray-200;
} @else if theme-selector.$theme-name == "Superhero" {
color: Superhero.$gray-700;
background-color: #abb6c2; /* Hardcoded value not present in _variables.scss */
} @else if theme-selector.$theme-name == "United" {
color: United.$gray-700;
background-color: United.$gray-200;
} @else if theme-selector.$theme-name == "Yeti" {
color: Yeti.$gray-700;
background-color: Yeti.$gray-200;
} @else {
color: #52575c;
background-color: #e9ecef;
}
@include thead-light-border-color;
}
body {
font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
}
@@ -173,6 +413,12 @@ table {
border-right: 0;
}
}
> thead.thead-dark > tr > th:last-child {
@include thead-dark-border-color;
}
> thead.thead-light > tr > th:last-child {
@include thead-light-border-color;
}
}
&.history-table {
border-left: 0;
@@ -211,6 +457,14 @@ table {
@include table-border-color;
}
.card-default.thead-dark .dataTables_scrollHeadInner {
@include thead-dark;
}
.card-default.thead-light .dataTables_scrollHeadInner {
@include thead-light;
}
.pagination {
margin-top: 6px !important;
justify-content: flex-start;
+3
View File
@@ -117,6 +117,9 @@
// valid options: light, dark, primary, secondary, success, info, warning, danger or leave blank ( "" ) for default colors
"page_header_bgcolor": "",
"page_footer_bgcolor": "",
// table_header_bgcolor: change the background color of all table headers
// valid options: light, dark or leave blank ( "" ) for default colors
"table_header_bgcolor": "",
"networkpnl": 1,
"difficultypnl": 2,
+4 -1
View File
@@ -32,7 +32,10 @@ block content
a.badge.badge-pill.float-right.d-none.d-sm-block(href="/address/"+ address.a_id +"/claim" style="font-size:smaller;padding-bottom:0;")
=" Is this yours? Claim it now for free!"
table.table.table-bordered.table-striped.summary-table.mobile-border-right
thead
- var theadClasses = [];
if settings.display.table_header_bgcolor != null && settings.display.table_header_bgcolor != ''
- theadClasses.push('thead-' + settings.display.table_header_bgcolor);
thead(class=theadClasses)
tr
if settings.show_sent_received == true
th.d-none.d-sm-table-cell #{settings.locale.total_sent}
+5 -2
View File
@@ -4,6 +4,9 @@ block content
include ./includes/common.pug
- var time = format_unixtime(block.time);
- var block_difficulty = parseFloat(block.difficulty).toFixed(4);
- var theadClasses = [];
if settings.display.table_header_bgcolor != null && settings.display.table_header_bgcolor != ''
- theadClasses.push('thead-' + settings.display.table_header_bgcolor);
.col-xs-12.col-md-12
.card.card-default.border-0.cardSpacer
.card-header(style='padding-left:25px;padding-right:25px;')
@@ -20,7 +23,7 @@ block content
a(href='/api/getblock?hash=' + block.hash, style='margin-left: auto;')
span.fa.fa-info-circle.iquidus
table.table.table-bordered.summary-table
thead
thead(class=theadClasses)
tr
th #{settings.locale.height}
th #{settings.locale.difficulty}
@@ -77,7 +80,7 @@ block content
.card-header
strong #{settings.locale.ex_latest_transactions}
table.table.table-bordered.table-striped.summary-table.mobile-border-right
thead
thead(class=theadClasses)
tr
th.d-none.d-sm-table-cell #{settings.locale.tx_hash}
th #{settings.locale.tx_recipients}
+4 -1
View File
@@ -62,7 +62,10 @@ block content
a(href=settings.labels[address.a_id].url, target='_blank', alt='Visit site', title='Visit site')
span.fa.fa-question-circle(style='margin-left:5px;')
table.table.table-bordered.table-striped.summary-table.mobile-border-right
thead
- var theadClasses = [];
if settings.display.table_header_bgcolor != null && settings.display.table_header_bgcolor != ''
- theadClasses.push('thead-' + settings.display.table_header_bgcolor);
thead(class=theadClasses)
tr
if settings.show_sent_received == true
th.d-none.d-sm-table-cell #{settings.locale.total_sent}
+4 -1
View File
@@ -82,7 +82,10 @@ script.
});
});
table#address-txs.table.table-bordered.table-striped.table-paging.mobile-border-right
thead
- var theadClasses = [];
if settings.display.table_header_bgcolor != null && settings.display.table_header_bgcolor != ''
- theadClasses.push('thead-' + settings.display.table_header_bgcolor);
thead(class=theadClasses)
tr
th #{settings.locale.timestamp}
th.d-none.d-sm-table-cell #{settings.locale.tx_hash}
+5 -2
View File
@@ -67,6 +67,9 @@ script.
]
});
});
- var theadClasses = [];
if settings.display.table_header_bgcolor != null && settings.display.table_header_bgcolor != ''
- theadClasses.push('thead-' + settings.display.table_header_bgcolor);
.card.card-default.border-0
.card-body.border-top-0
:markdown-it
@@ -74,7 +77,7 @@ script.
*Typically you can access the config file through QT-wallet menu, Tools > Open Wallet Configuration File*
table#addnodes-table.table.table-bordered.table-striped.table-paging.mobile-border-right
thead
thead(class=theadClasses)
tr
th AddNode Config Lines
tbody.text-center
@@ -82,7 +85,7 @@ script.
:markdown-it
Alternatively you can try one of these lines in the coin wallet debug window, or add them with *coindaemon*-cli
table#addnodes2-table.table.table-bordered.table-striped.table-paging.mobile-border-right
thead
thead(class=theadClasses)
tr
th OneTry Node Lines
tbody.text-center
+4 -1
View File
@@ -50,7 +50,10 @@ script.
});
.card.card-default.border-0
table#connections-table.table.table-bordered.table-striped.table-paging.mobile-border-right
thead
- var theadClasses = [];
if settings.display.table_header_bgcolor != null && settings.display.table_header_bgcolor != ''
- theadClasses.push('thead-' + settings.display.table_header_bgcolor);
thead(class=theadClasses)
tr
th #{settings.locale.net_address}
th.text-center #{settings.locale.net_protocol}
+4 -1
View File
@@ -1,6 +1,9 @@
.card.card-default.border-0
table.table.table-hover.table-bordered.table-striped.summary-table.right-border-0(style='margin-bottom:0;', cellspacing='0')
thead
- var theadClasses = [];
if settings.display.table_header_bgcolor != null && settings.display.table_header_bgcolor != ''
- theadClasses.push('thead-' + settings.display.table_header_bgcolor);
thead(class=theadClasses)
tr
th.text-center
span.fa.fa-flag-checkered
+4 -1
View File
@@ -1,6 +1,9 @@
.card.card-default.border-0
table.table.table-hover.table-bordered.table-striped.summary-table.right-border-0(style='margin-bottom:0;', cellspacing='0')
thead
- var theadClasses = [];
if settings.display.table_header_bgcolor != null && settings.display.table_header_bgcolor != ''
- theadClasses.push('thead-' + settings.display.table_header_bgcolor);
thead(class=theadClasses)
tr
th.text-center
span.fa.fa-flag-checkered
+4 -1
View File
@@ -75,7 +75,10 @@ block content
.card-header
strong #{settings.locale.ex_latest_transactions}
table#recent-table.table.table-bordered.table-striped.table-paging
thead
- var theadClasses = [];
if settings.display.table_header_bgcolor != null && settings.display.table_header_bgcolor != ''
- theadClasses.push('thead-' + settings.display.table_header_bgcolor);
thead(class=theadClasses)
tr
th.text-center #{settings.locale.ex_block}
th.text-center.d-none.d-sm-table-cell #{settings.locale.tx_hash}
+9 -6
View File
@@ -2,6 +2,9 @@ extends layout
block content
include ./includes/common.pug
- var theadClasses = [];
if settings.display.table_header_bgcolor != null && settings.display.table_header_bgcolor != ''
- theadClasses.push('thead-' + settings.display.table_header_bgcolor);
script.
$(document).ready(function() {
$('.order-table').dataTable({
@@ -95,7 +98,7 @@ block content
if marketdata.data.chartdata == 'null' || marketdata.data.chartdata == '' || marketdata.data.chartdata == '[]'
span.fas.fa-chart-line.float-right.view-chart-disabled.iquidus.market-toggle(style='cursor: pointer;', data-toggle='tooltip', data-placement='bottom', title=settings.locale.mkt_no_chart)
table.table.table-bordered.right-border-0.summary-table
thead
thead(class=theadClasses)
tr
if marketdata.data.summary.high != null
th #{settings.locale.mkt_high}
@@ -156,11 +159,11 @@ block content
div#chart(style='width: 100%; height: 300px;')
.row
.col-md-6.col-xs-12.cardSpacer
.card.card-default.border-0.wrapper-border-0
.card.card-default.border-0.wrapper-border-0(class=theadClasses)
.card-header(style='border-bottom-width:1px;')
strong #{settings.locale.mkt_buy_orders}
table.table.table-striped.table-bordered.order-table
thead
thead(class=theadClasses)
tr
th #{settings.locale.mkt_price}
span.small (#{marketdata.exchange})
@@ -181,11 +184,11 @@ block content
else
=parseFloat(parseFloat(buy.price).toFixed(8) * parseFloat(buy.quantity).toFixed(8)).toFixed(8)
.col-md-6.col-xs-12.cardSpacer
.card.card-default.border-0.wrapper-border-0
.card.card-default.border-0.wrapper-border-0(class=theadClasses)
.card-header(style='border-bottom-width:1px;')
strong #{settings.locale.mkt_sell_orders}
table.table.table-striped.table-bordered.order-table
thead
thead(class=theadClasses)
tr
th #{settings.locale.mkt_price}
span.small (#{marketdata.exchange})
@@ -211,7 +214,7 @@ block content
.card-header
strong #{settings.locale.mkt_trade_history}
table#history-table.table.table-hover.table-bordered.table-striped.table-paging.right-border-0(cellspacing='0')
thead
thead(class=theadClasses)
tr
th #{settings.locale.mkt_price}
span.small (#{marketdata.exchange})
+4 -1
View File
@@ -75,7 +75,10 @@ block content
.card-header
strong="Latest Movement"
table#movement-table.table.table-bordered.table-striped.table-paging.mobile-border-right
thead
- var theadClasses = [];
if settings.display.table_header_bgcolor != null && settings.display.table_header_bgcolor != ''
- theadClasses.push('thead-' + settings.display.table_header_bgcolor);
thead(class=theadClasses)
tr
th.text-center timestamp
th.text-center.d-none.d-sm-table-cell txid
+4 -2
View File
@@ -8,7 +8,10 @@ block content
strong #{settings.locale.heavy_title}
span.small (#{settings.symbol})
table.table.table-bordered.table-striped.summary-table
thead
- var theadClasses = [];
if settings.display.table_header_bgcolor != null && settings.display.table_header_bgcolor != ''
- theadClasses.push('thead-' + settings.display.table_header_bgcolor);
thead(class=theadClasses)
tr
th #{settings.locale.ex_supply}
span.small (#{settings.symbol})
@@ -63,7 +66,6 @@ block content
=heavy.nextin
form
table.table
thead
tbody
tr
th #{settings.locale.heavy_key}
+4 -1
View File
@@ -49,7 +49,10 @@ block content
.card-header
strong #{settings.locale.rl_wealth}
table.table.table-hover.table-bordered.summary-table.right-border-0(style='margin-bottom:0;')
thead
- var theadClasses = [];
if settings.display.table_header_bgcolor != null && settings.display.table_header_bgcolor != ''
- theadClasses.push('thead-' + settings.display.table_header_bgcolor);
thead(class=theadClasses)
tr
th
th Amount
+6 -3
View File
@@ -3,6 +3,9 @@ extends layout
block content
include ./includes/common.pug
- var time = format_unixtime(tx.timestamp);
- var theadClasses = [];
if settings.display.table_header_bgcolor != null && settings.display.table_header_bgcolor != ''
- theadClasses.push('thead-' + settings.display.table_header_bgcolor);
.col-xs-12.col-md-12
.card.card-default.border-0.cardSpacer
.card-header
@@ -10,7 +13,7 @@ block content
a.d-none.d-md-inline(href=`/api/getrawtransaction?txid=${tx.txid}&decrypt=1`)
span.fa.fa-info-circle.iquidus.float-right
table.table.table-bordered.table-striped.summary-table.mobile-border-right
thead
thead(class=theadClasses)
tr
th #{settings.locale.confirmations}
th.d-none.d-sm-table-cell #{settings.locale.tx_block_hash}
@@ -57,7 +60,7 @@ block content
strong #{settings.locale.tx_contributors}
span.fa.fa-arrow-right.float-right.d-xs-none
table.table.table-bordered.table-striped.summary-table.mobile-border-right
thead
thead(class=theadClasses)
tr
th #{settings.locale.tx_address}
if (tx.vin.length > 0)
@@ -90,7 +93,7 @@ block content
.card-header
strong #{settings.locale.tx_recipients}
table.table.table-bordered.table-striped.summary-table.mobile-border-right
thead
thead(class=theadClasses)
tr
th #{settings.locale.tx_address}
th #{settings.locale.mkt_amount}