From e0adc505dbe4acbaad56db634ed5c8e07a1bff03 Mon Sep 17 00:00:00 2001 From: TechMiX Date: Wed, 9 Dec 2020 01:57:18 +0100 Subject: [PATCH] add rtl-layout class to base component --- .../components/address/address.component.html | 2 +- .../src/app/components/app/app.component.ts | 2 + .../latest-blocks.component.html | 2 +- .../transactions-list.component.html | 24 ++++++------ frontend/src/styles.scss | 37 +++++++++++++++++++ 5 files changed, 53 insertions(+), 14 deletions(-) diff --git a/frontend/src/app/components/address/address.component.html b/frontend/src/app/components/address/address.component.html index 35a02bf38..41728c083 100644 --- a/frontend/src/app/components/address/address.component.html +++ b/frontend/src/app/components/address/address.component.html @@ -1,5 +1,5 @@
-

Address

+

Address

{{ addressString | shortenString : 24 }} {{ addressString }} diff --git a/frontend/src/app/components/app/app.component.ts b/frontend/src/app/components/app/app.component.ts index 59f4fed32..86f244d47 100644 --- a/frontend/src/app/components/app/app.component.ts +++ b/frontend/src/app/components/app/app.component.ts @@ -19,10 +19,12 @@ export class AppComponent implements OnInit { ) { if (this.locale.startsWith('ar') || this.locale.startsWith('fa')) { this.dir = 'rtl'; + this.class = 'rtl-layout'; } } @HostBinding('attr.dir') dir = 'ltr'; + @HostBinding('class') class; @HostListener('document:keydown', ['$event']) handleKeyboardEvents(event: KeyboardEvent) { diff --git a/frontend/src/app/components/latest-blocks/latest-blocks.component.html b/frontend/src/app/components/latest-blocks/latest-blocks.component.html index 46e043107..5c8853158 100644 --- a/frontend/src/app/components/latest-blocks/latest-blocks.component.html +++ b/frontend/src/app/components/latest-blocks/latest-blocks.component.html @@ -1,5 +1,5 @@
-

Blocks

+

Blocks


diff --git a/frontend/src/app/components/transactions-list/transactions-list.component.html b/frontend/src/app/components/transactions-list/transactions-list.component.html index a3af65da1..5ea8bd9b2 100644 --- a/frontend/src/app/components/transactions-list/transactions-list.component.html +++ b/frontend/src/app/components/transactions-list/transactions-list.component.html @@ -1,6 +1,6 @@
- + {{ tx.txid | shortenString : 16 }} {{ tx.txid }} @@ -69,32 +69,32 @@ ScriptSig (ASM) - + ScriptSig (HEX) - {{ vin.scriptsig }} + {{ vin.scriptsig }} Witness - {{ vin.witness.join(' ') }} + {{ vin.witness.join(' ') }} P2SH redeem script - + P2WSH witness script - + nSequence - {{ formatHex(vin.sequence) }} + {{ formatHex(vin.sequence) }} Previous output script - {{ vin.prevout.scriptpubkey_type ? ('(' + vin.prevout.scriptpubkey_type + ')') : '' }}" + {{ vin.prevout.scriptpubkey_type ? ('(' + vin.prevout.scriptpubkey_type + ')') : '' }}" @@ -164,19 +164,19 @@ Type - {{ vout.scriptpubkey_type.toUpperCase() }} + {{ vout.scriptpubkey_type.toUpperCase() }} ScriptPubKey (ASM) - + ScriptPubKey (HEX) - {{ vout.scriptpubkey }} + {{ vout.scriptpubkey }} OP_RETURN data - {{ vout.scriptpubkey_asm | hex2ascii }} + {{ vout.scriptpubkey_asm | hex2ascii }} diff --git a/frontend/src/styles.scss b/frontend/src/styles.scss index f1a0ab361..43a3ddc47 100644 --- a/frontend/src/styles.scss +++ b/frontend/src/styles.scss @@ -450,3 +450,40 @@ th { .crypto { color: #fa3d3d } .locktime { color: #ff8c00 } .reserved { color: #ff8c00 } + +.rtl-layout { + .arrow { + @extend .arrow; + -webkit-transform: scaleX(-1); + transform: scaleX(-1); + } + + .table td { + text-align: right; + } + + .table th { + text-align: right; + } + + .title-block { + text-align: right; + } + + .mr-3 { + @extend .ml-3; + margin-right: 0 !important; + } + + .mr-1 { + @extend .ml-1; + } + + .float-left { + float: right !important; + } + + .float-right { + float: left !important; + } +}