From f9fd589af2e39fbd8f5c44140a1f2de1401de86b Mon Sep 17 00:00:00 2001 From: Mononaut Date: Sat, 27 Apr 2024 20:39:53 +0000 Subject: [PATCH] Logo overrides, custom index.html --- frontend/custom-sv-config.json | 1 + .../master-page/master-page.component.html | 18 +- .../src/app/services/enterprise.service.ts | 2 +- frontend/src/app/services/seo.service.ts | 8 +- frontend/src/index.sv.html | 45 + frontend/src/resources/elsalvador.svg | 2162 +++++++++-------- frontend/src/resources/onbtc.svg | 32 + 7 files changed, 1181 insertions(+), 1087 deletions(-) create mode 100644 frontend/src/index.sv.html create mode 100644 frontend/src/resources/onbtc.svg 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/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..35aabb188 --- /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..205b47cd8 --- /dev/null +++ b/frontend/src/resources/onbtc.svg @@ -0,0 +1,32 @@ + + + + + + + OFICINA NACIONALDEL BITCOIN + +