diff --git a/README.md b/README.md index 25f7b068..d72d68d3 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,26 @@ Join the translation efforts on [Transifex](https://transifex.com/blockstream/es - Mainnet, Testnet and Elements high performance electrum server +## Sugarchain Testing + +To start on local machine, you may do, run: + +```bash +$ git clone https://github.com/sugarchain-project/esplora.git && cd esplora +$ npm install +$ npm run dist sugar-mainnet # (or sugar-testnet) +# change URL in `flavors/sugar-testnet/config.env`: +# export BASE_HREF=${BASE_HREF:-'/esplora-testnet/'} +# change "/esplora/" to "/" for local testing +# if you want to host on github pages: `/esplora-testnet/` for `https://sugarchain-project.github.io/esplora-testnet/` +$ cd dist +$ python3 -m http.server +``` + +*Warning: `BASE_HREF` will be hardcoded. If your URL is changed, you have to change in `config.env`.* + +The server will be available at http://localhost:8000/ + ## Developing To start a development server with live babel/browserify transpilation, run: diff --git a/flavors/sugar-testnet/config.env b/flavors/sugar-testnet/config.env new file mode 100644 index 00000000..5ed4592b --- /dev/null +++ b/flavors/sugar-testnet/config.env @@ -0,0 +1,14 @@ +#!/bin/bash + +export SITE_TITLE='TSugar TExplorer' +export HOME_TITLE='TSugar TExplorer' +export NATIVE_ASSET_LABEL=TSUGAR +export NATIVE_ASSET_NAME='TSugar' + +export MENU_ACTIVE='Sugar Testnet' +export BASE_HREF=${BASE_HREF:-'/esplora-testnet/'} + +export CUSTOM_ASSETS="$CUSTOM_ASSETS flavors/sugar-testnet/www/*" +export CUSTOM_CSS="$CUSTOM_CSS flavors/sugar-testnet/extras.css" + +export API_URL=https://api-testnet.sugarchain.org/esplora/ diff --git a/flavors/sugar-testnet/extras.css b/flavors/sugar-testnet/extras.css new file mode 100644 index 00000000..972ed84d --- /dev/null +++ b/flavors/sugar-testnet/extras.css @@ -0,0 +1,22 @@ + +.jumbotron-fluid { + background-image: linear-gradient(-90deg, rgba(13, 141, 119, 1) 0%, rgba(17, 103, 97, 1) 16%, rgba(25, 68, 74, 1) 35%, rgba(29, 42, 48, 1) 57%, rgba(14, 16, 17, 1) 100%); +} + +.search-bar { + border: 1px solid rgba(168, 184, 201, 1); + box-shadow: 0px 0px 6px 0px rgba(168, 184, 201, 1); +} + +.details-btn > div { + color: rgba(168, 184, 201, 1); + border: 1px solid rgba(168, 184, 201, 1); +} + +.transaction-box > .footer > div:nth-child(3) { + color: rgba(168, 184, 201, 1); +} + +.navbar { + background-image: linear-gradient(-90deg, rgba(13, 141, 119, 1) 0%, rgba(17, 103, 97, 1) 16%, rgba(25, 68, 74, 1) 35%, rgba(29, 42, 48, 1) 57%, rgba(14, 16, 17, 1) 100%); +} diff --git a/flavors/sugar-testnet/www/img/block.png b/flavors/sugar-testnet/www/img/block.png new file mode 100644 index 00000000..34e97f0d Binary files /dev/null and b/flavors/sugar-testnet/www/img/block.png differ diff --git a/flavors/sugar-testnet/www/img/favicon.png b/flavors/sugar-testnet/www/img/favicon.png new file mode 100644 index 00000000..12778689 Binary files /dev/null and b/flavors/sugar-testnet/www/img/favicon.png differ diff --git a/flavors/sugar-testnet/www/img/icons/menu-logo.png b/flavors/sugar-testnet/www/img/icons/menu-logo.png new file mode 100644 index 00000000..12778689 Binary files /dev/null and b/flavors/sugar-testnet/www/img/icons/menu-logo.png differ diff --git a/flavors/sugar-testnet/www/img/icons/minus.png b/flavors/sugar-testnet/www/img/icons/minus.png new file mode 100644 index 00000000..d8c84942 Binary files /dev/null and b/flavors/sugar-testnet/www/img/icons/minus.png differ diff --git a/flavors/sugar-testnet/www/img/icons/plus.png b/flavors/sugar-testnet/www/img/icons/plus.png new file mode 100644 index 00000000..de3d03b9 Binary files /dev/null and b/flavors/sugar-testnet/www/img/icons/plus.png differ diff --git a/flavors/sugar-testnet/www/img/icons/search.png b/flavors/sugar-testnet/www/img/icons/search.png new file mode 100644 index 00000000..6476e512 Binary files /dev/null and b/flavors/sugar-testnet/www/img/icons/search.png differ diff --git a/flavors/sugar-testnet/www/img/transaction.png b/flavors/sugar-testnet/www/img/transaction.png new file mode 100644 index 00000000..f4a6cb09 Binary files /dev/null and b/flavors/sugar-testnet/www/img/transaction.png differ