diff --git a/frontend/.gitignore b/frontend/.gitignore index 9c4b5d5e8..8159e7c7b 100644 --- a/frontend/.gitignore +++ b/frontend/.gitignore @@ -54,7 +54,8 @@ src/resources/assets-testnet.json src/resources/assets-testnet.minimal.json src/resources/pools.json src/resources/mining-pools/* -src/resources/*.mp4 +src/resources/**/*.mp4 +src/resources/**/*.vtt # environment config mempool-frontend-config.json diff --git a/frontend/src/app/components/about/about.component.html b/frontend/src/app/components/about/about.component.html index 8823f4aa8..ad2fd7bf7 100644 --- a/frontend/src/app/components/about/about.component.html +++ b/frontend/src/app/components/about/about.component.html @@ -13,7 +13,23 @@

Our mempool and blockchain explorer for the Bitcoin community, focusing on the transaction fee market and multi-layer ecosystem, completely self-hosted without any trusted third-parties.

- +

Enterprise Sponsors 🚀

diff --git a/frontend/src/app/components/about/about.component.ts b/frontend/src/app/components/about/about.component.ts index 0f71645d6..2bc42bde9 100644 --- a/frontend/src/app/components/about/about.component.ts +++ b/frontend/src/app/components/about/about.component.ts @@ -68,7 +68,7 @@ export class AboutComponent implements OnInit { tap(() => this.goToAnchor()) ); } - + ngAfterViewInit() { this.goToAnchor(); } @@ -90,4 +90,8 @@ export class AboutComponent implements OnInit { this.showNavigateToSponsor = true; } } + + showSubtitles(language) { + return ( this.locale.startsWith( language ) && !this.locale.startsWith('en') ); + } } diff --git a/frontend/src/resources/mempool-promo.jpg b/frontend/src/resources/promo-video/mempool-promo.jpg similarity index 100% rename from frontend/src/resources/mempool-promo.jpg rename to frontend/src/resources/promo-video/mempool-promo.jpg diff --git a/frontend/sync-assets.js b/frontend/sync-assets.js index a39d913c8..953811fae 100644 --- a/frontend/sync-assets.js +++ b/frontend/sync-assets.js @@ -81,8 +81,10 @@ if (configContent.BASE_MODULE && configContent.BASE_MODULE === 'liquid') { const testnetAssetsJsonUrl = 'https://raw.githubusercontent.com/Blockstream/asset_registry_testnet_db/master/index.json'; const testnetAssetsMinimalJsonUrl = 'https://raw.githubusercontent.com/Blockstream/asset_registry_testnet_db/master/index.minimal.json'; -const promoVideo = PATH + 'mempool-promo.mp4'; +const promoPrefix = PATH + 'promo-video/'; +const promoVideoFile = promoPrefix + 'mempool-promo.mp4'; const promoVideoUrl = 'https://raw.githubusercontent.com/mempool/mempool-promo/master/promo.mp4'; +const promoVideoLanguages = ['en','sv','ja','zh','cs','fi','fr','de','it','lt','nb','fa','pl','ro','pt']; console.log('Downloading assets'); download(PATH + 'assets.json', assetsJsonUrl); @@ -92,9 +94,13 @@ console.log('Downloading testnet assets'); download(PATH + 'assets-testnet.json', testnetAssetsJsonUrl); console.log('Downloading testnet assets minimal'); download(PATH + 'assets-testnet.minimal.json', testnetAssetsMinimalJsonUrl); -if (!fs.existsSync(promoVideo)) { +if (!fs.existsSync(promoVideoFile)) { console.log('Downloading promo video'); - download(promoVideo, promoVideoUrl); + download(promoVideoFile, promoVideoUrl); +} +console.log('Downloading promo video subtitles'); +for( const l of promoVideoLanguages ) { + download(promoPrefix + l + ".vtt", "https://raw.githubusercontent.com/mempool/mempool-promo/master/subtitles/" + l + ".vtt"); } console.log('Downloading mining pool logos'); downloadMiningPoolLogos();