styling tk023
parent
359f1682c6
commit
947227c6b7
|
|
@ -5,6 +5,7 @@
|
|||
<div class="subtitle" *ngIf="position">{{position}}</div>
|
||||
<div class="phone" *ngIf="phone">{{phone}}</div>
|
||||
<div class="email" *ngIf="email">{{email}}</div>
|
||||
<div class="html" [innerHtml]="html"></div>
|
||||
<div class="details" *ngIf="textOnly" (click)="showModal=true">
|
||||
<a>{{about}}<ico ico="chevron_right_24"></ico></a>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<div class="switch-host" (click)="toggleEditMode()">
|
||||
<div class="switch-host" (click)="toggleEditMode()" *ngIf="editable">
|
||||
Режим редактирования
|
||||
<switch [val]="editMode"></switch>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
import { Component } from '@angular/core';
|
||||
import { PagesService } from '@app/_services/pages.service';
|
||||
import { AuthenticationService } from '@app/_services';
|
||||
import { Subscription } from 'rxjs';
|
||||
|
||||
@Component({
|
||||
selector: 'right-content',
|
||||
|
|
@ -7,10 +9,27 @@ import { PagesService } from '@app/_services/pages.service';
|
|||
styleUrls: ['./right-content.component.scss']
|
||||
})
|
||||
export class RightContentComponent {
|
||||
|
||||
private subscription:Subscription
|
||||
public currentPage:any;
|
||||
|
||||
constructor(
|
||||
private pagesService: PagesService,
|
||||
public authService: AuthenticationService,
|
||||
){}
|
||||
|
||||
ngOnInit(){
|
||||
this.subscription = this.pagesService.currentPageSubject.subscribe(
|
||||
resp=> {
|
||||
this.currentPage = resp;
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
ngOnDestoy(){
|
||||
this.subscription.unsubscribe();
|
||||
}
|
||||
|
||||
get editMode(){
|
||||
return this.pagesService.editMode;
|
||||
}
|
||||
|
|
@ -18,6 +37,8 @@ export class RightContentComponent {
|
|||
toggleEditMode(){
|
||||
this.pagesService.editMode = !this.pagesService.editMode;
|
||||
}
|
||||
|
||||
get editable(){
|
||||
return this.currentPage&&(this.authService.privileges?.admin|| this.authService.privileges?.editor);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
margin-top: 50px;
|
||||
}
|
||||
right-content{
|
||||
|
||||
flex-basis: 272px;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -205,17 +205,7 @@ cards-section-items{
|
|||
flex-direction: column;
|
||||
gap: 16px;
|
||||
.image{
|
||||
width: 100%;
|
||||
height: 338px;
|
||||
border-radius: 12px;
|
||||
border: 1px solid var(--second-dis);
|
||||
background: url('../images/view-man.svg') var(--white) center / 65% no-repeat;
|
||||
overflow: hidden;
|
||||
img{
|
||||
object-fit: cover;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
display: none;
|
||||
}
|
||||
.title{
|
||||
font-family: PT Sans Narrow;
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ registry-entry {
|
|||
display: inline-flex;
|
||||
gap: 24px;
|
||||
}
|
||||
.toggle {
|
||||
.toggle, drop-down {
|
||||
margin-left: auto;
|
||||
|
||||
button {
|
||||
|
|
|
|||
|
|
@ -196,6 +196,9 @@ cards-section-items{
|
|||
.email{
|
||||
color:var(--prime)
|
||||
}
|
||||
.html{
|
||||
display: none;
|
||||
}
|
||||
.details a{
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
|
|
|
|||
Loading…
Reference in New Issue