From 11301315d3dfe5fa80f78c908707fd4f3469a4c5 Mon Sep 17 00:00:00 2001 From: kamask Date: Sat, 5 Sep 2026 17:17:34 +0300 Subject: [PATCH] =?UTF-8?q?feat:=20=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=BE=D1=87=D0=B8=D1=81=D1=82=D0=BA=D0=B8=20=D0=B2=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=BB=D0=B5=20=D1=84=D0=B8=D0=BB=D1=8C=D1=82=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/app.ts | 6 ++-- src/app/features/tasks/task-list.ts | 51 ++++++++++++++++++++--------- src/styles.css | 37 +++++++++++++++------ 3 files changed, 66 insertions(+), 28 deletions(-) diff --git a/src/app/app.ts b/src/app/app.ts index e6219b9..bbbfb18 100644 --- a/src/app/app.ts +++ b/src/app/app.ts @@ -16,12 +16,12 @@ import { RouterOutlet } from '@angular/router'; align-items: center; padding: 8px; min-height: 100dvh; - background: var(--bg-base-color); + background: var(--color-bg); main { width: 100%; - background: var(--surface-color); - padding: 1ch; + background: var(--color-surface); + padding: 1rem; border-radius: 5px; } } diff --git a/src/app/features/tasks/task-list.ts b/src/app/features/tasks/task-list.ts index 06ccab5..c11e388 100644 --- a/src/app/features/tasks/task-list.ts +++ b/src/app/features/tasks/task-list.ts @@ -5,15 +5,20 @@ import { TaskService } from './task-service'; import { RouterLink } from '@angular/router'; import { FormsModule } from '@angular/forms'; import { NgIcon, provideIcons } from '@ng-icons/core'; -import { lucideSquarePlus } from '@ng-icons/lucide'; +import { lucideCircleX, lucideSquarePlus } from '@ng-icons/lucide'; @Component({ selector: 'ksk-crm-home-page', imports: [TaskItem, RouterLink, FormsModule, NgIcon], - providers: [provideIcons({ lucideSquarePlus })], + providers: [provideIcons({ lucideSquarePlus, lucideCircleX })], template: `
- +
+ + +
@@ -27,26 +32,42 @@ import { lucideSquarePlus } from '@ng-icons/lucide'; styles: ` .topBar { display: flex; + padding-top: 1rem; + + .input-wrapper { + display: inline-flex; + flex-grow: 1; + position: relative; + + input { + width: 100%; + margin: auto 0; + } + + button { + border: none; + background: none; + position: absolute; + top: 55%; + right: 1em; + transform: translateY(-50%); + cursor: pointer; + color: var(--color-primary); + } + + input:placeholder-shown + button { + display: none; + } + } a { display: inline-flex; align-items: center; justify-content: center; - margin-left: 1ch; + margin-left: .5em; } } - input { - outline: none; - padding: 1ch; - flex-grow: 1; - } - - button { - cursor: pointer; - padding: 5px; - } - .result { margin-top: 20px; } diff --git a/src/styles.css b/src/styles.css index a435f99..f1b2656 100644 --- a/src/styles.css +++ b/src/styles.css @@ -4,17 +4,23 @@ @import '@fontsource/inter/700.css'; :root { - --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); + --color-gray: oklch(28% 0 0); + --color-white: oklch(100% 0 0); + --color-blue: oklch(62.3% 0.214 259.815); + --color-blue-light: oklch(from var(--color-blue) calc(l + 0.15) c h); + --color-blue-dark: oklch(from var(--color-blue) calc(l - 0.15) c h); + --color-green: oklch(70.4% 0.14 182.503); + + + --color-bg: var(--color-gray); + --color-surface: var(--color-white); + --color-primary: var(--color-blue); + --color-primary-light: var(--color-blue-light); + --color-primary-dark: var(--color-blue-dark); + --color-success: var(--color-green); + --font-family-base: 'Inter'; - - --bg-base-color: var(--gray-base); - --surface-color: var(--white-base); - --primary-color: var(--blue-base); - --success-color: var(--green-base); } * { @@ -29,5 +35,16 @@ body { a { text-decoration: none; - color: var(--primary-color); + color: var(--color-primary); +} + +input { + outline: 1px solid var(--color-primary); + border: none; + border-radius: 3px; + padding: .5em; + + &:focus { + outline: 1px solid var(--color-primary-dark); + } }