bug fix
parent
36948d401a
commit
2470ed44a1
|
|
@ -2,10 +2,10 @@
|
|||
<drop-down *ngIf="children?.length"
|
||||
ico="chevron_right_24" [visible]="toggle" (toggle)="toggle=$event" [target]="menu" [angle]="[0,90]">
|
||||
</drop-down>
|
||||
<a [routerLink]="item.link">
|
||||
<a (click)="rout(item.link)">
|
||||
{{item.name}}
|
||||
</a>
|
||||
</div>
|
||||
<div #menu class="sub-menu" [ngClass]="itemClass">
|
||||
<pages-menu *ngIf="children?.length" [items]="children" [lavel]="lavel+1"></pages-menu>
|
||||
<pages-menu *ngIf="children?.length" [items]="children" [level]="level+1"></pages-menu>
|
||||
</div>
|
||||
|
|
@ -9,7 +9,7 @@ import {Subscription} from 'rxjs';
|
|||
})
|
||||
export class PagesMenuItemComponent {
|
||||
@Input() item: any;
|
||||
@Input() lavel: number;
|
||||
@Input() level: number;
|
||||
public toggle=false;
|
||||
|
||||
currentURL:string;
|
||||
|
|
@ -33,6 +33,13 @@ export class PagesMenuItemComponent {
|
|||
})
|
||||
}
|
||||
|
||||
rout(link:string){
|
||||
console.log(link)
|
||||
this.router.navigate([{outlets: {slider: null}}]).then(
|
||||
()=>this.router.navigate([link])
|
||||
)
|
||||
}
|
||||
|
||||
get parent(){
|
||||
return this.currentURL.startsWith(this.item.link)
|
||||
}
|
||||
|
|
@ -45,7 +52,7 @@ export class PagesMenuItemComponent {
|
|||
let menuClass = {
|
||||
selected: this.toggle
|
||||
}
|
||||
menuClass['lavel-'+(this.lavel+1)] = true;
|
||||
menuClass['level-'+(this.level+1)] = true;
|
||||
return menuClass
|
||||
}
|
||||
|
||||
|
|
@ -55,7 +62,7 @@ export class PagesMenuItemComponent {
|
|||
parent: this.parent&&!this.current,
|
||||
current: this.current
|
||||
}
|
||||
itemClass['lavel-'+(this.lavel+1)] = true;
|
||||
itemClass['level-'+(this.level+1)] = true;
|
||||
return itemClass
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
<pages-menu-item [item]="item" [lavel]="lavel"
|
||||
<pages-menu-item [item]="item" [level]="level"
|
||||
*ngFor="let item of visibleItems">
|
||||
</pages-menu-item>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { MenuService } from '@app/_services/menu.service';
|
|||
})
|
||||
export class PagesMenuComponent implements OnInit {
|
||||
@Input() items: any[];
|
||||
@Input() lavel = 0;
|
||||
@Input() level = 0;
|
||||
|
||||
|
||||
private currentURL:string;
|
||||
|
|
|
|||
|
|
@ -7,23 +7,12 @@ import {Observable, BehaviorSubject} from "rxjs";
|
|||
@Injectable({providedIn: 'root'})
|
||||
export class PagesService {
|
||||
constructor(private http: HttpClient) {
|
||||
this.pagesTree = new BehaviorSubject({data:[]})
|
||||
this.pageMeta = new BehaviorSubject<any>({title: '', description: '', keywords: ''});
|
||||
this.changedPages()
|
||||
}
|
||||
|
||||
public currentPage = new BehaviorSubject<any>({data:[]});
|
||||
public pagesTree: BehaviorSubject<any>;
|
||||
public editMode = new BehaviorSubject<boolean>(false);
|
||||
public pageMeta: BehaviorSubject<any>;
|
||||
|
||||
changedPages(){
|
||||
let include = ['children.children.children.children.children.children.children'];
|
||||
this.root({include: include.join(',')}).subscribe(res => {
|
||||
this.pagesTree.next(res)
|
||||
});
|
||||
}
|
||||
|
||||
public pageMeta: BehaviorSubject<any>;
|
||||
|
||||
|
||||
root(params?: {}): Observable<any> {
|
||||
|
|
|
|||
|
|
@ -123,10 +123,10 @@
|
|||
--light: #F6F6F6;
|
||||
|
||||
|
||||
--prime: #00ba5d;
|
||||
--prime-hov: #009959;
|
||||
--prime-act: #00771e;
|
||||
--prime-dis: #a1e5c3;
|
||||
--prime: #0070BA;
|
||||
--prime-hov: #005799;
|
||||
--prime-act: #004077;
|
||||
--prime-dis: #A1CAE5;
|
||||
|
||||
|
||||
|
||||
|
|
@ -136,7 +136,7 @@
|
|||
--second-dis: #C0C0C0;
|
||||
|
||||
|
||||
--blue-0: #2ee89b;
|
||||
--blue-0: #2EB2E8;
|
||||
|
||||
|
||||
|
||||
|
|
@ -246,7 +246,7 @@ body {
|
|||
.menu{
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
top: 32px;
|
||||
top: 18px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -255,9 +255,9 @@ body {
|
|||
width: 100%;
|
||||
background-color: var(--white);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
justify-content: flex-end;
|
||||
padding: 0 calc((100vw - 1330px)/2);
|
||||
.edit-field-row{
|
||||
width: 100%;
|
||||
max-width: 1280px;
|
||||
margin: 0 40px;
|
||||
display: flex;
|
||||
|
|
|
|||
|
|
@ -95,13 +95,13 @@ right-content{
|
|||
padding-left: 0;
|
||||
}
|
||||
|
||||
.lavel-1{
|
||||
.level-1{
|
||||
&.item{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.lavel-2{
|
||||
.level-2{
|
||||
&.item{
|
||||
display: none;
|
||||
}
|
||||
|
|
@ -119,7 +119,7 @@ right-content{
|
|||
}
|
||||
}
|
||||
|
||||
.lavel-3 {
|
||||
.level-3 {
|
||||
>a {
|
||||
font-family: PT Sans Narrow;
|
||||
font-size: 24px;
|
||||
|
|
@ -141,7 +141,7 @@ right-content{
|
|||
|
||||
}
|
||||
|
||||
.lavel-4 {
|
||||
.level-4 {
|
||||
a {
|
||||
font-family: PT Sans;
|
||||
font-size: 20px;
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ body {
|
|||
.menu{
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
top: 32px;
|
||||
top: 18px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -255,9 +255,9 @@ body {
|
|||
width: 100%;
|
||||
background-color: var(--white);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
justify-content: flex-end;
|
||||
padding: 0 calc((100vw - 1330px)/2);
|
||||
.edit-field-row{
|
||||
width: 100%;
|
||||
max-width: 1280px;
|
||||
margin: 0 40px;
|
||||
display: flex;
|
||||
|
|
|
|||
|
|
@ -95,13 +95,13 @@ right-content{
|
|||
padding-left: 0;
|
||||
}
|
||||
|
||||
.lavel-1{
|
||||
.level-1{
|
||||
&.item{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.lavel-2{
|
||||
.level-2{
|
||||
&.item{
|
||||
display: none;
|
||||
}
|
||||
|
|
@ -119,7 +119,7 @@ right-content{
|
|||
}
|
||||
}
|
||||
|
||||
.lavel-3 {
|
||||
.level-3 {
|
||||
>a {
|
||||
font-family: PT Sans Narrow;
|
||||
font-size: 24px;
|
||||
|
|
@ -141,7 +141,7 @@ right-content{
|
|||
|
||||
}
|
||||
|
||||
.lavel-4 {
|
||||
.level-4 {
|
||||
a {
|
||||
font-family: PT Sans;
|
||||
font-size: 20px;
|
||||
|
|
|
|||
Loading…
Reference in New Issue