design overlay

This commit is contained in:
Chneemann 2024-04-17 22:10:33 +02:00
parent 63e9c71efd
commit bd8b4e14da
4 changed files with 59 additions and 10 deletions

View file

@ -17,11 +17,3 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.task-overlay {
width: 525px;
height: 700px;
padding: 48px 40px 48px 40px;
border-radius: 30px;
background-color: var(--white);
}

View file

@ -1,2 +1,14 @@
<p>task-overlay works!</p> <section>
<p>{{ overlayData }}</p> <div
class="category"
[style.background-color]="
categoryColors.get(getTask(overlayData)[0].category)
"
>
{{ getTask(overlayData)[0].category }}
</div>
<div class="headline">{{ getTask(overlayData)[0].title }}</div>
<div class="description">
{{ getTask(overlayData)[0].description }}
</div>
</section>

View file

@ -0,0 +1,31 @@
section {
width: 525px;
height: 700px;
padding: 48px 40px 48px 40px;
border-radius: 30px;
background-color: var(--white);
}
.category {
font-size: 16px;
padding: 4px 16px;
border-radius: 8px;
color: var(--white);
text-shadow: 1px 1px 2px var(--black);
}
.headline {
color: var(--dark-blue);
font-size: 16px;
font-weight: 700;
margin-top: 40px;
}
.description {
color: var(--gray);
font-size: 16px;
font-weight: 400;
margin-top: 8px;
max-height: 100px;
overflow: auto;
}

View file

@ -1,4 +1,5 @@
import { Component, Input } from '@angular/core'; import { Component, Input } from '@angular/core';
import { FirebaseService } from '../../../../services/firebase.service';
@Component({ @Component({
selector: 'app-task-overlay', selector: 'app-task-overlay',
@ -9,4 +10,17 @@ import { Component, Input } from '@angular/core';
}) })
export class TaskOverlayComponent { export class TaskOverlayComponent {
@Input() overlayData: string = ''; @Input() overlayData: string = '';
constructor(private firebaseService: FirebaseService) {}
categoryColors = new Map<string, string>([
['User Story', '#0038ff'],
['Technical Task', '#20d7c2'],
]);
getTask(taskId: string) {
return this.firebaseService
.getAllTasks()
.filter((task) => task.id === taskId);
}
} }