Browse Source

minor cleanup / reorg

fix-133-memory-crash v1.0.0
Dan Janosik 6 years ago
parent
commit
8e8d67f334
No known key found for this signature in database GPG Key ID: C6F8CE9FFDB2CED2
  1. 2
      app/auth.js
  2. 21
      app/config.js
  3. 20
      views/layout.pug

2
app/auth.js

@ -6,7 +6,7 @@ module.exports = pass => (req, res, next) => {
if (cred && cred.pass === pass) {
req.authenticated = true;
return next();
}
}
res.set('WWW-Authenticate', `Basic realm="Private Area"`)
.sendStatus(401);

21
app/config.js

@ -114,6 +114,18 @@ module.exports = {
browseBlocksPageSize:20,
addressPage:{
txOutputMaxDefaultDisplay:10
},
header:{
dropdowns:[
{
title:"Related Sites",
links:[
{name: "Bitcoin Explorer", url:"https://btc.chaintools.io", imgUrl:"/img/logo/btc.svg"},
{name: "Litecoin Explorer", url:"https://ltc.chaintools.io", imgUrl:"/img/logo/ltc.svg"},
{name: "Lightning Explorer", url:"https://lightning.chaintools.io", imgUrl:"/img/logo/lightning.svg"},
]
}
]
}
},
@ -148,14 +160,5 @@ module.exports = {
storeId:"DUUExHMvKNAFukrJZHCShMhwZvfPq87QnkUhvE6h5kh2",
notifyEmail:"chaintools.io@gmail.com"
}
},
headerDropdownLinks: {
title:"Related Sites",
links:[
{name: "Bitcoin Explorer", url:"https://btc.chaintools.io", imgUrl:"/img/logo/btc.svg"},
{name: "Litecoin Explorer", url:"https://ltc.chaintools.io", imgUrl:"/img/logo/ltc.svg"},
{name: "Lightning Explorer", url:"https://lightning.chaintools.io", imgUrl:"/img/logo/lightning.svg"},
]
}
};

20
views/layout.pug

@ -53,15 +53,17 @@ html(lang="en")
i(class=item.fontawesome, style="width: 20px; margin-right: 10px;")
span #{item.name}
if (config.headerDropdownLinks)
li(class="nav-item dropdown")
a(class="nav-link dropdown-toggle", href="javascript:void(0)", role="button", data-toggle="dropdown", aria-haspopup="true", aria-expanded="false")
span #{config.headerDropdownLinks.title}
div(class="dropdown-menu", aria-label=(config.headerDropdownLinks.title + " Items"))
each item in config.headerDropdownLinks.links
a(class="dropdown-item", href=item.url)
img(src=item.imgUrl, style="width: 24px; height: 24px; margin-right: 8px;", alt=item.name)
span #{item.name}
if (config.site.header.dropdowns)
each dropdown, ddIndex in config.site.header.dropdowns
li(class="nav-item dropdown")
a(class="nav-link dropdown-toggle", href="javascript:void(0)", role="button", data-toggle="dropdown", aria-haspopup="true", aria-expanded="false")
span #{dropdown.title}
div(class="dropdown-menu", aria-label=(dropdown.title + " Items"))
each dropdownLink in dropdown.links
a(class="dropdown-item", href=dropdownLink.url)
if (dropdownLink.imgUrl)
img(src=dropdownLink.imgUrl, style="width: 24px; height: 24px; margin-right: 8px;", alt=dropdownLink.name)
span #{dropdownLink.name}
form(method="post", action="/search", class="form-inline mr-3")

Loading…
Cancel
Save