styling tk023

master
Boris Voropaev 2024-02-07 11:34:22 +03:00
parent 359f1682c6
commit 947227c6b7
7 changed files with 31 additions and 16 deletions

View File

@ -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>

View File

@ -1,4 +1,4 @@
<div class="switch-host" (click)="toggleEditMode()">
<div class="switch-host" (click)="toggleEditMode()" *ngIf="editable">
Режим редактирования
<switch [val]="editMode"></switch>
</div>
</div>

View File

@ -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);
}
}

View File

@ -38,7 +38,7 @@
margin-top: 50px;
}
right-content{
flex-basis: 272px;
};
}

View File

@ -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;

View File

@ -171,7 +171,7 @@ registry-entry {
display: inline-flex;
gap: 24px;
}
.toggle {
.toggle, drop-down {
margin-left: auto;
button {

View File

@ -196,6 +196,9 @@ cards-section-items{
.email{
color:var(--prime)
}
.html{
display: none;
}
.details a{
display: inline-flex;
align-items: center;