rtl direction for arabic added

master
Константин 2023-12-30 14:15:03 +03:00
parent 1143770632
commit 92888014a2
4 changed files with 12 additions and 1 deletions

View File

@ -36,6 +36,10 @@ export class PagesService {
this.rootPagesSubject.next(val);
}
get isRtl() {
return ['ar'].indexOf(this.rootPage?.slug) !== -1;
}
get editMode() {
return this.editModeSubject.value;
}

View File

@ -1 +1 @@
<grid></grid>
<grid [class.rtl]="isRtl"></grid>

View File

@ -0,0 +1,3 @@
.rtl {
direction: rtl;
}

View File

@ -18,6 +18,10 @@ export class AppComponent {
});
}
get isRtl() {
return this.pagesService.isRtl;
}
ngOnInit() {
this.pagesService.root({include:'children'}).subscribe(
res => { this.pagesService.rootPages = res }