Add header component
This commit is contained in:
parent
61b9c5919f
commit
04d28fd52b
@ -1,9 +1,5 @@
|
|||||||
<div class="esh-basket">
|
<div class="esh-basket">
|
||||||
<div class="esh-basket-header">
|
<esh-header url="/catalog">Back to catalog</esh-header>
|
||||||
<div class="container">
|
|
||||||
<a class="esh-basket-back" routerLink="/catalog">Back to catalog</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<article class="esh-basket-titles row">
|
<article class="esh-basket-titles row">
|
||||||
|
@ -4,8 +4,8 @@ import { BrowserModule } from '@angular/platform-browser';
|
|||||||
import { SharedModule } from '../shared/shared.module';
|
import { SharedModule } from '../shared/shared.module';
|
||||||
import { BasketComponent } from './basket.component';
|
import { BasketComponent } from './basket.component';
|
||||||
import { BasketStatusComponent } from './basket-status/basket-status.component';
|
import { BasketStatusComponent } from './basket-status/basket-status.component';
|
||||||
//import { routing } from './basket.routes';
|
|
||||||
import { BasketService } from './basket.service';
|
import { BasketService } from './basket.service';
|
||||||
|
import { Header } from '../shared/components/header/header';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [SharedModule],
|
imports: [SharedModule],
|
||||||
|
@ -57,7 +57,6 @@ export class CatalogComponent implements OnInit {
|
|||||||
getCatalog(pageSize:number, pageIndex: number, brand?: number, type?: number) {
|
getCatalog(pageSize:number, pageIndex: number, brand?: number, type?: number) {
|
||||||
this.service.getCatalog(pageIndex, pageSize, brand, type).subscribe(catalog => {
|
this.service.getCatalog(pageIndex, pageSize, brand, type).subscribe(catalog => {
|
||||||
this.catalog = catalog;
|
this.catalog = catalog;
|
||||||
//console.log('catalog items retrieved: ' + catalog.count);
|
|
||||||
|
|
||||||
this.paginationInfo = {
|
this.paginationInfo = {
|
||||||
actualPage : catalog.pageIndex,
|
actualPage : catalog.pageIndex,
|
||||||
@ -67,7 +66,6 @@ export class CatalogComponent implements OnInit {
|
|||||||
items: catalog.pageSize
|
items: catalog.pageSize
|
||||||
};
|
};
|
||||||
|
|
||||||
//console.log(this.paginationInfo);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,7 +74,6 @@ export class CatalogComponent implements OnInit {
|
|||||||
this.types = types;
|
this.types = types;
|
||||||
let alltypes = { id: null, type: 'All' };
|
let alltypes = { id: null, type: 'All' };
|
||||||
this.types.unshift(alltypes);
|
this.types.unshift(alltypes);
|
||||||
//console.log('types retrieved: ' + types.length);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,7 +82,6 @@ export class CatalogComponent implements OnInit {
|
|||||||
this.brands = brands;
|
this.brands = brands;
|
||||||
let allBrands = { id: null, brand: 'All' };
|
let allBrands = { id: null, brand: 'All' };
|
||||||
this.brands.unshift(allBrands);
|
this.brands.unshift(allBrands);
|
||||||
//console.log('brands retrieved: ' + brands.length);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@ import { BrowserModule } from '@angular/platform-browser';
|
|||||||
|
|
||||||
import { SharedModule } from '../shared/shared.module';
|
import { SharedModule } from '../shared/shared.module';
|
||||||
import { CatalogComponent } from './catalog.component';
|
import { CatalogComponent } from './catalog.component';
|
||||||
//import { routing } from './catalog.routes';
|
|
||||||
import { CatalogService } from './catalog.service';
|
import { CatalogService } from './catalog.service';
|
||||||
import { Pager } from '../shared/components/pager/pager';
|
import { Pager } from '../shared/components/pager/pager';
|
||||||
|
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
<div class="esh-orders_detail">
|
<div class="esh-orders_detail">
|
||||||
<div class="esh-orders_detail-header">
|
<esh-header url="/orders">Back to list</esh-header>
|
||||||
<div class="container">
|
|
||||||
<a class="esh-orders_detail-back" routerLink="/orders">Back to list</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<section class="esh-orders_detail-section">
|
<section class="esh-orders_detail-section">
|
||||||
|
@ -3,25 +3,6 @@
|
|||||||
.esh-orders_detail {
|
.esh-orders_detail {
|
||||||
min-height: 80vh;
|
min-height: 80vh;
|
||||||
|
|
||||||
$header-height: 4rem;
|
|
||||||
&-header {
|
|
||||||
background-color: #00A69C;
|
|
||||||
height: $header-height;
|
|
||||||
}
|
|
||||||
|
|
||||||
&-back {
|
|
||||||
color: rgba($color-foreground-brighter, .4);
|
|
||||||
line-height: $header-height;
|
|
||||||
text-transform: uppercase;
|
|
||||||
text-decoration: none;
|
|
||||||
transition: color $animation-speed-default;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: $color-foreground-brighter;
|
|
||||||
transition: color $animation-speed-default;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&-section {
|
&-section {
|
||||||
padding: 1rem 0;
|
padding: 1rem 0;
|
||||||
|
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
<div class="esh-orders">
|
<div class="esh-orders">
|
||||||
<div class="esh-orders-header">
|
<esh-header url="/catalog">Back to catalog</esh-header>
|
||||||
<div class="container">
|
|
||||||
<a class="esh-orders-back" routerLink="/catalog">Back to catalog</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<article class="esh-orders-titles row">
|
<article class="esh-orders-titles row">
|
||||||
|
@ -6,7 +6,7 @@ import { OrdersComponent } from './orders.component';
|
|||||||
import { OrdersDetailComponent } from './orders-detail/orders-detail.component';
|
import { OrdersDetailComponent } from './orders-detail/orders-detail.component';
|
||||||
import { OrdersNewComponent } from './orders-new/orders-new.component';
|
import { OrdersNewComponent } from './orders-new/orders-new.component';
|
||||||
import { OrdersService } from './orders.service';
|
import { OrdersService } from './orders.service';
|
||||||
import { Pager } from '../shared/components/pager/pager';
|
import { Header } from '../shared/components/header/header';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [BrowserModule, SharedModule],
|
imports: [BrowserModule, SharedModule],
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
<div class="esh-header">
|
||||||
|
<div class="container">
|
||||||
|
<a class="esh-header-back" routerLink="{{url}}">
|
||||||
|
<ng-content></ng-content>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -0,0 +1,21 @@
|
|||||||
|
@import "../../../variables";
|
||||||
|
|
||||||
|
.esh-header {
|
||||||
|
$header-height: 4rem;
|
||||||
|
|
||||||
|
background-color: $color-brand;
|
||||||
|
height: $header-height;
|
||||||
|
|
||||||
|
&-back {
|
||||||
|
color: rgba($color-foreground-brighter, .4);
|
||||||
|
line-height: $header-height;
|
||||||
|
text-transform: uppercase;
|
||||||
|
text-decoration: none;
|
||||||
|
transition: color $animation-speed-default;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: $color-foreground-brighter;
|
||||||
|
transition: color $animation-speed-default;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
import { Component, Input } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'esh-header',
|
||||||
|
templateUrl: './header.html',
|
||||||
|
styleUrls: ['./header.scss']
|
||||||
|
})
|
||||||
|
export class Header {
|
||||||
|
@Input()
|
||||||
|
url: string;
|
||||||
|
}
|
@ -39,7 +39,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&:hover &-drop {
|
&:hover &-drop {
|
||||||
height: 6rem;
|
height: 7rem;
|
||||||
transition: height $animation-speed-default;
|
transition: height $animation-speed-default;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,8 +20,9 @@ import { BasketWrapperService} from './services/basket.wrapper.service';
|
|||||||
import { SecurityService } from './services/security.service';
|
import { SecurityService } from './services/security.service';
|
||||||
|
|
||||||
//Components:
|
//Components:
|
||||||
import {Pager } from './components/pager/pager';
|
import { Pager } from './components/pager/pager';
|
||||||
import {Identity } from './components/identity/identity';
|
import { Header } from './components/header/header';
|
||||||
|
import { Identity } from './components/identity/identity';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
@ -42,6 +43,7 @@ import {Identity } from './components/identity/identity';
|
|||||||
PageHeadingComponent,
|
PageHeadingComponent,
|
||||||
UppercasePipe,
|
UppercasePipe,
|
||||||
Pager,
|
Pager,
|
||||||
|
Header,
|
||||||
Identity
|
Identity
|
||||||
],
|
],
|
||||||
exports: [
|
exports: [
|
||||||
@ -61,6 +63,7 @@ import {Identity } from './components/identity/identity';
|
|||||||
PageHeadingComponent,
|
PageHeadingComponent,
|
||||||
UppercasePipe,
|
UppercasePipe,
|
||||||
Pager,
|
Pager,
|
||||||
|
Header,
|
||||||
Identity
|
Identity
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user