Merge remote-tracking branch 'origin/master'
commit
75ff7b8d1a
|
|
@ -3,28 +3,14 @@
|
|||
<ico ico="burger_blue_40dp" [size]="36"></ico>
|
||||
</a>
|
||||
<a [routerLink]="rootPage?.link" class="logo">
|
||||
<img src="">
|
||||
LOGO
|
||||
<img src="" alt="site logo">
|
||||
</a>
|
||||
|
||||
<div class="locales" style="position: relative;">
|
||||
<div class="locales-btn" (click)="ddMenu=!ddMenu">
|
||||
<img [src]="flag" alt="" width="24px" style="object-fit: contain; border: 1px solid lightgray;">
|
||||
{{rootPage?.slug||'ru'}}
|
||||
<drop-down [target]="langMenu" ico="arrow_drop_down_24" [visible]="ddMenu"></drop-down>
|
||||
</div>
|
||||
|
||||
<div class="dropdown" (click)="close()" #langMenu>
|
||||
<div class="menu">
|
||||
<div class="type" *ngFor="let locale of locales" [routerLink]="locale.link" >
|
||||
<div class="row">{{locale.name}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<pages-menu *ngIf="rootPage" [root]="rootPage" class="top-menu"></pages-menu>
|
||||
<a class="btn vnii" href="" target="_blank">!!!!!!!!!!</a>
|
||||
|
||||
<div class="inline center">
|
||||
<locale></locale>
|
||||
<a class="btn vnii" href="" target="_blank">!!!!!!!!!!</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,3 +1 @@
|
|||
a.active {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {AuthenticationService} from "@app/_services";
|
||||
import {Router} from "@angular/router";
|
||||
import {PagesService} from "@app/_services/pages.service";
|
||||
|
||||
|
|
@ -9,16 +8,9 @@ import {PagesService} from "@app/_services/pages.service";
|
|||
styleUrls: ['header.component.scss']
|
||||
})
|
||||
export class HeaderComponent {
|
||||
public menuItems = <any>[];
|
||||
public loading: boolean = false;
|
||||
public error: string = '';
|
||||
public ddMenu:boolean;
|
||||
|
||||
public locales = <any>[];
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
public authenticationService: AuthenticationService,
|
||||
private router: Router,
|
||||
public pagesService: PagesService
|
||||
) {
|
||||
}
|
||||
|
|
@ -27,36 +19,8 @@ export class HeaderComponent {
|
|||
return this.pagesService.rootPage;
|
||||
}
|
||||
|
||||
get flag(){
|
||||
return 'assets/images/locale/'+(this.rootPage?.slug||'ru')+'.svg'
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.pagesService.root().subscribe(res => {
|
||||
this.locales = res.data;
|
||||
});
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
}
|
||||
|
||||
|
||||
login() {
|
||||
this.authenticationService.popup('login');
|
||||
}
|
||||
|
||||
openMobileMenu(){
|
||||
this.router.navigate([{outlets: {slider: 'pages-menu'}}], {skipLocationChange: true}).then();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
close() {
|
||||
setTimeout(() => {
|
||||
this.ddMenu = false;
|
||||
}, 10);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,12 @@
|
|||
<slider [width]="'320px'" side="left">
|
||||
|
||||
<div body>
|
||||
<pages-menu ></pages-menu>
|
||||
<pages-menu *ngIf="rootPage" [root]="rootPage" class="top-menu"></pages-menu>
|
||||
<div class="btn-menu">
|
||||
<div>
|
||||
<a>МТК 523</a>
|
||||
<a>Портал ТК 023</a>
|
||||
<a>!!!</a>
|
||||
<a>???</a>
|
||||
</div>
|
||||
<div>
|
||||
<button>
|
||||
<ico [size]="24" ico="search_24"></ico>
|
||||
Поиск
|
||||
</button>
|
||||
<button>
|
||||
<ico [size]="24" ico="en_24"></ico>
|
||||
English
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</slider>
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
import { Component } from '@angular/core';
|
||||
import {Router} from "@angular/router";
|
||||
import {PagesService} from "@app/_services/pages.service";
|
||||
|
||||
@Component({
|
||||
selector: 'slider-menu',
|
||||
|
|
@ -7,4 +9,14 @@ import { Component } from '@angular/core';
|
|||
})
|
||||
export class SliderMenuComponent {
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
public pagesService: PagesService
|
||||
) {
|
||||
}
|
||||
|
||||
get rootPage() {
|
||||
return this.pagesService.rootPage;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
<div class="locale" style="position: relative;" (mouseleave)="close()">
|
||||
<div class="locales-btn" (click)="ddMenu=!ddMenu">
|
||||
<img [src]="flag(rootPage?.slug)">
|
||||
<drop-down [target]="langMenu" ico="arrow_drop_down_24" [visible]="ddMenu"></drop-down>
|
||||
</div>
|
||||
|
||||
<div class="dropdown" (click)="close()" #langMenu>
|
||||
<div class="menu">
|
||||
<div class="type" *ngFor="let locale of locales" [routerLink]="locale.link" >
|
||||
<div class="row">
|
||||
<img [src]="flag(locale.slug)">
|
||||
{{locale.name}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
import { Component } from '@angular/core';
|
||||
import {PagesService} from "@app/_services/pages.service";
|
||||
import { environment } from '@environments/environment';
|
||||
|
||||
@Component({
|
||||
selector: 'locale',
|
||||
templateUrl: './locale.component.html',
|
||||
styleUrls: ['./locale.component.scss']
|
||||
})
|
||||
export class LocaleComponent {
|
||||
|
||||
public locales = <any>[];
|
||||
public ddMenu:boolean;
|
||||
|
||||
constructor(
|
||||
public pagesService: PagesService
|
||||
){}
|
||||
|
||||
ngOnInit() {
|
||||
this.pagesService.root().subscribe(res => {
|
||||
this.locales = res.data;
|
||||
});
|
||||
}
|
||||
|
||||
get rootPage() {
|
||||
return this.pagesService.rootPage;
|
||||
}
|
||||
|
||||
flag(localeName:string){
|
||||
if (!localeName) localeName = environment.defaultLocale;
|
||||
return 'assets/images/locale/'+(localeName||'ru')+'.svg'
|
||||
}
|
||||
|
||||
close() {
|
||||
setTimeout(() => {
|
||||
this.ddMenu = false;
|
||||
}, 10);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,16 +1,19 @@
|
|||
import { NgModule } from "@angular/core";
|
||||
import {BrowserModule} from "@angular/platform-browser";
|
||||
import { IcoComponent } from "./ico/ico.component";
|
||||
import {RouterModule} from "@angular/router";
|
||||
// import { QRCodeComponent } from "./qrcode/qrcode.component";
|
||||
// import { QRCodeModule } from "angularx-qrcode";
|
||||
import {DropDownComponent } from "./drop-down/drop-down.component";
|
||||
import { SliderComponent } from './slider/slider.component';
|
||||
import { SwitchComponent } from './switch/switch.component';
|
||||
import { LocaleComponent } from './locale/locale.component';
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports:[
|
||||
BrowserModule,
|
||||
RouterModule
|
||||
// QRCodeModule
|
||||
],
|
||||
declarations: [
|
||||
|
|
@ -19,13 +22,15 @@ import { SwitchComponent } from './switch/switch.component';
|
|||
DropDownComponent,
|
||||
SliderComponent,
|
||||
SwitchComponent,
|
||||
LocaleComponent,
|
||||
],
|
||||
exports: [
|
||||
IcoComponent,
|
||||
// QRCodeComponent,
|
||||
DropDownComponent,
|
||||
SliderComponent,
|
||||
SwitchComponent
|
||||
SwitchComponent,
|
||||
LocaleComponent
|
||||
]
|
||||
})
|
||||
export class WidjetModule {
|
||||
|
|
|
|||
|
|
@ -26,6 +26,14 @@
|
|||
visibility: collapse;
|
||||
}
|
||||
|
||||
.inline{
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
.center{
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.menu, .page-header {
|
||||
display: flex;
|
||||
.block {
|
||||
|
|
@ -394,6 +402,24 @@ html-section ul{
|
|||
}
|
||||
|
||||
|
||||
.locale{
|
||||
position: relative;
|
||||
.locale-btn{
|
||||
display: inline-flex;
|
||||
}
|
||||
.dropdown{
|
||||
top: 27px;
|
||||
left: -120px;
|
||||
}
|
||||
img{
|
||||
height:18px;
|
||||
width:27px;
|
||||
object-fit: cover;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media screen and (min-width: 1330px) {
|
||||
.fullwidth {
|
||||
width: 100vw;
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 30"><clipPath id="a"><path d="M0 0v30h60V0z"/></clipPath><clipPath id="b"><path d="M30 15h30v15zv15H0zH0V0zV0h30z"/></clipPath><g clip-path="url(#a)"><path d="M0 0v30h60V0z" fill="#012169"/><path d="M0 0l60 30m0-30L0 30" stroke="#fff" stroke-width="6"/><path d="M0 0l60 30m0-30L0 30" clip-path="url(#b)" stroke="#C8102E" stroke-width="4"/><path d="M30 0v30M0 15h60" stroke="#fff" stroke-width="10"/><path d="M30 0v30M0 15h60" stroke="#C8102E" stroke-width="6"/></g></svg>
|
||||
|
After Width: | Height: | Size: 527 B |
Loading…
Reference in New Issue