Merge pull request #63 from AlineRinquin/isa2

Isa2
This commit is contained in:
AlineRinquin 2022-02-28 21:09:50 +01:00 committed by GitHub
commit 4b5b3020ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 132 additions and 79 deletions

View File

@ -1,67 +1,70 @@
<input <div class="container">
type="text" <input
class="todo-title" type="text"
placeholder="Titre" class="todo-title btn btn-outline-success"
value="{{ todo.nom }}" placeholder="Titre"
[(ngModel)]="todo.nom" value="{{ todo.nom }}"
(keyup.enter)="updateTodo(todo)" [(ngModel)]="todo.nom"
/> (keyup.enter)="updateTodo(todo)"
/>
<i class="bi bi-trash3" (click)="deleteTodo(todo.id)"></i> <i class="bi bi-trash3" (click)="deleteTodo(todo.id)"></i>
<div class="row justify-align">
<input
type="text"
class="todo-input"
placeholder="+ Nouvelle Tâche"
[(ngModel)]="todoTitle"
(keyup.enter)="addTache(todo.id)"
/>
<div class="element" *ngFor="let tache of todo.taches">
<div class="element-gauche">
<input <input
type="checkbox" type="text"
[(ngModel)]="tache.etat" class="todo-input shadow justify-center"
(change)="doneEdit(tache)" placeholder="+ Nouvelle Tâche"
checked="checked" [(ngModel)]="todoTitle"
(keyup.enter)="addTache(todo.id)"
/> />
<div
*ngIf="!tache.editing; else editingTodo"
class="nomTache"
[ngClass]="{ completed: tache.etat }"
(dblclick)="modifier(tache)"
>
{{ tache.texte }}
</div>
<ng-template #editingTodo>
<input
type="text"
class="modifier-element"
[(ngModel)]="tache.texte"
(blur)="doneEdit(tache)"
(keyup.enter)="doneEdit(tache)"
(keyup.esc)="cancelEdit(tache)"
autofocus
/>
</ng-template>
</div> </div>
<div class="deleteTache" (click)="deleteTache(tache.id)">&times;</div> <div
</div> class="element btn btn-outline-success shadow"
*ngFor="let tache of todo.taches"
<div class="extra-container"> >
<div> <div class="element-gauche">
<label <input
><input type="checkbox"
[(ngModel)]="tache.etat"
(change)="doneEdit(tache)"
checked="checked"
/>
<div
*ngIf="!tache.editing; else editingTodo"
class="nomTache"
[ngClass]="{ completed: tache.etat }"
(dblclick)="modifier(tache)"
>
{{ tache.texte }}
</div>
<ng-template #editingTodo>
<input
type="text"
class="modifier-element"
[(ngModel)]="tache.texte"
(blur)="doneEdit(tache)"
(keyup.enter)="doneEdit(tache)"
(keyup.esc)="cancelEdit(tache)"
autofocus
/>
</ng-template>
</div>
<div class="deleteTache" (click)="deleteTache(tache.id)">&times;</div>
</div>
<div class="selection">
<label>
<input
class="selection"
type="checkbox" type="checkbox"
(change)="cocherAllTodoList()" (change)="cocherAllTodoList()"
[(ngModel)]="masterSelected" [(ngModel)]="masterSelected"
/>Selectionner toutes les tâches</label />Selectionner toutes les tâches</label
> >
<div class="casesRestantes">{{ toDoRest() }} tâche(s) restante(s)</div>
</div> </div>
<div>{{ toDoRest() }} tâches restantes</div>
</div> </div>
<div class="extra-container"> <!--<div class="extra-container">
<!-- <div> <div>
<button [ngClass]="{ active: filter === 'tous' }" (click)="filter = 'tous'"> <button [ngClass]="{ active: filter === 'tous' }" (click)="filter = 'tous'">
Toutes la To Do List Toutes la To Do List
</button> </button>
@ -78,5 +81,5 @@
Terminées Terminées
</button> </button>
</div> </div>
-->
</div> </div> -->

View File

@ -1,30 +1,60 @@
.container {
border: 3px #4e9e7b solid;
padding: 5%;
min-width: 300px;
max-width: 30%;
margin: 5%;
border-radius: 5%;
margin-bottom: 20% !important;
}
.todo-title { .todo-title {
width: 25%; width: 75%;
padding: 10px 18px; padding: 10px 18px;
font-size: xx-large; font-size: large !important;
margin-bottom: 16px; font-weight: bold !important;
color: #4e9e7b !important;
border-top-color: #4e9e7b !important;
border-left-color: #4e9e7b !important;
border-radius: 5% !important;
margin-top: 0%;
margin-bottom: 5%;
margin-right: 3% !important;
color: black;
box-shadow: 5px 5px 5px gray;
&:focus { &:focus {
outline: 0; outline: 0;
background-color: lightgray;
} }
} }
.todo-input { .todo-input {
width: 20%; width: 75%;
padding: 10px 18px; padding: 10px 18px;
font-size: 18px; font-size: 18px;
margin-bottom: 16px; margin-bottom: 16px;
color: white !important;
background-color: #4e9e7b !important;
border-radius: 5%;
margin-left: 4%;
&:focus { &:focus {
outline: 0; outline: 0;
background-color: lightgray;
} }
} }
.element { .element {
margin-bottom: 12px; margin-bottom: 12px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
animation-duration: 0.3s; animation-duration: 0.3s;
color: black;
background-color: #4e9e7b;
}
::placeholder {
color: white;
} }
.deleteTache { .deleteTache {
@ -36,56 +66,66 @@
} }
} }
.element-gauche { // later .element-gauche {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.nomTache{ .nomTache {
padding: 10px; padding: 10px;
border: 1px solid white;
margin-left: 12px; margin-left: 12px;
} }
.modifier-element { .modifier-element {
font-size: 24px; font-size: 24px;
color: #2c3e50; color: white;
margin-left: 12px; margin-left: 12px;
width: 100%; width: 100%;
padding: 10px; padding: 10px;
border: 1px solid rgb(204, 204, 204); //override defaults border: 1px solid rgb(204, 204, 204); //override defaults
font-family: 'Avenir', Helvetica, Arial, sans-serif; font-family: "Avenir", Helvetica, Arial, sans-serif;
&:focus { &:focus {
outline: none; outline: none;
background-color:aquamarine; background-color: grey;
} }
} }
.selection {
margin-left: 0%;
text-align: left;
font-size: medium;
font-weight: bold;
color: #4e9e7b;
}
.completed { .completed {
text-decoration: line-through; text-decoration: line-through;
color: grey; color: white !important;
}
.casesRestantes {
color: #4cc690;
} }
/* button {
button {
font-size: 14px; font-size: 14px;
background-color: white; background-color: white;
appearance: none; appearance: none;
&:hover { &:hover {
background: lightgreen; background: grey;
} }
&:focus { &:focus {
outline: none; outline: none;
} }
} } */
.active { /* .active {
background: lightgreen; background: grey;
} } */
.completed { /* .completed {
text-decoration: line-through; text-decoration: line-through;
color: grey; color: grey;
} }
*/

View File

@ -8,15 +8,19 @@
<div class="d-flex align-items-stretch"></div> <div class="d-flex align-items-stretch"></div>
<input <input
type="text" type="text"
class="todo-input" class="btn btn-outline-success"
placeholder="+ Nouvelle To-Do-List" placeholder=" Ajouter une To-Do-List"
[(ngModel)]="todoListTitle" [(ngModel)]="todoListTitle"
(keyup.enter)="addTodoByTeamId()" (keyup.enter)="addTodoByTeamId()"
/> />
<div class="d-flex align-items-stretch"> <div class="d-flex align-items-stretch">
<div class="col" *ngFor="let todos of listTodos"> <div class="custom-main container p-3">
<app-to-do-list [todo]="todos"> </app-to-do-list> <div class="row">
<div class="col" *ngFor="let todos of listTodos">
<app-to-do-list [todo]="todos"> </app-to-do-list>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -0,0 +1,6 @@
.btn {
margin-top: 1%;
margin-bottom: 1%;
color: black;
box-shadow: 5px 5px 5px gray;
}