Lot of visual improvements
This commit is contained in:
@@ -2,31 +2,30 @@
|
|||||||
max-width: 50rem;
|
max-width: 50rem;
|
||||||
width: 90%;
|
width: 90%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
padding: 2rem;
|
||||||
|
|
||||||
.task {
|
.task {
|
||||||
position: relative;
|
|
||||||
width: 100%;
|
|
||||||
height: 2.5rem;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
margin: .5rem 0;
|
|
||||||
|
|
||||||
input {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
padding: 0 3rem;
|
|
||||||
border-radius: .1rem;
|
|
||||||
border-style: none;
|
|
||||||
background-color: #444;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.new {
|
&.new {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
|
height: 2.5rem;
|
||||||
|
|
||||||
mat-icon {
|
mat-icon {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 1rem;
|
left: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
padding: 0 3rem;
|
||||||
|
border-radius: .1rem;
|
||||||
|
border-style: none;
|
||||||
|
background-color: #444;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,8 +5,26 @@
|
|||||||
<div class="input-container">
|
<div class="input-container">
|
||||||
<input type="text" [formControl]="titleControl" />
|
<input type="text" [formControl]="titleControl" />
|
||||||
</div>
|
</div>
|
||||||
<button mat-button type="button" class="expand">
|
<button mat-button type="button" class="expand" (click)="expand()">
|
||||||
<mat-icon>expand_more</mat-icon>
|
<mat-icon>expand_more</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
<div [ngClass]="getExpendedClass()">
|
||||||
|
<div class="container">
|
||||||
|
<div class="description-container">
|
||||||
|
<label for="description">
|
||||||
|
Description
|
||||||
|
</label>
|
||||||
|
<textarea id="description"></textarea>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<button matTooltip="Définir une alerte dans X minutes">
|
||||||
|
<mat-icon>update</mat-icon>
|
||||||
|
</button>
|
||||||
|
<button>
|
||||||
|
<mat-icon>delete</mat-icon>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
.task {
|
.task {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 2.5rem;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: .5rem 0;
|
margin-bottom: .5rem;
|
||||||
|
flex-direction: column;
|
||||||
|
background-color: #444;
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
border-radius: .1rem;
|
border-radius: .1rem;
|
||||||
height: 2.5rem;
|
height: 2.5rem;
|
||||||
background-color: #444;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -52,29 +52,52 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.expand {
|
.expand {
|
||||||
display: flex;
|
|
||||||
justify-content: end;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
padding: 0;
|
|
||||||
margin-right: .5rem;
|
margin-right: .5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
border-style: solid;
|
.body {
|
||||||
border-width: .1rem;
|
height: 0;
|
||||||
border-color: rgba(0,0,0, 0);
|
visibility: hidden;
|
||||||
|
transition: height .1s ease-in-out;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
width: 2rem;
|
&.expanded {
|
||||||
height: 2rem;
|
height: 20rem;
|
||||||
min-width: 2rem;
|
visibility: visible;
|
||||||
min-height: 2rem;
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
transition: background-color .2s ease-out,
|
.container {
|
||||||
border-color .2s ease-out;
|
flex-grow: 1;
|
||||||
|
padding: 1rem;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
|
||||||
&:hover {
|
.description-container {
|
||||||
background-color: #666;
|
width: 80%;
|
||||||
border-color: rgb(53, 53, 53);
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
flex-grow: 1;
|
||||||
|
border: 1px solid #444;
|
||||||
|
background-color: #4a4a4a;
|
||||||
|
resize: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.actions {
|
||||||
|
display: flex;
|
||||||
|
flex-grow: 1;
|
||||||
|
background-color: gray;
|
||||||
|
height: 100%;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
max-width: 20%;
|
||||||
|
justify-content: space-around;
|
||||||
|
align-items: flex-start;
|
||||||
|
padding: 1rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import { AfterViewInit, Component, Input, OnInit } from '@angular/core';
|
import { AfterViewInit, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||||
import { FormControl } from '@angular/forms';
|
import { FormControl } from '@angular/forms';
|
||||||
import { Task } from 'src/app/core/entity/task';
|
import { Task } from 'src/app/core/entity/task';
|
||||||
import { TaskListService } from 'src/app/core/service/task-list.service';
|
import { TaskListService } from 'src/app/core/service/task-list.service';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-task-display',
|
selector: 'app-task-display',
|
||||||
templateUrl: './task-display.component.html',
|
templateUrl: './task-display.component.html',
|
||||||
@@ -11,13 +12,26 @@ import { TaskListService } from 'src/app/core/service/task-list.service';
|
|||||||
export class TaskDisplayComponent implements AfterViewInit {
|
export class TaskDisplayComponent implements AfterViewInit {
|
||||||
@Input() task?: Task;
|
@Input() task?: Task;
|
||||||
titleControl = new FormControl(this.task?.title);
|
titleControl = new FormControl(this.task?.title);
|
||||||
|
isExpanded = false;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private _taskListService: TaskListService
|
private _taskListService: TaskListService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
|
|
||||||
ngAfterViewInit(): void {
|
ngAfterViewInit(): void {
|
||||||
this.titleControl.setValue(this?.task?.title);
|
this.titleControl.setValue(this?.task?.title);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
expand(): void {
|
||||||
|
this.isExpanded = !this.isExpanded;
|
||||||
|
}
|
||||||
|
|
||||||
|
getExpendedClass(): string {
|
||||||
|
let result = 'body';
|
||||||
|
|
||||||
|
if (this.isExpanded) {
|
||||||
|
result += ' expanded';
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import { TaskDisplayComponent } from './active-list-tasks/task-display/task-disp
|
|||||||
import {MatCheckboxModule} from '@angular/material/checkbox';
|
import {MatCheckboxModule} from '@angular/material/checkbox';
|
||||||
import { TaskListService } from './core/service/task-list.service';
|
import { TaskListService } from './core/service/task-list.service';
|
||||||
import { StorePersistenceService } from './core/service/store-persistence.service';
|
import { StorePersistenceService } from './core/service/store-persistence.service';
|
||||||
|
import {MatTooltipModule} from '@angular/material/tooltip';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
@@ -45,7 +46,8 @@ import { StorePersistenceService } from './core/service/store-persistence.servic
|
|||||||
MatButtonModule,
|
MatButtonModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
MatSnackBarModule,
|
MatSnackBarModule,
|
||||||
MatCheckboxModule
|
MatCheckboxModule,
|
||||||
|
MatTooltipModule
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
CookieService,
|
CookieService,
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
<nav *ngIf="!selectionMode">
|
<nav *ngIf="!selectionMode">
|
||||||
<span class="title" routerLink="/">
|
<span class="title" routerLink="/">
|
||||||
|
<img src="../../assets/images/to-do.png" />
|
||||||
To Do
|
To Do
|
||||||
</span>
|
</span>
|
||||||
<button mat-raised-button
|
<button *ngIf="!activeTaskList"
|
||||||
*ngIf="!activeTaskList"
|
|
||||||
(click)="openNewListForm()">
|
(click)="openNewListForm()">
|
||||||
Nouvelle liste
|
Nouvelle liste
|
||||||
</button>
|
</button>
|
||||||
<button mat-raised-button
|
<button *ngIf="activeTaskList"
|
||||||
*ngIf="activeTaskList"
|
(click)="goTaskListsPane()"
|
||||||
(click)="goTaskListsPane()">
|
class="icon"
|
||||||
|
matTooltip="Retourner aux task-lists">
|
||||||
<mat-icon>chevron_left</mat-icon>
|
<mat-icon>chevron_left</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<div *ngIf="activeTaskList">
|
<div *ngIf="activeTaskList">
|
||||||
|
|||||||
@@ -25,5 +25,7 @@ nav {
|
|||||||
.title {
|
.title {
|
||||||
font-size: 1.5rem;
|
font-size: 1.5rem;
|
||||||
margin: 0 1rem;
|
margin: 0 1rem;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
src/assets/images/to-do.png
Normal file
BIN
src/assets/images/to-do.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
BIN
src/favicon.ico
BIN
src/favicon.ico
Binary file not shown.
|
Before Width: | Height: | Size: 948 B After Width: | Height: | Size: 1.0 KiB |
@@ -25,3 +25,31 @@ a.no-style {
|
|||||||
color: inherit;
|
color: inherit;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
button {
|
||||||
|
border-style: solid;
|
||||||
|
border-width: .1rem;
|
||||||
|
border-color: rgba(0,0,0, 0);
|
||||||
|
border-radius: .2rem;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
padding: .5rem;
|
||||||
|
|
||||||
|
transition: background-color .2s ease-out,
|
||||||
|
border-color .2s ease-out;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: #666;
|
||||||
|
border-color: rgb(53, 53, 53);
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
width: 2rem;
|
||||||
|
height: 2rem;
|
||||||
|
min-width: 2rem;
|
||||||
|
min-height: 2rem;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user