migration home page vers list category
This commit is contained in:
parent
1b51cb5787
commit
9b6c646c14
12 changed files with 81 additions and 42 deletions
|
|
@ -1 +1,8 @@
|
|||
<p>favoris-user works!</p>
|
||||
<h2 class="titre ">Mes favoris :</h2>
|
||||
<div class="separation"></div>
|
||||
<div class="parent d-flex justify-content-center align-items-center">
|
||||
<div class="card">
|
||||
<h3>Mon top</h3>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
.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: 2.5em 0 0.5em 8.2em;
|
||||
color: #CE0000;
|
||||
|
||||
}
|
||||
|
||||
.card{
|
||||
width: 800px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #CE0000;
|
||||
}
|
||||
|
|
@ -1,8 +1,2 @@
|
|||
<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>
|
||||
</div>
|
||||
</div>
|
||||
<h1>Hello :D</h1>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
.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: 2.5em 0 0.5em 8.2em;
|
||||
color: #CE0000;
|
||||
|
||||
}
|
||||
|
|
@ -8,19 +8,13 @@ import { ApiBackService } from 'src/app/services/api-back.service';
|
|||
})
|
||||
export class HomePageComponent implements OnInit {
|
||||
|
||||
listCategories : string[];
|
||||
|
||||
constructor(private apiBackService : ApiBackService) {
|
||||
this.listCategories = [];
|
||||
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.apiBackService.getCategories().subscribe((listCategories: any[]) => {
|
||||
// console.log(listCategories);
|
||||
|
||||
this.listCategories = listCategories;
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
onEventLike(isLiked : boolean) {
|
||||
|
|
|
|||
|
|
@ -1 +1,7 @@
|
|||
category-works!
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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: 2.5em 0 0.5em 8.2em;
|
||||
color: #CE0000;
|
||||
|
||||
}
|
||||
|
|
@ -8,9 +8,18 @@ import { ApiBackService } from 'src/app/services/api-back.service';
|
|||
styleUrls: ['./list-categories.component.scss']
|
||||
})
|
||||
export class ListCategoriesComponent implements OnInit {
|
||||
listCategories : string[];
|
||||
|
||||
constructor(private apiBackService : ApiBackService) {
|
||||
this.listCategories = [];
|
||||
}
|
||||
|
||||
ngOnInit(): void {}
|
||||
ngOnInit(): void {
|
||||
this.apiBackService.getCategories().subscribe((listCategories: any[]) => {
|
||||
// console.log(listCategories);
|
||||
|
||||
this.listCategories = listCategories;
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
justify-content: flex-start;
|
||||
border-bottom: 2px solid #CE0000;
|
||||
max-width: 83%;
|
||||
padding-bottom: 3vh;
|
||||
}
|
||||
|
||||
.titre{
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ export class RestoPageComponent implements OnInit {
|
|||
if(this.apiBackService.routeParam === "filtres"){
|
||||
this.listRestaurants = this.apiBackService.restoFilter;
|
||||
|
||||
}else if(this.apiBackService.routeParam === "home"){
|
||||
}else if(this.apiBackService.routeParam === "categories"){
|
||||
this.apiBackService.restoByCat.subscribe((restaurants: any[]) => {
|
||||
this.listRestaurants = restaurants;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue