diff --git a/frontend/custom-sv-config.json b/frontend/custom-sv-config.json index be10cbb48..c06c3a514 100644 --- a/frontend/custom-sv-config.json +++ b/frontend/custom-sv-config.json @@ -4,6 +4,7 @@ "branding": { "name": "onbtc", "title": "Oficina Nacional del Bitcoin", + "header_img": "/resources/onbtc.svg", "img": "/resources/elsalvador.svg", "rounded_corner": true }, diff --git a/frontend/src/app/components/master-page-preview/master-page-preview.component.html b/frontend/src/app/components/master-page-preview/master-page-preview.component.html index 4c436607b..36e8eed10 100644 --- a/frontend/src/app/components/master-page-preview/master-page-preview.component.html +++ b/frontend/src/app/components/master-page-preview/master-page-preview.component.html @@ -2,8 +2,15 @@
- - + @if (enterpriseInfo?.img) { + + } + @if (enterpriseInfo?.header_img) { + enterpriseInfo.title + } @else { + + + }
diff --git a/frontend/src/app/components/master-page-preview/master-page-preview.component.scss b/frontend/src/app/components/master-page-preview/master-page-preview.component.scss index 486922dfa..fb0fd5c24 100644 --- a/frontend/src/app/components/master-page-preview/master-page-preview.component.scss +++ b/frontend/src/app/components/master-page-preview/master-page-preview.component.scss @@ -18,7 +18,7 @@ flex-direction: row; justify-content: space-between; align-items: center; - background: var(--active-bg); + background: var(--stat-box-bg); text-align: start; font-size: 1.8em; } @@ -77,3 +77,15 @@ flex-shrink: 1; } } + +.subdomain_logo { + height: 35px; + overflow: clip; + max-width: 140px; + margin: auto; + align-self: center; + margin-right: 1em; + .rounded { + border-radius: 5px; + } +} diff --git a/frontend/src/app/components/master-page-preview/master-page-preview.component.ts b/frontend/src/app/components/master-page-preview/master-page-preview.component.ts index 03a6a1ebb..64bdcfda2 100644 --- a/frontend/src/app/components/master-page-preview/master-page-preview.component.ts +++ b/frontend/src/app/components/master-page-preview/master-page-preview.component.ts @@ -1,7 +1,8 @@ import { Component, OnInit } from '@angular/core'; import { StateService } from '../../services/state.service'; -import { Observable, merge, of } from 'rxjs'; +import { Observable, Subscription, merge, of } from 'rxjs'; import { LanguageService } from '../../services/language.service'; +import { EnterpriseService } from '../../services/enterprise.service'; @Component({ selector: 'app-master-page-preview', @@ -13,15 +14,23 @@ export class MasterPagePreviewComponent implements OnInit { lightning$: Observable; officialMempoolSpace = this.stateService.env.OFFICIAL_MEMPOOL_SPACE; urlLanguage: string; + subdomain = ''; + enterpriseInfo: any; + enterpriseInfo$: Subscription; constructor( public stateService: StateService, private languageService: LanguageService, + private enterpriseService: EnterpriseService, ) { } ngOnInit() { this.network$ = merge(of(''), this.stateService.networkChanged$); this.lightning$ = this.stateService.lightningChanged$; this.urlLanguage = this.languageService.getLanguageForUrl(); + this.subdomain = this.enterpriseService.getSubdomain(); + this.enterpriseInfo$ = this.enterpriseService.info$.subscribe(info => { + this.enterpriseInfo = info; + }); } } diff --git a/frontend/src/app/components/master-page/master-page.component.html b/frontend/src/app/components/master-page/master-page.component.html index 4a92fcdf1..5da892f4a 100644 --- a/frontend/src/app/components/master-page/master-page.component.html +++ b/frontend/src/app/components/master-page/master-page.component.html @@ -24,8 +24,12 @@
- - + @if (enterpriseInfo?.header_img) { + enterpriseInfo.title + } @else { + + + }
Offline
Reconnecting...
@@ -41,9 +45,13 @@
- - -
+ @if (enterpriseInfo?.header_img) { + enterpriseInfo.title + } @else { + + + } +
Offline
Reconnecting...
diff --git a/frontend/src/app/services/enterprise.service.ts b/frontend/src/app/services/enterprise.service.ts index 1201c0c75..5de57b059 100644 --- a/frontend/src/app/services/enterprise.service.ts +++ b/frontend/src/app/services/enterprise.service.ts @@ -50,7 +50,7 @@ export class EnterpriseService { if (this.stateService.env.customize?.branding) { const info = this.stateService.env.customize?.branding; this.insertMatomo(info.site_id); - this.seoService.setEnterpriseTitle(info.title); + this.seoService.setEnterpriseTitle(info.title, true); this.info$.next(info); } else { this.apiService.getEnterpriseInfo$(this.subdomain).subscribe((info) => { diff --git a/frontend/src/app/services/seo.service.ts b/frontend/src/app/services/seo.service.ts index 45d62ebdd..008cdc9bc 100644 --- a/frontend/src/app/services/seo.service.ts +++ b/frontend/src/app/services/seo.service.ts @@ -50,8 +50,12 @@ export class SeoService { this.metaService.updateTag({ property: 'og:meta:ready', content: 'ready'}); } - setEnterpriseTitle(title: string) { - this.baseTitle = title + ' - ' + this.baseTitle; + setEnterpriseTitle(title: string, override: boolean = false) { + if (override) { + this.baseTitle = title; + } else { + this.baseTitle = title + ' - ' + this.baseTitle; + } this.resetTitle(); } diff --git a/frontend/src/index.sv.html b/frontend/src/index.sv.html new file mode 100644 index 000000000..a18c1d7fe --- /dev/null +++ b/frontend/src/index.sv.html @@ -0,0 +1,45 @@ + + + + + + Oficina Nacional del Bitcoin - Bitcoin Explorer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/src/resources/elsalvador.svg b/frontend/src/resources/elsalvador.svg index 5b19fd4ca..eb2aff426 100644 --- a/frontend/src/resources/elsalvador.svg +++ b/frontend/src/resources/elsalvador.svg @@ -7,8 +7,31 @@ viewBox="0 0 42.26523 42.986894" version="1.1" id="svg5" + sodipodi:docname="elsalvador.svg" + inkscape:version="1.2.2 (b0a84865, 2022-12-01)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"> + + id="g3806" + transform="matrix(0.37791618,0,0,-0.37791618,-5.0249309,210.96711)"> + id="g3808" /> + + clip-path="url(#clipPath3812)" + id="g3816"> + id="g3814" /> + + + + + + + + + + + + + + + + + + + + + + + + + - - - + id="g2074" + transform="translate(18.386601,4.7781031)"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id="g2134" + transform="translate(557.77874,477.14262)"> + + + id="g2138" + transform="translate(552.56684,475.30632)"> + + + id="g2142" + transform="translate(554.37634,473.08562)"> + + + id="g2146" + transform="translate(558.57904,480.10502)"> + + + id="g2150" + transform="translate(560.83454,478.51042)"> + + + id="g2154" + transform="translate(561.66084,486.03542)"> + + + id="g2158" + transform="translate(562.73544,493.11692)"> + + + id="g2162" + transform="translate(564.69684,498.86592)"> + + + id="g2166" + transform="translate(562.19804,498.22312)"> + + + id="g2170" + transform="translate(560.09794,503.95202)"> + + + id="g2174" + transform="translate(561.61494,505.08682)"> + + + id="g2178" + transform="translate(565.14284,492.70272)"> + + + id="g2182" + transform="translate(531.56064,475.30632)"> + + + id="g2186" + transform="translate(530.07274,472.76352)"> + + + id="g2190" + transform="translate(525.54854,480.10502)"> + + + id="g2194" + transform="translate(522.94024,478.15742)"> + + + id="g2198" + transform="translate(522.46674,486.74002)"> + + + id="g2202" + transform="translate(520.62454,485.74492)"> + + + id="g2206" + transform="translate(521.39214,492.41162)"> + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + id="g2210" + transform="translate(519.43064,498.86592)"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/src/resources/onbtc.svg b/frontend/src/resources/onbtc.svg new file mode 100644 index 000000000..02df69489 --- /dev/null +++ b/frontend/src/resources/onbtc.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/src/resources/sv/favicons/android-chrome-192x192.png b/frontend/src/resources/sv/favicons/android-chrome-192x192.png new file mode 100644 index 000000000..3dd14daf6 Binary files /dev/null and b/frontend/src/resources/sv/favicons/android-chrome-192x192.png differ diff --git a/frontend/src/resources/sv/favicons/android-chrome-512x512.png b/frontend/src/resources/sv/favicons/android-chrome-512x512.png new file mode 100644 index 000000000..980533e3a Binary files /dev/null and b/frontend/src/resources/sv/favicons/android-chrome-512x512.png differ diff --git a/frontend/src/resources/sv/favicons/apple-touch-icon.png b/frontend/src/resources/sv/favicons/apple-touch-icon.png new file mode 100644 index 000000000..61284d78d Binary files /dev/null and b/frontend/src/resources/sv/favicons/apple-touch-icon.png differ diff --git a/frontend/src/resources/sv/favicons/favicon-16x16.png b/frontend/src/resources/sv/favicons/favicon-16x16.png new file mode 100644 index 000000000..f9d32e828 Binary files /dev/null and b/frontend/src/resources/sv/favicons/favicon-16x16.png differ diff --git a/frontend/src/resources/sv/favicons/favicon-32x32.png b/frontend/src/resources/sv/favicons/favicon-32x32.png new file mode 100644 index 000000000..cf0c7841c Binary files /dev/null and b/frontend/src/resources/sv/favicons/favicon-32x32.png differ diff --git a/frontend/src/resources/sv/favicons/favicon.ico b/frontend/src/resources/sv/favicons/favicon.ico new file mode 100644 index 000000000..7ba6a2596 Binary files /dev/null and b/frontend/src/resources/sv/favicons/favicon.ico differ diff --git a/frontend/src/resources/sv/favicons/site.webmanifest b/frontend/src/resources/sv/favicons/site.webmanifest new file mode 100644 index 000000000..45dc8a206 --- /dev/null +++ b/frontend/src/resources/sv/favicons/site.webmanifest @@ -0,0 +1 @@ +{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} \ No newline at end of file diff --git a/frontend/src/resources/sv/onbtc-preview.jpg b/frontend/src/resources/sv/onbtc-preview.jpg new file mode 100644 index 000000000..1ae838e12 Binary files /dev/null and b/frontend/src/resources/sv/onbtc-preview.jpg differ diff --git a/production/mempool-build-all b/production/mempool-build-all index d6ffcf8b2..63dadaac0 100755 --- a/production/mempool-build-all +++ b/production/mempool-build-all @@ -129,8 +129,8 @@ export NVM_DIR="${HOME}/.nvm" source "${NVM_DIR}/nvm.sh" # what to look for -frontends=(mainnet liquid) -backends=(mainnet testnet signet liquid liquidtestnet) +frontends=(mainnet liquid onbtc) +backends=(mainnet testnet signet liquid liquidtestnet onbtc) frontend_repos=() backend_repos=() @@ -151,7 +151,7 @@ for repo in $backend_repos;do done # build unfurlers -for repo in mainnet liquid;do +for repo in $frontend_repos;do build_unfurler "${repo}" done @@ -166,7 +166,7 @@ for repo in $frontend_repos;do done # ship frontend dist folders to public_html -for target in mainnet liquid;do +for target in $frontend_repos;do ship_frontend "${target}" done diff --git a/production/mempool-frontend-config.bisq.json b/production/mempool-frontend-config.onbtc.json similarity index 68% rename from production/mempool-frontend-config.bisq.json rename to production/mempool-frontend-config.onbtc.json index 3ddb807f9..63cca1a87 100644 --- a/production/mempool-frontend-config.bisq.json +++ b/production/mempool-frontend-config.onbtc.json @@ -1,5 +1,4 @@ { - "BASE_MODULE": "bisq", "OFFICIAL_MEMPOOL_SPACE": true, "TESTNET_ENABLED": true, "LIQUID_ENABLED": true, @@ -10,5 +9,10 @@ "MEMPOOL_WEBSITE_URL": "https://mempool.space", "LIQUID_WEBSITE_URL": "https://liquid.network", "BISQ_WEBSITE_URL": "https://bisq.markets", - "ITEMS_PER_PAGE": 25 + "ITEMS_PER_PAGE": 25, + "LIGHTNING": true, + "ACCELERATOR": true, + "PUBLIC_ACCELERATIONS": true, + "AUDIT": true, + "CUSTOMIZATION": "custom-sv-config.json" } diff --git a/production/mempool-start-all b/production/mempool-start-all index f9c1d86c9..ff962f95e 100755 --- a/production/mempool-start-all +++ b/production/mempool-start-all @@ -15,7 +15,7 @@ screen -dmS x startx sleep 3 # start unfurlers for each frontend -for site in mainnet liquid ;do +for site in mainnet liquid onbtc;do cd "$HOME/${site}/unfurler" && \ echo "starting mempool unfurler: ${site}" && \ screen -dmS "unfurler-${site}" sh -c 'while true;do npm run unfurler;sleep 2;done' diff --git a/production/unfurler-config.bisq.json b/production/unfurler-config.onbtc.json similarity index 66% rename from production/unfurler-config.bisq.json rename to production/unfurler-config.onbtc.json index 9742743f0..c77cad838 100644 --- a/production/unfurler-config.bisq.json +++ b/production/unfurler-config.onbtc.json @@ -1,12 +1,12 @@ { "SERVER": { - "HOST": "https://bisq.fra.mempool.space", - "HTTP_PORT": 8002 + "HOST": "https://onbtc.tk7.mempool.space", + "HTTP_PORT": 8003 }, "MEMPOOL": { "HTTP_HOST": "http://127.0.0.1", - "HTTP_PORT": 82, - "NETWORK": "bisq" + "HTTP_PORT": 83, + "NETWORK": "onbtc" }, "PUPPETEER": { "CLUSTER_SIZE": 8, diff --git a/unfurler/src/index.ts b/unfurler/src/index.ts index 828d50e6b..5db38324e 100644 --- a/unfurler/src/index.ts +++ b/unfurler/src/index.ts @@ -50,6 +50,9 @@ class Server { case "bisq": canonical = "https://bisq.markets" break; + case "onbtc": + canonical = "https://bitcoin.gob.sv" + break; default: canonical = "https://mempool.space" } diff --git a/unfurler/src/routes.ts b/unfurler/src/routes.ts index 80dd54f24..ba8c26f0c 100644 --- a/unfurler/src/routes.ts +++ b/unfurler/src/routes.ts @@ -252,6 +252,24 @@ const networks = { bisq: { fallbackImg: '/resources/bisq/bisq-markets-preview.png', routes: {} // no routes supported + }, + onbtc: { + fallbackImg: '/resources/onbtc/onbtc-preview.png', + routes: { // only dynamic routes supported + block: routes.block, + address: routes.address, + tx: routes.tx, + mining: { + title: "Mining", + routes: { + pool: routes.mining.routes.pool, + } + }, + lightning: { + title: "Lightning", + routes: routes.lightning.routes, + } + } } };