diff --git a/angular.json b/angular.json index 2fd8be9..5036951 100644 --- a/angular.json +++ b/angular.json @@ -508,6 +508,10 @@ { "replace": "src/app/_modules/registries/registry/entries/entry/properties/entry-properties.component.ts", "with": "src/tk023/component/registries/registry/entries/entry/properties/entry-properties.component.ts" + }, + { + "replace": "src/app/_modules/pages/sections/types/basic/cards/items/item/types/persons/cards-item-persons.component.ts", + "with": "src/tk023/component/pages/sections/types/basic/cards/items/item/types/persons/cards-item-persons.component.ts" } ], "inlineStyleLanguage": "scss", @@ -583,6 +587,10 @@ { "replace": "src/app/_modules/registries/registry/entries/entry/properties/entry-properties.component.ts", "with": "src/tk023/component/registries/registry/entries/entry/properties/entry-properties.component.ts" + }, + { + "replace": "src/app/_modules/pages/sections/types/basic/cards/items/item/types/persons/cards-item-persons.component.ts", + "with": "src/tk023/component/pages/sections/types/basic/cards/items/item/types/persons/cards-item-persons.component.ts" } ], "inlineStyleLanguage": "scss", diff --git a/src/tk023/component/pages/sections/types/basic/cards/items/item/types/persons/cards-item-persons.component.html b/src/tk023/component/pages/sections/types/basic/cards/items/item/types/persons/cards-item-persons.component.html new file mode 100644 index 0000000..f14a986 --- /dev/null +++ b/src/tk023/component/pages/sections/types/basic/cards/items/item/types/persons/cards-item-persons.component.html @@ -0,0 +1,22 @@ + +
{{position}}
+
{{name}}
+
{{additional}}
+
{{phone}}
+
{{email}}
+
+ + + diff --git a/src/tk023/component/pages/sections/types/basic/cards/items/item/types/persons/cards-item-persons.component.scss b/src/tk023/component/pages/sections/types/basic/cards/items/item/types/persons/cards-item-persons.component.scss new file mode 100644 index 0000000..e0d978b --- /dev/null +++ b/src/tk023/component/pages/sections/types/basic/cards/items/item/types/persons/cards-item-persons.component.scss @@ -0,0 +1,5 @@ +.image { + img { + width: 100%; + } +} diff --git a/src/tk023/component/pages/sections/types/basic/cards/items/item/types/persons/cards-item-persons.component.ts b/src/tk023/component/pages/sections/types/basic/cards/items/item/types/persons/cards-item-persons.component.ts new file mode 100644 index 0000000..d3a47bd --- /dev/null +++ b/src/tk023/component/pages/sections/types/basic/cards/items/item/types/persons/cards-item-persons.component.ts @@ -0,0 +1,53 @@ +import {Component, Input} from '@angular/core'; +import {ObjectsService} from "@app/_services"; +import {PagesService} from "@app/_services/pages.service"; + +@Component({ + selector: 'cards-item-persons', + templateUrl: 'cards-item-persons.component.html', + styleUrls: ['cards-item-persons.component.scss'] +}) +export class CardsItemPersonsComponent { + @Input() card: any; + public showModal = false; + + constructor( + private objectsService: ObjectsService, + public pagesService: PagesService + ) { + } + + get image() { + return this.objectsService.getValue(this.card, 'image'); + } + get name() { + return this.objectsService.getValue(this.card, 'person-name'); + } + get position() { + return this.objectsService.getValue(this.card, 'person-position'); + } + get additional() { + return this.objectsService.getValue(this.card, 'person-additional-position'); + } + get phone() { + return this.objectsService.getValue(this.card, 'contact-phone'); + } + get email() { + return this.objectsService.getValue(this.card, 'contact-email'); + } + get html() { + return this.objectsService.getValue(this.card, 'html'); + } + + get textOnly(){ + return this.html?.replace(/<[^>]*>?/gm, '').replace(/\s/g, "").replace(/\ /gm,''); + } + + get about(){ + return this.pagesService.rootPage.slug ===""?"Подробнее":"About" + } + + ngOnInit() { + } +} + diff --git a/src/tk023/css/_pages-section.scss b/src/tk023/css/_pages-section.scss index 0f20647..a984b9d 100644 --- a/src/tk023/css/_pages-section.scss +++ b/src/tk023/css/_pages-section.scss @@ -199,25 +199,20 @@ cards-section-items{ cards-section-item { - width: 252px; + width: 100%; cards-item-persons{ display: flex; flex-direction: column; - gap: 16px; + gap: 0; .image{ display: none; } - .title{ - font-family: PT Sans Narrow; - font-size: 24px; - font-style: normal; - font-weight: 700; - line-height: 32px; - letter-spacing: 0.24px; - color: var(--second); + .name{ + font-weight: 500; } - .subtitle{ - color: var(--dark); + .position{ + font-weight: 500; + color: var(--second); } .subtitle{ color: var(--dark);