From d6eacbf3ea1ec16f3e7b44599eca380444bc2c3c Mon Sep 17 00:00:00 2001 From: Boris Voropaev Date: Tue, 29 Aug 2023 15:34:44 +0300 Subject: [PATCH] Form Styling CSS --- .../single/field-html-single.component.scss | 8 + .../image/form-field-image.component.scss | 17 +- .../field-image-multiple.component.html | 6 +- .../form-field-relation.component.scss | 40 +++- .../form/slider/slider-form.component.html | 4 +- .../sections/add/add-section.component.html | 2 +- .../sections/add/add-section.component.scss | 9 +- src/assets/css/basics.scss | 1 + src/assets/css/buttons.scss | 211 +++++++++++------- src/assets/css/forms.scss | 20 +- src/assets/css/slider.scss | 35 +-- .../{add_cirle_24.svg => add_circle_24.svg} | 0 .../icons/arrow_drop_down_dark_24dp.svg | 3 + src/assets/images/icons/close_24dp.svg | 2 +- src/assets/images/icons/trash_grey_24dp.svg | 2 +- src/environments/environment.ts | 2 +- src/styles.scss | 14 +- 17 files changed, 238 insertions(+), 138 deletions(-) rename src/assets/images/icons/{add_cirle_24.svg => add_circle_24.svg} (100%) create mode 100644 src/assets/images/icons/arrow_drop_down_dark_24dp.svg diff --git a/src/app/_modules/form-fields/types/html/single/field-html-single.component.scss b/src/app/_modules/form-fields/types/html/single/field-html-single.component.scss index e69de29..e8ad2c9 100644 --- a/src/app/_modules/form-fields/types/html/single/field-html-single.component.scss +++ b/src/app/_modules/form-fields/types/html/single/field-html-single.component.scss @@ -0,0 +1,8 @@ +:host::ng-deep editor{ + border-radius: 12px; + border: solid 1px #C0C0C0; + font-family: "PT Sans"; + .tox-tinymce{ + border:none; + } +} \ No newline at end of file diff --git a/src/app/_modules/form-fields/types/image/form-field-image.component.scss b/src/app/_modules/form-fields/types/image/form-field-image.component.scss index d3a9c02..aeaedbd 100644 --- a/src/app/_modules/form-fields/types/image/form-field-image.component.scss +++ b/src/app/_modules/form-fields/types/image/form-field-image.component.scss @@ -3,7 +3,7 @@ display: flex; height: 100px; padding: 16px; - border: var(--orange-2) dashed 1px; + border: var(--blue-1) dashed 1px; border-radius: 4px; overflow: hidden; &.hover { @@ -62,7 +62,7 @@ .item { display: flex; flex-direction: row; - align-items: center; + align-items: start; .preview { width: 80px; height: 80px; @@ -75,17 +75,8 @@ object-fit: cover; } } - .remove { - margin-left: 8px; - flex-shrink: 0; - width: 20px; - height: 20px; - background: transparent url("~src/assets/images/icons/close_20dp.svg") 50% 50% no-repeat; - opacity: 0.5; - content: ''; - &:hover { - opacity: 1; - } + .trash { + margin-left: 10px; } } } diff --git a/src/app/_modules/form-fields/types/image/multiple/field-image-multiple.component.html b/src/app/_modules/form-fields/types/image/multiple/field-image-multiple.component.html index e863abe..23e8cd9 100644 --- a/src/app/_modules/form-fields/types/image/multiple/field-image-multiple.component.html +++ b/src/app/_modules/form-fields/types/image/multiple/field-image-multiple.component.html @@ -1,6 +1,8 @@
-

Перетащите сюда или выберите файл в формате JPEG или PNG общим объемом не более 10 Мбайт.

+

Перетащите сюда или выберите файл + +

Загружается файл {{upload.file?.name}}
@@ -9,6 +11,6 @@
- +
diff --git a/src/app/_modules/form-fields/types/relation/form-field-relation.component.scss b/src/app/_modules/form-fields/types/relation/form-field-relation.component.scss index 26d50e9..b9ff238 100644 --- a/src/app/_modules/form-fields/types/relation/form-field-relation.component.scss +++ b/src/app/_modules/form-fields/types/relation/form-field-relation.component.scss @@ -1,16 +1,33 @@ .combobox { position: relative; - border: solid 1px var(--grey-3); - border-radius: var(--radius-1); + font-family: "PT Sans"; + border: solid 1px #C0C0C0; + border-radius: 12px; + font-size: 20px; + color: var(--dark-1); + padding: 8px 12px 8px 16px; + + &:hover{ + border-color: #6C6C6C; + outline: none; + } + &.active { + border-color: #0070BA; + outline: none; + + } + &:disabled{ + border-color: #EDEDED; + outline: none; + } .toggle { display: flex; flex-direction: row; align-items: center; width: 100%; - height: 40px; - padding: 0 12px 0 16px; - font-size: 1rem; + height: 24px; + font-size: 20px; box-sizing: border-box; cursor: pointer; .caption { @@ -37,15 +54,26 @@ } } + + &:after { display: block; width: 24px; height: 20px; margin-left: auto; - background: url('~src/assets/images/icons/arrow_drop_down_24dp.svg') 50% 50% no-repeat; + background: url('~src/assets/images/icons/arrow_drop_down_grey_24dp.svg') 50% 50% no-repeat; content: ""; transition: transform 0.2s; } + + &:hover:after { + background: url('~src/assets/images/icons/arrow_drop_down_dark_24dp.svg') 50% 50% no-repeat; + } + + } + + &.active .toggle:after { + background: url('~src/assets/images/icons/arrow_drop_down_24dp.svg') 50% 50% no-repeat; } .dropdown { diff --git a/src/app/_modules/objects/form/slider/slider-form.component.html b/src/app/_modules/objects/form/slider/slider-form.component.html index 4ae9acb..20dc990 100644 --- a/src/app/_modules/objects/form/slider/slider-form.component.html +++ b/src/app/_modules/objects/form/slider/slider-form.component.html @@ -22,8 +22,8 @@
* Поля, обязательные для заполнения
- - + +
diff --git a/src/app/_modules/pages/sections/add/add-section.component.html b/src/app/_modules/pages/sections/add/add-section.component.html index 4013871..70b7cff 100644 --- a/src/app/_modules/pages/sections/add/add-section.component.html +++ b/src/app/_modules/pages/sections/add/add-section.component.html @@ -1,5 +1,5 @@
-
Добавить элемент
+
Добавить элемент