Browse Source

Fix #27

fix-133-memory-crash
Dan Janosik 7 years ago
parent
commit
a88ec817f9
  1. 12
      app.js
  2. 9624
      public/css/bootstrap-dark.css
  3. 19
      views/layout.pug

12
app.js

@ -234,6 +234,18 @@ app.use(function(req, res, next) {
} }
} }
// theme
if (!req.session.uiTheme) {
var cookieValue = req.cookies['user-setting-uiTheme'];
if (cookieValue) {
req.session.uiTheme = cookieValue;
} else {
req.session.uiTheme = "";
}
}
res.locals.currencyFormatType = req.session.currencyFormatType; res.locals.currencyFormatType = req.session.currencyFormatType;

9624
public/css/bootstrap-dark.css

File diff suppressed because it is too large

19
views/layout.pug

@ -4,7 +4,14 @@ html
meta(charset="utf-8") meta(charset="utf-8")
meta(name="viewport", content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0, shrink-to-fit=no") meta(name="viewport", content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0, shrink-to-fit=no")
link(rel="stylesheet", href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css", integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4", crossorigin="anonymous") if (session.uiTheme && session.uiTheme == "dark")
link(rel="stylesheet", href="/css/bootstrap-dark.css")
style.
hr { background-color: #555555; }
else
link(rel="stylesheet", href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css", integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4", crossorigin="anonymous")
link(rel="stylesheet", href="https://netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css") link(rel="stylesheet", href="https://netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css")
link(rel="stylesheet", href="https://fonts.googleapis.com/css?family=Lato|Open+Sans|Cousine|Ubuntu:400,500,700") link(rel="stylesheet", href="https://fonts.googleapis.com/css?family=Lato|Open+Sans|Cousine|Ubuntu:400,500,700")
link(rel="stylesheet", href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css") link(rel="stylesheet", href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css")
@ -58,6 +65,16 @@ html
i(class="fas fa-check") i(class="fas fa-check")
span #{item.name} span #{item.name}
span(class="dropdown-header") Theme
a(class="dropdown-item", href="/changeSetting?name=uiTheme&value=light")
if (uiTheme == "light" || uiTheme == "")
i(class="fas fa-check")
span Light
a(class="dropdown-item", href="/changeSetting?name=uiTheme&value=dark")
if (uiTheme == "dark")
i(class="fas fa-check")
span Dark
form(method="post", action="/search", class="form-inline") form(method="post", action="/search", class="form-inline")
div(class="input-group input-group-sm") div(class="input-group input-group-sm")
input(type="text", class="form-control form-control-sm", name="query", placeholder="block height/hash, txid, address", value=(query), style="width: 300px;") input(type="text", class="form-control form-control-sm", name="query", placeholder="block height/hash, txid, address", value=(query), style="width: 300px;")

Loading…
Cancel
Save