diff --git a/client/index.pug b/client/index.pug index 15fa85af..3d42213e 100644 --- a/client/index.pug +++ b/client/index.pug @@ -25,7 +25,6 @@ head meta(name='viewport', content='width=device-width, initial-scale=1') link(rel='shortcut icon', type='image/png', href=staticRoot+'img/favicon.png') - link(rel='stylesheet', href=staticRoot+'bootstrap.min.css') link(rel='stylesheet', href=staticRoot+cssPath) if process.env.CANONICAL_URL diff --git a/client/npm-shrinkwrap.json b/client/npm-shrinkwrap.json index 705f1dbd..e7a0c5ab 100644 --- a/client/npm-shrinkwrap.json +++ b/client/npm-shrinkwrap.json @@ -20,7 +20,6 @@ "@cycle/storage": "^5.1.2", "babelify": "^10.0.0", "basic-l10n": "^2.0.0", - "bootstrap": "^4.4.1", "browserify-package-json": "^1.0.1", "bs58check": "^2.1.2", "bundle-collapser": "^1.4.0", @@ -755,22 +754,6 @@ "resolved": "https://registry.npmjs.org/basic-l10n/-/basic-l10n-2.0.0.tgz", "integrity": "sha512-6JVIFNEj1cmuCZ5dTiDNAsLS4P68ynIPI7sg1q1h4etZU1ETJ2obhSY7OJyFn9KMbuNHMynh0r5r/v1I6w/YKw==" }, - "node_modules/bootstrap": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.4.1.tgz", - "integrity": "sha512-tbx5cHubwE6e2ZG7nqM3g/FZ5PQEDMWmMGNrCUBVRPHXTJaH7CBDdsLeu3eCh3B1tzAxTnAbtmrzvWEvT2NNEA==", - "engines": { - "node": ">=6" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/bootstrap" - }, - "peerDependencies": { - "jquery": "1.9.1 - 3", - "popper.js": "^1.16.0" - } - }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1701,18 +1684,6 @@ "node": ">=4.0.0" } }, - "node_modules/popper.js": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz", - "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==", - "deprecated": "You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1", - "license": "MIT", - "peer": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/popperjs" - } - }, "node_modules/process-nextick-args": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", diff --git a/client/package.json b/client/package.json index ed4186d9..f62a06e1 100644 --- a/client/package.json +++ b/client/package.json @@ -18,7 +18,6 @@ "@cycle/storage": "^5.1.2", "babelify": "^10.0.0", "basic-l10n": "^2.0.0", - "bootstrap": "^4.4.1", "browserify-package-json": "^1.0.1", "bs58check": "^2.1.2", "bundle-collapser": "^1.4.0", diff --git a/client/src/app.js b/client/src/app.js index d3dc0d9d..d602ae7c 100644 --- a/client/src/app.js +++ b/client/src/app.js @@ -26,10 +26,6 @@ import { import l10n, { defaultLang } from './l10n' import * as views from './views' -if (process.browser) { - require('bootstrap/js/dist/collapse') -} - const apiBase = (process.env.API_URL || '/api').replace(/\/+$/, '') , setBase = ({ path, ...r }) => ({ ...r, url: path.includes('://') || path.startsWith('./') ? path : apiBase + path }) @@ -70,7 +66,7 @@ export default function main({ DOM, HTTP, route, storage, scanner: scan$, search , last_txids: parseHashes(loc.query.txids) , est_chain_seen_count: +loc.query.c || 0 })) - , goAssetList$ = !process.env.IS_ELEMENTS ? O.empty() : route('/assets').map(loc => ({ + , goAssetList$ = !process.env.IS_ELEMENTS ? O.empty() : route('/assets').map(loc => ({ start_index: +loc.query.start_index || 0 , sort_field: loc.query.sort_field != null ? loc.query.sort_field : 'name' , sort_dir: loc.query.sort_dir != null ? loc.query.sort_dir : 'asc' @@ -150,7 +146,7 @@ export default function main({ DOM, HTTP, route, storage, scanner: scan$, search , prevBlocks$ = process.browser ? O.empty() : goBlocks$.combineLatest(tipHeight$, (d, tipHeight) => d.start_height != null && d.start_height < tipHeight ? Math.min(tipHeight, d.start_height+blocksPerPage) : null) - + // Single block and associated txs , block$ = reply('block').merge(goBlock$.mapTo(null)) , blockStatus$ = reply('block-stat').merge(goBlock$.mapTo(null)) @@ -200,7 +196,7 @@ export default function main({ DOM, HTTP, route, storage, scanner: scan$, search , mempoolRecent$ = reply('recent') // dashboard - , dashboardState$ = O.combineLatest(blocks$, mempoolRecent$, (blks, txs) => + , dashboardState$ = O.combineLatest(blocks$, mempoolRecent$, (blks, txs) => ({ dashblocks: blks.slice(0, 5), dashTxs: txs.slice(0, 5)})) // Fee estimates diff --git a/client/src/driver/instascan.js b/client/src/driver/instascan.js index bca07b88..e946696e 100644 --- a/client/src/driver/instascan.js +++ b/client/src/driver/instascan.js @@ -15,7 +15,7 @@ if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) { document.body.appendChild(script) } - const Instascan$ = O.fromEvent(document.body, 'load', true).filter(e => e.target.src.endsWith('/instascan.min.js')).map(_ => window.Instascan).share() + const Instascan$ = O.fromEvent(document.body, 'load', true).filter(e => e.target?.src?.endsWith('/instascan.min.js')).map(_ => window.Instascan).share() , Scanner$ = Instascan$.map(Instascan => Instascan.Scanner) , Camera$ = Instascan$.map(Instascan => Instascan.Camera) diff --git a/client/src/views/error.js b/client/src/views/error.js index b252ebcf..be4826d4 100644 --- a/client/src/views/error.js +++ b/client/src/views/error.js @@ -8,9 +8,10 @@ const formatError = err => ? 'Esplora is currently unavailable, please try again later.' : (err.message || err.toString()) -export const error = ({ t, error, ...S }) => layout(
-

{ t(formatError(error)) }

-
+export const error = ({ t, error, ...S }) => layout( +
+

{ t(formatError(error)) }

+
, { t, ...S }) export const notFound = S => error({ ...S, error: 'Page Not Found' }) diff --git a/client/src/views/home.js b/client/src/views/home.js index 6f664c46..e3bdd11a 100644 --- a/client/src/views/home.js +++ b/client/src/views/home.js @@ -6,19 +6,16 @@ import { transactions } from './transactions' const isTouch = process.browser && ('ontouchstart' in window) const homeLayout = (body, { t, activeTab, ...S }) => layout( -
- { body } -
+ body , { t, isTouch, activeTab, ...S }) export const dashBoard = ({ t, blocks, dashboardState, loading, ...S }) => { const { dashblocks, dashTxs } = dashboardState || {} return (homeLayout( -
- { blks( dashblocks, true, false, { t, ...S }) } - {transactions( dashTxs, true, { t } )} - -
+ [ + blks( dashblocks, true, false, { t, ...S }), + transactions( dashTxs, true, { t } ) + ] , { ...S, t, activeTab: 'dashBoard' }) )} diff --git a/client/src/views/layout.js b/client/src/views/layout.js index bca0a18d..067bffe7 100644 --- a/client/src/views/layout.js +++ b/client/src/views/layout.js @@ -5,10 +5,8 @@ import subnav from './sub-navbar' export default (body, opt) =>
-
{ navbar(opt) } {subnav(opt.t, opt.isTouch, opt.activeTab, opt.theme, opt.page)} { body } -
{ footer(opt) }
diff --git a/client/src/views/pushtx.js b/client/src/views/pushtx.js index a302a9ad..a3a09763 100644 --- a/client/src/views/pushtx.js +++ b/client/src/views/pushtx.js @@ -7,7 +7,7 @@ export default ({ t, ...S }) => layout(
- +
diff --git a/client/src/views/sub-navbar.js b/client/src/views/sub-navbar.js index df117b63..99c103d6 100644 --- a/client/src/views/sub-navbar.js +++ b/client/src/views/sub-navbar.js @@ -4,17 +4,15 @@ import menu from './navbar-menu' import networkSelection from './network-selection' export default ( t, isTouch, activeTab, theme, page) => -
-
- { networkSelection({t, theme, page}) } -
- Dashboard - Blocks - Transactions - { process.env.IS_ELEMENTS ? Assets : "" } - Explorer API -
- - { search({ t, autofocus: !isTouch }) } +
+ { networkSelection({t, theme, page}) } +
+ Dashboard + Blocks + Transactions + { process.env.IS_ELEMENTS ? Assets : "" } + Explorer API
+ + { search({ t, autofocus: !isTouch }) }
\ No newline at end of file diff --git a/client/src/views/transactions-all.js b/client/src/views/transactions-all.js index ff1adfbb..900a5e81 100644 --- a/client/src/views/transactions-all.js +++ b/client/src/views/transactions-all.js @@ -11,8 +11,5 @@ const homeLayout = (body, { t, activeTab, ...S }) => layout( , { t, isTouch, activeTab, ...S }) export const recentTxs = ({ mempoolRecent, t, ...S }) => homeLayout( -
- {transactions( mempoolRecent, false, { t, ...S })} -
+ transactions( mempoolRecent, false, { t, ...S }) , { ...S, t, activeTab: 'recentTxs' }) - \ No newline at end of file diff --git a/www/bootstrap.min.css b/www/bootstrap.min.css deleted file mode 120000 index 7c467309..00000000 --- a/www/bootstrap.min.css +++ /dev/null @@ -1 +0,0 @@ -../client/node_modules/bootstrap/dist/css/bootstrap.min.css \ No newline at end of file diff --git a/www/light-theme_style.css b/www/light-theme_style.css index fd4cd11c..4f284dc8 100644 --- a/www/light-theme_style.css +++ b/www/light-theme_style.css @@ -204,7 +204,7 @@ body.theme-light { color: #22242c; } -.theme-light .dash-container .view-more img{ +.theme-light .view-more img{ filter: brightness(0) saturate(100%) invert(40%) sepia(89%) saturate(604%) hue-rotate(159deg) brightness(91%) contrast(96%); } diff --git a/www/style.css b/www/style.css index 0ddcf9bc..d6afba79 100644 --- a/www/style.css +++ b/www/style.css @@ -20,6 +20,8 @@ body { text-align: left; font-family: "Inter", sans-serif; color: #fff; + margin: 0px; + padding: 0px; } body.theme-dark { @@ -30,6 +32,23 @@ body[lang=he] { font-family: "Open Sans Hebrew","Helvetica Neue",Helvetica,Arial,sans-serif; } +input { + font-family: Inter; + outline: none; +} + +div { + box-sizing: border-box; +} + +h1, h2, h3, p { + margin: 0px; +} + +img { + vertical-align: middle; +} + .text-white { color: #FFF; } .text-gray { color: #B5BDC2; } @@ -405,12 +424,6 @@ a, a:link, a:visited, a:hover, a:focus { text-decoration: none; } -.content-wrap { - min-height: calc(100vh - 60px - 24px); - margin-bottom: 24px; - overflow: hidden; -} - .table { color: inherit } @@ -418,11 +431,16 @@ a, a:link, a:visited, a:hover, a:focus { /*New Design CSS Flexbox */ /* Main Navigation */ -.container{ +.form-group { + margin-bottom: 16px; +} + +.explorer-container { width: 100%; - max-width: 1200px !important; - padding-left: 20px !important; - padding-right: 20px !important; + max-width: 1160px; + box-sizing: border-box; + margin-left: auto; + margin-right: auto; } .nav-container{ @@ -570,6 +588,8 @@ a, a:link, a:visited, a:hover, a:focus { color: #fff; border-radius: 5px; border: 0; + cursor: pointer; + line-height: 1.5; } .btn-primary:hover { background: #292e35; @@ -590,6 +610,9 @@ table th { text-transform: uppercase; } +.block-header-title, .transaction-header-title { + margin-bottom: .5rem; +} .block-header-title::before { content: ""; @@ -923,9 +946,9 @@ table th { /* HEADER END */ -body > .container, .navbar > .container, body > .container, .content-wrap > div > .container, footer > .container { +/* body > .container, .navbar > .container, body > .container, .explorer-container > div > .container, footer > .container { max-width: 1000px; -} +} */ .loading-page, .not-found-page { margin-top: 100px; @@ -935,6 +958,31 @@ body > .container, .navbar > .container, body > .container, .content-wrap > div text-align: center; } +.error-text-center { + margin-top: 40px; + display: flex; + justify-content: center; +} + +.error-text-center h1 { + font-family: Inter; + font-weight: 500; + font-size: 40px; +} + +.list-unstyled { + list-style: none; +} + +.text-warning { + color: #ffc107 !important; + text-decoration: none; +} + +.text-danger { + color: #DC3544 !important; +} + /* recent table */ .blocks-table .blocks-table-row { display: table; @@ -983,6 +1031,7 @@ body > .container, .navbar > .container, body > .container, .content-wrap > div .blocks-table-row { color: #FFF !important; + box-sizing: border-box; } @@ -1052,6 +1101,7 @@ body > .container, .navbar > .container, body > .container, .content-wrap > div .transactions-table-row { color: #FFF !important; + box-sizing: border-box; } .highlighted-text { @@ -1232,6 +1282,10 @@ body > .container, .navbar > .container, body > .container, .content-wrap > div font-weight: 600; } +.float-right { + float: right; +} + .details-btn { width: 200px; margin: 20px 30px; @@ -1570,6 +1624,7 @@ body > .container, .navbar > .container, body > .container, .content-wrap > div align-items: center; justify-content: center; padding: 10px; + box-sizing: border-box; } @@ -2799,6 +2854,38 @@ dl.mempool-histogram .bar:before { width: 100%; } +#rawtx { + display: block; + width: 100%; + padding: .375rem .75rem; + box-sizing: border-box; + font-size: 1rem; + font-family: Inter; + line-height: 1.5; + border-radius: .25rem; + border: 1px solid #ced4da; +} + +#rawtx:focus { + outline: 0; + box-shadow: 0 0 0 .2rem rgba(0, 123, 255, .25); +} + +.rawtx-label { + padding-top: calc(.5rem + 1px); + padding-bottom: calc(.5rem + 1px); + font-size: 1.25rem; + line-height: 1.5; + display: block; +} + +.rawtx-label h1 { + font-weight: 500; + margin-bottom: .5rem; + font-size: 2.5rem; + line-height: 1.2; +} + .search { width: 35%; } @@ -2825,6 +2912,14 @@ dl.mempool-histogram .bar:before { padding: 0px; } +.search-bar-input::placeholder { + color: #6c757d; +} + +.qrcode-link img { + vertical-align: middle; +} + .search-bar-submit { align-items: center; background: none; @@ -2888,11 +2983,11 @@ h3.table-title{ margin: 10px 40px 30px; } -.dash-container .tx-container{ - margin-top: 50px; +.tx-container, .block-container { + margin-top: 40px; } -.dash-container .view-more { +.view-more { display: flex; width: 100%; justify-content: center; @@ -2900,7 +2995,7 @@ h3.table-title{ margin-top: 20px; } -.dash-container .view-more img{ +.view-more img{ margin-left: 5px; width: 25px; }