diff --git a/src/app/app.ts b/src/app/app.ts index f90179a..e6219b9 100644 --- a/src/app/app.ts +++ b/src/app/app.ts @@ -1,5 +1,5 @@ import { Component } from '@angular/core'; -import { RouterLink, RouterOutlet } from '@angular/router'; +import { RouterOutlet } from '@angular/router'; @Component({ selector: 'ksk-crm-root', @@ -16,11 +16,11 @@ import { RouterLink, RouterOutlet } from '@angular/router'; align-items: center; padding: 8px; min-height: 100dvh; - background: var(--bg-base); + background: var(--bg-base-color); main { width: 100%; - background: var(--surface); + background: var(--surface-color); padding: 1ch; border-radius: 5px; } diff --git a/src/app/features/tasks/task-list.ts b/src/app/features/tasks/task-list.ts index 30eff4c..06ccab5 100644 --- a/src/app/features/tasks/task-list.ts +++ b/src/app/features/tasks/task-list.ts @@ -1,4 +1,4 @@ -import { Component, computed, inject, linkedSignal, resource, signal } from '@angular/core'; +import { Component, computed, inject, resource, signal } from '@angular/core'; import { TaskItem } from './task-item'; import { Task } from './task'; import { TaskService } from './task-service'; @@ -12,9 +12,11 @@ import { lucideSquarePlus } from '@ng-icons/lucide'; imports: [TaskItem, RouterLink, FormsModule, NgIcon], providers: [provideIcons({ lucideSquarePlus })], template: ` -
- - +
+ + + +
@for (task of filteredTasks(); track $index) { @@ -23,14 +25,28 @@ import { lucideSquarePlus } from '@ng-icons/lucide';
`, styles: ` + .topBar { + display: flex; + + a { + display: inline-flex; + align-items: center; + justify-content: center; + margin-left: 1ch; + } + } + input { outline: none; - padding: 5px; + padding: 1ch; + flex-grow: 1; } + button { cursor: pointer; padding: 5px; } + .result { margin-top: 20px; } @@ -44,10 +60,10 @@ export class TaskList { loader: () => this.taskService.getAllTasks(), }); - searchInput = signal(''); + filterInput = signal(''); filteredTasks = computed(() => { - const s = this.searchInput(); + const s = this.filterInput(); const tasks = this.tasks.value(); if (!tasks) return []; diff --git a/src/styles.css b/src/styles.css index 213ad96..a435f99 100644 --- a/src/styles.css +++ b/src/styles.css @@ -4,13 +4,17 @@ @import '@fontsource/inter/700.css'; :root { - --gray: oklch(28% 0 0); - --white: white; + --gray-base: oklch(28% 0 0); + --white-base: oklch(100% 0 0); + --blue-base: oklch(62.3% 0.214 259.815); + --green-base: oklch(70.4% 0.14 182.503); --font-family-base: 'Inter'; - --bg-base: var(--gray); - --surface: var(--white); + --bg-base-color: var(--gray-base); + --surface-color: var(--white-base); + --primary-color: var(--blue-base); + --success-color: var(--green-base); } * { @@ -22,3 +26,8 @@ body { font-family: var(--font-family-base), system-ui, -apple-system, sans-serif; } + +a { + text-decoration: none; + color: var(--primary-color); +}