Modifs n°2 paul card + page resto + rooter

This commit is contained in:
Your Name 2022-01-20 12:01:59 +01:00
parent e067433e48
commit 31865dc4da
25 changed files with 137 additions and 4 deletions

View File

@ -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({

View File

@ -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,

View File

@ -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>
</div>

View File

@ -12,4 +12,5 @@
width: 100%;
font-size: 1.5em;
font-weight: bold;
}
}

View File

@ -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>

View File

@ -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;
}

View File

@ -0,0 +1 @@
<p>page-not-found works!</p>

View File

@ -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();
});
});

View File

@ -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 {
}
}

View File

@ -0,0 +1,3 @@
<h2 class="titre ">Catégories :</h2>
<div class="separation"></div>

View File

@ -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;
}

View File

@ -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();
});
});

View File

@ -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 {
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

After

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB