Skip to content

Commit

Permalink
#115 background image properly set
Browse files Browse the repository at this point in the history
  • Loading branch information
tareq89 committed Aug 16, 2016
1 parent c958526 commit 94bf302
Show file tree
Hide file tree
Showing 6 changed files with 197 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/shared/router.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import { OrderComponent } from '../dashboard/order/order.component';

import {JobHistoryComponent} from '../job/job-history/job-history.component';
import {DashboardComponent} from '../dashboard/dashboard.component';
import {VendorDetailsComponent} from '../vendor-details/vendor-details.component';


export const Routes = [
{
Expand All @@ -32,6 +34,11 @@ export const Routes = [
path: '/dashboard/...',
name: 'Dashboard',
component: DashboardComponent
},
{
path: '/vendors/:vendorId',
name: 'VendorDetails',
component: VendorDetailsComponent
}
]

Expand Down
5 changes: 5 additions & 0 deletions app/vendor-details/vendor-details.component.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.vendor-name {
background: url('/assets/img/pop-up-pizza.jpg') no-repeat center center fixed;
height: 333px;
background-size: cover;
}
10 changes: 10 additions & 0 deletions app/vendor-details/vendor-details.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<div class="container center-block">
<div class="row">
<ul class="list-inline center-block">
<li *ngFor="let item of vendor.catagories">{{item.catagory}}</li>
</ul>
</div>
<div class="row vendor-name">
<h1>{{vendor.name}}</h1>
</div>
</div>
25 changes: 25 additions & 0 deletions app/vendor-details/vendor-details.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { Component, OnInit } from "@angular/core";
import { VendorDetailsService } from "./vendor-details.service";


@Component({
selector: 'vendor-details',
templateUrl: 'app/vendor-details/vendor-details.component.html',
styleUrls: ['app/vendor-details/vendor-details.component.css'],
providers: [VendorDetailsService]
})



export class VendorDetailsComponent implements OnInit {
vendor: any;

ngOnInit(){
this.vendor = this.vendorDetailsService.vendorDetails;
}

constructor(private vendorDetailsService: VendorDetailsService){

}

}
150 changes: 150 additions & 0 deletions app/vendor-details/vendor-details.service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
import { Injectable } from '@angular/core';

@Injectable()
export class VendorDetailsService {
vendorDetails = {
name: "Pop up Pizza",
address: "1 S Main St, Las Vegas, NV",
catagories: [
{
catagory: "SIGNATURE PIZZAS",
itemlist: [
{
item: "The 18 lb.",
price: 14.99
},
{
item: "The Main St",
price: 15.99
},
{
item: "The Goodman",
price: 19.99
},
{
item: "The Newport",
price: 19.99
},
{
item: "The Hawaiian",
price: 19.99
},
{
item: "The White Chape",
price: 21.99
},
{
item: "The Plaza",
price: 21.99
},
{
item: "TheScintas",
price: 21.99
},
{
item: "The Soho",
price: 24.99
},
{
item: "TheWestern",
price: 21.99
}
]
},
{
catagory: "SIGNATURE PIZZAS",
itemlist: [
{
item: "The 18 lb.",
price: 14.99
},
{
item: "The Main St",
price: 15.99
},
{
item: "The Goodman",
price: 19.99
},
{
item: "The Newport",
price: 19.99
},
{
item: "The Hawaiian",
price: 19.99
},
{
item: "The White Chape",
price: 21.99
},
{
item: "The Plaza",
price: 21.99
},
{
item: "TheScintas",
price: 21.99
},
{
item: "The Soho",
price: 24.99
},
{
item: "TheWestern",
price: 21.99
}
]
},
{
catagory: "SIGNATURE PIZZAS",
itemlist: [
{
item: "The 18 lb.",
price: 14.99
},
{
item: "The Main St",
price: 15.99
},
{
item: "The Goodman",
price: 19.99
},
{
item: "The Newport",
price: 19.99
},
{
item: "The Hawaiian",
price: 19.99
},
{
item: "The White Chape",
price: 21.99
},
{
item: "The Plaza",
price: 21.99
},
{
item: "TheScintas",
price: 21.99
},
{
item: "The Soho",
price: 24.99
},
{
item: "TheWestern",
price: 21.99
}
]
}
]
}

getVendorDetails(){
return this.vendorDetails;
}
}
Binary file added assets/img/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 94bf302

Please sign in to comment.