Modifs n°2 paul card + page resto + rooter
|
@ -1,10 +1,15 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { HomePageComponent } from './pages/home-page/home-page.component';
|
||||
import { RestoPageComponent } from './pages/resto-page/resto-page.component';
|
||||
import { PageNotFoundComponent } from './pages/page-not-found/page-not-found.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{ path: '', redirectTo: 'home', pathMatch: 'full' },
|
||||
{ path: 'home', component: HomePageComponent },
|
||||
{path: 'restaurants',component: RestoPageComponent},
|
||||
{path: 'page-not-found',component: PageNotFoundComponent},
|
||||
{path: '**', redirectTo: 'page-not-found' }
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
|
|
@ -15,6 +15,8 @@ import { CardRestoComponent } from './card-resto/card-resto.component';
|
|||
import { FooterComponent } from './footer/footer.component';
|
||||
import { HomePageComponent } from './pages/home-page/home-page.component';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { RestoPageComponent } from './pages/resto-page/resto-page.component';
|
||||
import { PageNotFoundComponent } from './pages/page-not-found/page-not-found.component';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
|
@ -29,7 +31,9 @@ import { HttpClientModule } from '@angular/common/http';
|
|||
CardCategoryComponent,
|
||||
CardRestoComponent,
|
||||
FooterComponent,
|
||||
HomePageComponent
|
||||
HomePageComponent,
|
||||
RestoPageComponent,
|
||||
PageNotFoundComponent
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
|
||||
<div class="container shadow p-0 mb-5 bg-body rounded rounded m-5 rounded-top " style="width: 18rem;" >
|
||||
<img class="card-img-top " src="assets/ImagesCategory/{{ categoryData.libelle }}.png" alt="Card image cap">
|
||||
<div class="card-body rounded-bottom">
|
||||
|
||||
|
||||
<a href="#" class="btn">{{ categoryData.libelle }}</a>
|
||||
<a routerLink="../restaurants" class="btn">{{ categoryData.libelle }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -13,3 +13,4 @@
|
|||
font-size: 1.5em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
<h2 class="titre ">Catégories :</h2>
|
||||
<div class="separation"></div>
|
||||
<div class="parent d-flex justify-content-center align-items-center flex-wrap flex-row ">
|
||||
<div *ngFor="let category of listCategories">
|
||||
<app-card-category [categoryData]="category"></app-card-category>
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
.parent{
|
||||
width: auto;
|
||||
margin: 3em 10em 0 10em ;
|
||||
|
||||
}
|
||||
.separation{
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
border-bottom: 2px solid #CE0000;
|
||||
max-width: 83%;
|
||||
}
|
||||
|
||||
.titre{
|
||||
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
margin: 0 0 0.5em 8.2em;
|
||||
color: #CE0000;
|
||||
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
<p>page-not-found works!</p>
|
|
@ -0,0 +1,25 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { PageNotFoundComponent } from './page-not-found.component';
|
||||
|
||||
describe('PageNotFoundComponent', () => {
|
||||
let component: PageNotFoundComponent;
|
||||
let fixture: ComponentFixture<PageNotFoundComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ PageNotFoundComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PageNotFoundComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
|
@ -0,0 +1,15 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-page-not-found',
|
||||
templateUrl: './page-not-found.component.html',
|
||||
styleUrls: ['./page-not-found.component.scss']
|
||||
})
|
||||
export class PageNotFoundComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
<h2 class="titre ">Catégories :</h2>
|
||||
<div class="separation"></div>
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
.separation{
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
border-bottom: 2px solid #CE0000;
|
||||
max-width: 83%;
|
||||
}
|
||||
|
||||
.titre{
|
||||
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
margin: 0 0 0.5em 8.2em;
|
||||
color: #CE0000;
|
||||
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { RestoPageComponent } from './resto-page.component';
|
||||
|
||||
describe('RestoPageComponent', () => {
|
||||
let component: RestoPageComponent;
|
||||
let fixture: ComponentFixture<RestoPageComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ RestoPageComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(RestoPageComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
|
@ -0,0 +1,15 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-resto-page',
|
||||
templateUrl: './resto-page.component.html',
|
||||
styleUrls: ['./resto-page.component.scss']
|
||||
})
|
||||
export class RestoPageComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 196 KiB |
After Width: | Height: | Size: 205 KiB |
After Width: | Height: | Size: 166 KiB |
After Width: | Height: | Size: 199 KiB |
After Width: | Height: | Size: 188 KiB |
After Width: | Height: | Size: 175 KiB |
After Width: | Height: | Size: 202 KiB |
After Width: | Height: | Size: 186 KiB |
After Width: | Height: | Size: 203 KiB |
After Width: | Height: | Size: 190 KiB |
After Width: | Height: | Size: 144 KiB |