2 headers
parent
2470ed44a1
commit
c35bc06eaf
|
|
@ -46,3 +46,4 @@ testem.log
|
|||
Thumbs.db
|
||||
|
||||
/src/environments/environment.ts
|
||||
src/vniigaz-v2/vniigaz-v2.env.dev.ts
|
||||
|
|
|
|||
|
|
@ -85,6 +85,10 @@
|
|||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/vniigaz-v2/vniigaz-v2.env.dev.ts"
|
||||
},
|
||||
{
|
||||
"replace": "src/app/_modules/layout/header/header.component.ts",
|
||||
"with": "src/vniigaz-v2/component/layout/header/header.component.ts"
|
||||
}
|
||||
],
|
||||
"stylePreprocessorOptions": {
|
||||
|
|
|
|||
|
|
@ -4,46 +4,12 @@
|
|||
|
||||
</a>
|
||||
<a [routerLink]="'glavnaia'" class="logo" >
|
||||
<img src="assets/images/logo_vniigaz_1163x816.svg">
|
||||
<img src="">
|
||||
LOGO
|
||||
</a>
|
||||
<pages-menu class="top-menu"></pages-menu>
|
||||
<a class="btn vnii" href="https://ais.vniigaz-cert.ru/" target="_blank">АИС СЦ ВНИИГАЗ</a>
|
||||
<a class="btn vnii" href="" target="_blank">!!!!!!!!!!</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- <div class="header">
|
||||
<div class="bottom">
|
||||
<a href="/glavnaia/" class="logo hidemobile"></a>
|
||||
<div class="grid-menu" >
|
||||
<button class="close" (click)="showBottom=false"></button>
|
||||
<pages-menu [items]="menuItems" (onSelected)="itemSelect($event)"></pages-menu>
|
||||
<a class="ais">АИС СЦ ВНИИГАЗ</a>
|
||||
</div>
|
||||
<div class="right" style="position: relative;">
|
||||
<a href="/glavnaia/" class="logo showmobile"></a>
|
||||
<a class="btn hidemobile" href="https://ais.vniigaz-cert.ru/" target="_blank">АИС СЦ ВНИИГАЗ</a>
|
||||
<header-user-bar *ngIf="user" [user]="user"></header-user-bar>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header showmobile" *ngIf="showBottom">
|
||||
<retainer></retainer>
|
||||
<div class="bottom">
|
||||
<div class="grid-menu">
|
||||
<div class="left-block">
|
||||
<button class="close" (click)="showBottom=false"></button>
|
||||
<pages-menu [items]="menuItems" (onSelected)="itemSelect($event)"></pages-menu>
|
||||
<a class="ais" href="https://ais.vniigaz-cert.ru/" target="_blank">АИС СЦ ВНИИГАЗ</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fog" (click)="showBottom=false" [ngClass]="{hidemobile:!showBottom,showmobile:showBottom}"></div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,22 @@
|
|||
import {Injectable} from '@angular/core';
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
import {environment} from '@environments/environment';
|
||||
import {Observable, BehaviorSubject} from "rxjs";
|
||||
|
||||
import { PagesService } from './pages.service';
|
||||
import {environment} from '@environments/environment';
|
||||
|
||||
|
||||
|
||||
@Injectable({providedIn: 'root'})
|
||||
export class MenuService {
|
||||
constructor(
|
||||
private http: HttpClient
|
||||
private http: HttpClient,
|
||||
private pagesService: PagesService
|
||||
){}
|
||||
|
||||
public pagesTree = new BehaviorSubject({data:[]});
|
||||
private currentPage:any;
|
||||
|
||||
|
||||
|
||||
setPagesTree(){
|
||||
|
|
|
|||
|
|
@ -123,10 +123,10 @@
|
|||
--light: #F6F6F6;
|
||||
|
||||
|
||||
--prime: #0070BA;
|
||||
--prime-hov: #005799;
|
||||
--prime-act: #004077;
|
||||
--prime-dis: #A1CAE5;
|
||||
--prime: #00ba82;
|
||||
--prime-hov: #00998c;
|
||||
--prime-act: #007771;
|
||||
--prime-dis: #a1e5ce;
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
<div class="header">
|
||||
<a class="burger" (click)="openMobileMenu()">
|
||||
<ico ico="burger_blue_40dp" [size]="36"></ico>
|
||||
|
||||
</a>
|
||||
<a [routerLink]="'glavnaia'" class="logo" >
|
||||
<img src="assets/images/logo_vniigaz_1163x816.svg">
|
||||
</a>
|
||||
<pages-menu class="top-menu"></pages-menu>
|
||||
<a class="btn vnii" href="https://ais.vniigaz-cert.ru/" target="_blank">АИС СЦ ВНИИГАЗ</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {PagesService} from "@app/_services/pages.service";
|
||||
import {AuthenticationService, ListsService} from "@app/_services";
|
||||
import {Router} from "@angular/router";
|
||||
import {Subscription} from "rxjs";
|
||||
import { MenuService } from '@app/_services/menu.service';
|
||||
|
||||
@Component({
|
||||
selector: 'header',
|
||||
templateUrl: 'header.component.html',
|
||||
styleUrls: ['header.component.scss']
|
||||
})
|
||||
export class HeaderComponent {
|
||||
public menuItems = <any>[];
|
||||
|
||||
public loading: boolean = false;
|
||||
public error: string = '';
|
||||
|
||||
showBottom = false;
|
||||
|
||||
controlsSubscriptionMenu: Subscription;
|
||||
resultSubscriptionMenu: Subscription;
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
private pagesService: PagesService,
|
||||
public authenticationService: AuthenticationService,
|
||||
private listsService: ListsService,
|
||||
private menuService: MenuService
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
let showSettingSite = localStorage.getItem('showSettingSite');
|
||||
if (showSettingSite === null || showSettingSite === 'no') {
|
||||
localStorage.setItem('showSettingSite', 'no');
|
||||
this.listsService.result('showSettingSite').next(false);
|
||||
}
|
||||
this.controlsSubscriptionMenu = this.listsService.controls('headerMenu').subscribe(controls => {
|
||||
});
|
||||
this.resultSubscriptionMenu = this.listsService.result('headerMenu').subscribe(res => {
|
||||
this.menuItems = res?.data || [];
|
||||
});
|
||||
this.menuService.setPagesTree()
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
|
||||
this.controlsSubscriptionMenu?.unsubscribe();
|
||||
this.resultSubscriptionMenu?.unsubscribe();
|
||||
}
|
||||
|
||||
settingsSite() {
|
||||
let showSettingSite = localStorage.getItem('showSettingSite');
|
||||
showSettingSite = showSettingSite === 'yes' ? 'no' : 'yes';
|
||||
localStorage.setItem('showSettingSite', showSettingSite);
|
||||
this.listsService.result('showSettingSite').next(showSettingSite==='yes');
|
||||
}
|
||||
|
||||
login() {
|
||||
this.authenticationService.popup('login');
|
||||
}
|
||||
|
||||
itemSelect(event:any){
|
||||
// if(!event.children?.data.length)
|
||||
this.showBottom = false;
|
||||
}
|
||||
|
||||
openMobileMenu(){
|
||||
this.router.navigate([{outlets: {slider: 'pages-menu'}}], {skipLocationChange: true}).then();
|
||||
}
|
||||
}
|
||||
|
|
@ -4,9 +4,10 @@
|
|||
|
||||
export const environment = {
|
||||
production: false,
|
||||
apiUrl: 'http://api.vniigazv2.lc',
|
||||
clientId: 4,
|
||||
clientSecret: 'QC09jOPEU7mpfFerpLyAJRshFUW1T28GfhsYzJHc',
|
||||
apiUrl: 'http://api.nircms.lc',
|
||||
clientId: 2,
|
||||
clientSecret: 'm2xpjoyMM2sSAO20BpcFyPaAs4h50J4tz6so3qM2',
|
||||
project: 'vniigaz-v2'
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue