Browse Source
env var to show/hide tools subheader nav (default: show)
fix-133-memory-crash
Dan Janosik
6 years ago
No known key found for this signature in database
GPG Key ID: C6F8CE9FFDB2CED2
3 changed files with
17 additions and
16 deletions
-
.env-sample
-
app/config.js
-
views/layout.pug
|
|
@ -62,4 +62,7 @@ |
|
|
|
#BTCEXP_IPSTACK_APIKEY=000000fffffaaaaa |
|
|
|
|
|
|
|
# Optional value for "max_old_space_size", default: 1024 |
|
|
|
#BTCEXP_OLD_SPACE_MAX_SIZE=2048 |
|
|
|
#BTCEXP_OLD_SPACE_MAX_SIZE=2048 |
|
|
|
|
|
|
|
# Show tools list in a sub-nav at top of screen (default: true) |
|
|
|
BTCEXP_UI_SHOW_TOOLS_SUBHEADER=true |
|
|
@ -39,7 +39,7 @@ for (var i = 0; i < electrumXServerUriStrings.length; i++) { |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
["BTCEXP_NO_RATES"].forEach(function(item) { |
|
|
|
["BTCEXP_NO_RATES", "BTCEXP_UI_SHOW_TOOLS_SUBHEADER"].forEach(function(item) { |
|
|
|
if (process.env[item] === undefined) { |
|
|
|
process.env[item] = "true"; |
|
|
|
} |
|
|
@ -137,6 +137,7 @@ module.exports = { |
|
|
|
txOutputMaxDefaultDisplay:10 |
|
|
|
}, |
|
|
|
header:{ |
|
|
|
showToolsSubheader:(process.env.BTCEXP_UI_SHOW_TOOLS_SUBHEADER == "true"), |
|
|
|
dropdowns:[ |
|
|
|
{ |
|
|
|
title:"Related Sites", |
|
|
|
|
|
@ -100,29 +100,26 @@ html(lang="en") |
|
|
|
i(class="fas fa-check") |
|
|
|
span Dark |
|
|
|
|
|
|
|
if (host && port && !homepage) |
|
|
|
div(id="sub-menu", class="container mb-3 d-lg-block d-none", style="margin-top: -1.0rem;") |
|
|
|
if (host && port && !homepage && config.site.header.showToolsSubheader) |
|
|
|
div(id="sub-menu", class="container mb-2 pt-2 d-lg-block d-none border-top", style="") |
|
|
|
ul(class="nav") |
|
|
|
each item, index in config.siteTools |
|
|
|
li(class="nav-item") |
|
|
|
a(href=item.url, class="nav-link") |
|
|
|
span #{item.name} |
|
|
|
|
|
|
|
|
|
|
|
hr |
|
|
|
|
|
|
|
|
|
|
|
div(class="pb-4 pt-3 pt-md-4", style="background-color: #0c0c0c;") |
|
|
|
div(class="container px-2 px-sm-3") |
|
|
|
if (userMessage) |
|
|
|
div(class="alert", class=(userMessageType ? ("alert-" + userMessageType) : "alert-warning"), role="alert") |
|
|
|
span !{userMessage} |
|
|
|
|
|
|
|
block content |
|
|
|
if (userMessage) |
|
|
|
div(class="alert", class=(userMessageType ? ("alert-" + userMessageType) : "alert-warning"), role="alert") |
|
|
|
span !{userMessage} |
|
|
|
|
|
|
|
block content |
|
|
|
|
|
|
|
div(style="margin-bottom: 30px;") |
|
|
|
div(style="margin-bottom: 30px;") |
|
|
|
|
|
|
|
if (config.demoSite) |
|
|
|
include ./includes/donation-modal.pug |
|
|
|
if (config.demoSite) |
|
|
|
include ./includes/donation-modal.pug |
|
|
|
|
|
|
|
footer(class="footer border-top border-primary bg-dark pt-3 pb-1 px-3 text-white", style="border-width: 5px !important;") |
|
|
|
div(class="container") |
|
|
|