This commit is contained in:
Thomas Cardon 2022-02-18 14:17:55 +01:00
commit 334f799c60
7 changed files with 55 additions and 40 deletions

View File

@ -1,4 +1,4 @@
<app-search-bar></app-search-bar> <app-search-bar *ngIf="dontShow"></app-search-bar>
<app-nav-bar></app-nav-bar> <app-nav-bar *ngIf="dontShow"></app-nav-bar>
<router-outlet></router-outlet> <router-outlet></router-outlet>
<app-footer></app-footer> <app-footer *ngIf="dontShow"></app-footer>

View File

@ -1,4 +1,5 @@
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { NavigationEnd, Router } from '@angular/router';
@Component({ @Component({
selector: 'app-root', selector: 'app-root',
@ -7,4 +8,19 @@ import { Component } from '@angular/core';
}) })
export class AppComponent { export class AppComponent {
title = 'simpleat'; title = 'simpleat';
dontShow: boolean = false;
constructor(private router:Router){
this.router.events.subscribe(e=>{
//console.log(e);
if(e instanceof NavigationEnd){
console.log(e.url)
if (e.url == "/signin") {
this.dontShow = false;
} else {
this.dontShow = true;
}
}
})
}
} }

View File

@ -2,14 +2,14 @@
style="width: 22rem;"> style="width: 22rem;">
<img class="card-img-top " src="assets/ImagesRestos/photo.jpg" alt="Card image cap"> <img class="card-img-top " src="assets/ImagesRestos/photo.jpg" alt="Card image cap">
<div class="rond position-absolute"> <div class="rond position-absolute">
<app-icon class="heart" <app-icon class="heart"
[iconName]="isLiked ? 'heart-fill' : 'heart'" [iconName]="isLiked ? 'heart-fill' : 'heart'"
[iconColor]="'#e35d6a'" [iconColor]="'#e35d6a'"
(click)="onClickLike()"></app-icon></div> (click)="onClickLike()"></app-icon></div>
<div class="card-body rounded-bottom"> <div class="card-body rounded-bottom">
<h3 class="titre-resto d-flex justify-content-center d-flex align-items-center" style="font-size: 24px;"> <h3 class="titre-resto d-flex justify-content-center d-flex align-items-center" style="font-size: 24px;">
{{restaurant.nom }}</h3> {{restaurant.nom }}</h3>
<div class="accordion " id="accordionExample"> <div class="accordion " id="accordionExample">
<h2 class="accordion-header pt-1" id="headingOne"> <h2 class="accordion-header pt-1" id="headingOne">
<button class="btn shadow accordion-button collapsed ps-5 pe-5 " type="button" data-bs-toggle="collapse" <button class="btn shadow accordion-button collapsed ps-5 pe-5 " type="button" data-bs-toggle="collapse"
@ -35,48 +35,48 @@
</div> </div>
<div class="trait-rouge pt-3"></div> <div class="trait-rouge pt-3"></div>
<div class="infos pt-2" style="color:#545454"> <div class="infos pt-2" style="color:#545454">
<i class="fas fa-walking ps-2 pe-2" style="color:#a8a8a8"></i> <i class="fas fa-walking ps-2 pe-2" style="color:#a8a8a8"></i>
<span class="categorie pe-2" style="font-weight: bold;">{{distance}}m</span> <span class="categorie pe-2" style="font-weight: bold;">{{distance}}m</span>
<i class="fas fa-euro-sign ps-2 pe-2" style="color:#a8a8a8"></i> <i class="fas fa-euro-sign ps-2 pe-2" style="color:#a8a8a8"></i>
<span class="prix" style="font-weight: bold;">5-10€</span> <span class="prix" style="font-weight: bold;">5-10€</span>
<div class="d-inline-flex" *ngIf="restaurant.website; else noWebsite"> <div class="d-inline-flex" *ngIf="restaurant.website; else noWebsite">
<p class="description pt-3 ps-2 pe-1"><i class="bi bi-globe2 ps-2 pe-2" style="color:#a8a8a8"></i> <p class="description pt-3 ps-2 pe-1"><i class="bi bi-globe2 ps-2 pe-2" style="color:#a8a8a8"></i>
<a href="{{restaurant.website}}" class="description text-decoration-none pe-1" style="font-style: italic;font-weight: bold; color:#545454">Site Web</a> <a href="{{restaurant.website}}" class="description text-decoration-none pe-1" style="font-style: italic;font-weight: bold; color:#545454">Site Web</a>
</p> </p>
</div> </div>
<!-- le else de notre *ngIf plus haut--> <!-- le else de notre *ngIf plus haut-->
<ng-template #noWebsite> <ng-template #noWebsite>
<div class="d-inline-flex"> <div class="d-inline-flex">
<p class="description pt-3 ps-3 pe-1 " style="font-size:1.9vh ;color:#545454"> Pas de site Web </p> <p class="description pt-3 ps-3 pe-1 " style="font-size:1.9vh ;color:#545454"> Pas de site Web </p>
</div> </div>
</ng-template> </ng-template>
<!-- ------------------------------------ --> <!-- ------------------------------------ -->
</div> </div>
<div class="trait-rouge pt-2 pb-0"></div> <div class="trait-rouge pt-2 pb-0"></div>
<div class="critere ps-1 pt-3"> <div class="critere ps-1 pt-3">
<span class="sur-place pe-3" style="color:#545454">Sur place :</span> <span class="sur-place pe-3" style="color:#545454">Sur place :</span>
<app-icon <app-icon
[iconName]="restaurant.surPlace ? 'bi bi-check-square-fill' : 'bi bi-x-square-fill ps-2 pt-1 '" [iconName]="restaurant.surPlace ? 'bi bi-check-square-fill' : 'bi bi-x-square-fill ps-2 pt-1 '"
[iconColor]="restaurant.surPlace ? '#4ECB71' : '#ED2F2F'" [iconColor]="restaurant.surPlace ? '#4ECB71' : '#ED2F2F'"
></app-icon> ></app-icon>
<span class="a-emporter pe-2 ps-4 " style="color:#545454">A emporter :</span> <span class="a-emporter pe-2 ps-4 " style="color:#545454">A emporter :</span>
<app-icon <app-icon
[iconName]="restaurant.emporter ? 'bi bi-check-square-fill' : 'bi bi-x-square-fill ps-2 pt-1'" [iconName]="restaurant.aEmporter ? 'bi bi-check-square-fill' : 'bi bi-x-square-fill ps-2 pt-1'"
[iconColor]="restaurant.emporter ? '#4ECB71' : '#ED2F2F'" [iconColor]="restaurant.aEmporter ? '#4ECB71' : '#ED2F2F'"
></app-icon> ></app-icon>
</div> </div>
<div class="trait-rouge pt-3"></div> <div class="trait-rouge pt-3"></div>
<div class="critere d-flex justify-content-center ps-1 pt-3 pb-3"> <div class="critere d-flex justify-content-center ps-1 pt-3 pb-3">
<span class="acces-pmr pe-1" style="color:#545454">Accès PMR :</span> <span class="acces-pmr pe-1" style="color:#545454">Accès PMR :</span>
<app-icon <app-icon
[iconName]="restaurant.accesPMR ? 'bi bi-check-square-fill' : 'bi bi-x-square-fill ps-1 pt-1'" [iconName]="restaurant.accesPMR ? 'bi bi-check-square-fill' : 'bi bi-x-square-fill ps-1 pt-1'"
[iconColor]="restaurant.accesPMR ? '#4ECB71' : '#ED2F2F'" [iconColor]="restaurant.accesPMR ? '#4ECB71' : '#ED2F2F'"
></app-icon> ></app-icon>
@ -86,4 +86,4 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,14 +1,14 @@
<footer class="d-flex"> <footer class="d-flex">
<div class = "logo d-inline-flex align-items-center p-4"> <div class = "logo d-inline-flex align-items-center">
<img src="../../assets/Logo_footer.png"> <img src="../../assets/Logo_footer.png">
</div> </div>
<div class="liens d-flex justify-content-end align-items-center"> <div class="liens d-flex justify-content-end align-items-center">
<h5>Aide</h5> <h5>Aide</h5>
<h5>Contact</h5> <h5>Contact</h5>
<h5>Administrateurs</h5> <h5>Administrateurs</h5>
<h5>Mentions legales</h5> <h5>Mentions legales</h5>
</div> </div>
</footer> </footer>

View File

@ -1,5 +1,5 @@
<div class="signin-form text-center"> <div class="signin-form text-center">
<main class="form-signin"> <main class="form-signin d-inline-flex">
<form (ngSubmit)="onSubmit(signinForm)" #signinForm="ngForm"> <form (ngSubmit)="onSubmit(signinForm)" #signinForm="ngForm">
<h5>Merci de vous connecter</h5> <h5>Merci de vous connecter</h5>
<img src="../../../assets/images-header/logo.png"><br> <img src="../../../assets/images-header/logo.png"><br>
@ -32,12 +32,12 @@
<button class="w-100 btn btn-lg btn-danger" <button class="w-100 btn btn-lg btn-danger"
type="submit" type="submit"
[disabled]="signinForm.invalid">Je me connecte !</button> [disabled]="signinForm.invalid">Je me connecte !</button>
<p> <!--<p>
Form is dirty : {{ signinForm.form.dirty }} Form is dirty : {{ signinForm.form.dirty }}
</p> </p>
<p> <p>
Form is touched : {{ signinForm.form.touched }} Form is touched : {{ signinForm.form.touched }}
</p> </p>-->
</form> </form>
<div *ngIf="errorForm"> <div *ngIf="errorForm">

View File

@ -1,19 +1,18 @@
.signin-form { .signin-form {
height: 100vh; height: 100vh;
padding-top: 40px; padding-top: 40px;
background-image: url(../../../assets/fond_signin.png); background-image: url(../../../assets/fond-signin.png);
background-position: center; background-position: center;
} }
.form-signin { .form-signin {
width: 500px; max-width: 500px;
//max-width: 330px;
padding: 15px; padding: 15px;
margin: auto; margin: auto;
margin-top: 20vh;
background-color: #f0f0f0; background-color: #f0f0f0;
border-radius: 15px; border-radius: 15px;
box-shadow: 10px 10px 10px grey; box-shadow: 10px 10px 10px grey;
margin-top: 25vh;
} }
.form-floating:focus-within { .form-floating:focus-within {

BIN
src/assets/fond-signin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 681 KiB