Merge branch 'paul' into dev

This commit is contained in:
Your Name 2022-01-20 12:18:00 +01:00
commit e45c940f30
36 changed files with 179 additions and 10 deletions

16
package-lock.json generated
View File

@ -2499,6 +2499,16 @@
"read-package-json-fast": "^2.0.1" "read-package-json-fast": "^2.0.1"
} }
}, },
"node_modules/@popperjs/core": {
"version": "2.11.2",
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.2.tgz",
"integrity": "sha512-92FRmppjjqz29VMJ2dn+xdyXZBrMlE42AV6Kq6BwjWV7CNUW1hs2FtxSNLQE+gJhaZ6AAmYuO9y8dshhcBl7vA==",
"peer": true,
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/popperjs"
}
},
"node_modules/@schematics/angular": { "node_modules/@schematics/angular": {
"version": "13.0.4", "version": "13.0.4",
"resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-13.0.4.tgz", "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-13.0.4.tgz",
@ -14295,6 +14305,12 @@
"read-package-json-fast": "^2.0.1" "read-package-json-fast": "^2.0.1"
} }
}, },
"@popperjs/core": {
"version": "2.11.2",
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.2.tgz",
"integrity": "sha512-92FRmppjjqz29VMJ2dn+xdyXZBrMlE42AV6Kq6BwjWV7CNUW1hs2FtxSNLQE+gJhaZ6AAmYuO9y8dshhcBl7vA==",
"peer": true
},
"@schematics/angular": { "@schematics/angular": {
"version": "13.0.4", "version": "13.0.4",
"resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-13.0.4.tgz", "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-13.0.4.tgz",

View File

@ -3,13 +3,18 @@ import { RouterModule, Routes } from '@angular/router';
import { FavorisUserComponent } from './pages/favoris-user/favoris-user.component'; import { FavorisUserComponent } from './pages/favoris-user/favoris-user.component';
import { HomePageComponent } from './pages/home-page/home-page.component'; import { HomePageComponent } from './pages/home-page/home-page.component';
import { ListCategoriesComponent } from './pages/list-categories/list-categories.component'; import { ListCategoriesComponent } from './pages/list-categories/list-categories.component';
import { RestoPageComponent } from './pages/resto-page/resto-page.component';
import { PageNotFoundComponent } from './pages/page-not-found/page-not-found.component';
const routes: Routes = [ const routes: Routes = [
{ path: '', redirectTo: 'home', pathMatch: 'full' }, { path: '', redirectTo: 'home', pathMatch: 'full' },
{ path: 'home', component: HomePageComponent }, { path: 'home', component: HomePageComponent },
{ path: 'categories', component: ListCategoriesComponent }, { path: 'categories', component: ListCategoriesComponent },
{ path: 'favoris', component: FavorisUserComponent }, { path: 'favoris', component: FavorisUserComponent },
{ path: 'Deconnexion', redirectTo: 'home'} { path: 'Deconnexion', redirectTo: 'home'},
{path: 'restaurants',component: RestoPageComponent},
{path: 'page-not-found',component: PageNotFoundComponent},
{path: '**', redirectTo: 'page-not-found' }
]; ];
@NgModule({ @NgModule({

View File

@ -12,6 +12,8 @@ import { HomePageComponent } from './pages/home-page/home-page.component';
import { HttpClientModule } from '@angular/common/http'; import { HttpClientModule } from '@angular/common/http';
import { ListCategoriesComponent } from './pages/list-categories/list-categories.component'; import { ListCategoriesComponent } from './pages/list-categories/list-categories.component';
import { RestoPageComponent } from './pages/resto-page/resto-page.component';
import { PageNotFoundComponent } from './pages/page-not-found/page-not-found.component';
@NgModule({ @NgModule({
declarations: [ declarations: [
@ -22,7 +24,9 @@ import { ListCategoriesComponent } from './pages/list-categories/list-categories
CardRestoComponent, CardRestoComponent,
FooterComponent, FooterComponent,
HomePageComponent, HomePageComponent,
ListCategoriesComponent ListCategoriesComponent,
RestoPageComponent,
PageNotFoundComponent
], ],
imports: [ imports: [
BrowserModule, BrowserModule,

View File

@ -1,7 +1,10 @@
<div class="card" style="width: 18rem;">
<img class="card-img-top" src="..." alt="Card image cap"> <div class="container shadow p-0 mb-5 bg-body rounded rounded m-5 rounded-top " style="width: 18rem;" >
<div class="card-body"> <img class="card-img-top " src="assets/ImagesCategory/{{ categoryData.libelle }}.png" alt="Card image cap">
<h5 class="card-title">{{ categoryData.libelle }}</h5> <div class="card-body rounded-bottom">
<a href="#" class="btn btn-primary">Go somewhere</a>
<a routerLink="../restaurants" class="btn">{{ categoryData.libelle }}</a>
</div> </div>
</div> </div>

View File

@ -0,0 +1,16 @@
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');
.card-body{
background-color: #CE0000;
}
.btn{
display: block;
color: #fff;
width: 100%;
font-size: 1.5em;
font-weight: bold;
}

View File

@ -1,3 +1,7 @@
<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"> <div *ngFor="let category of listCategories">
<app-card-category [categoryData]="category"></app-card-category> <app-card-category [categoryData]="category"></app-card-category>
</div> </div>
</div>

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.

After

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 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: 185 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: 145 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: 157 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

View File

@ -6,3 +6,5 @@
margin : 0; margin : 0;
padding: 0; padding: 0;
} }
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');