diff --git a/src/api/routes/breadcrumbs/controller.ts b/src/api/routes/breadcrumbs/controller.ts index 314d864..c402f2d 100644 --- a/src/api/routes/breadcrumbs/controller.ts +++ b/src/api/routes/breadcrumbs/controller.ts @@ -35,6 +35,11 @@ const faqPageBreadcrumbs: BreadcrumbsType[] = [ { href: PAGE_LINK.FAQ, label: PAGE_LINK_LABEL[PAGE_LINK.FAQ] }, ]; +const contactsPageBreadcrumbs: BreadcrumbsType[] = [ + { href: PAGE_LINK.HOME, label: PAGE_LINK_LABEL[PAGE_LINK.HOME] }, + { href: PAGE_LINK.CONTACTS, label: PAGE_LINK_LABEL[PAGE_LINK.CONTACTS] }, +]; + export const getBreadcrumbs = (req: Request, res: Response) => { // @ts-ignore const { page } = req.body; @@ -60,6 +65,10 @@ export const getBreadcrumbs = (req: Request, res: Response) => { return res.status(200).json(faqPageBreadcrumbs); } + case PAGE_LINK.CONTACTS: { + return res.status(200).json(contactsPageBreadcrumbs); + } + default: return res.status(404); } diff --git a/src/api/routes/image/controller.ts b/src/api/routes/image/controller.ts index ead0883..a879a6f 100644 --- a/src/api/routes/image/controller.ts +++ b/src/api/routes/image/controller.ts @@ -24,9 +24,13 @@ export type ImageType = { }; const imageRootDir = 'static/images/title/'; + const faqMobileImage = path.join(imageRootDir, 'faq/mobile.png'); const faqDesktopImage = path.join(imageRootDir, 'faq/desktop.png'); +const contactsMobileImage = path.join(imageRootDir, 'contacts/mobile.png'); +const contactsDesktopImage = path.join(imageRootDir, 'contacts/desktop.png'); + export const getTitleImage = (req: Request, res: Response) => { // @ts-ignore const { body } = req; @@ -53,6 +57,26 @@ export const getTitleImage = (req: Request, res: Response) => { }); } + case PAGE_LINK.CONTACTS: { + return res.status(200).json({ + alt: 'contacts', + height: 584, + mobileHeight: 700, + mobilePosition: { + left: -20, + top: -175, + }, + mobileSrc: contactsMobileImage, + mobileWidth: 390, + position: { + left: 75, + top: -160, + }, + src: contactsDesktopImage, + width: 1158, + }); + } + default: return res.status(404); } diff --git a/src/api/routes/text/controller.ts b/src/api/routes/text/controller.ts index 0f18e96..cc839df 100644 --- a/src/api/routes/text/controller.ts +++ b/src/api/routes/text/controller.ts @@ -1,4 +1,5 @@ import { Request, Response } from 'express'; +import { v4 as uuid } from 'uuid'; import { PAGE_LINK, TextSection } from '../../../constants'; @@ -32,6 +33,51 @@ const faqTitleText = { title: 'Часто задаваемые вопросы', }; +const contactsTitleText = { + description: 'Раздел с подробной информацией о способах связи. Если у Вас остались вопросы, оставьте заявку на обратный звонок', + title: 'Контактная информация', +}; + +const contactsDescriptionText = [ + { + description: 'Мы находимся в Торговом Центре «Ашан» (бывший «Атак») на 3 этаже. ' + + 'Ближайшие ориентиры: пожарная станция, стадион «Труд», кинотеатр «Родина»', + id: uuid(), + title: 'Как добраться', + }, + { + description: 'На территории Торгового Центра расположена стихийная парковка. ' + + 'Также автомобиль можно оставить около «Пятерочки» через дорогу', + id: uuid(), + title: 'Гостям на личном авто', + }, + { + description: 'На автобусе до остановки «кинотеатр «Родина». ' + + 'Далее пешком 5 минут по улице Клемента Готвальда до серого 8-этажного здания', + id: uuid(), + title: 'Своим ходом', + }, +]; + +const contactsInfo = { + address: { + city: 'Подольск', + street: 'ул. Клемента Готвальда, 6В\\n Этаж 3, помещения 16, 18', + }, + links: { + mail: 'arkids@park.ru', + vk: 'https://vk.com/armanty', + }, + phone: { + phones: [ + '+7 (926) 982-14-94', + '+7 (925) 720-56-54', + '+7 (966) 337-96-94', + ], + schedule: 'с 9:00 до 24:00', + }, +}; + const parkInfo = { text: '-интерактивный парк нового поколения,\n' + ' объединяющий популярные услуги\n' @@ -105,6 +151,22 @@ export const getTitle = (req: Request, res: Response) => { } } + case PAGE_LINK.CONTACTS: { + switch (section) { + case TextSection.TITLE: + return res.status(200).json(contactsTitleText); + + case TextSection.DESCRIPTION: + return res.status(200).json(contactsDescriptionText); + + case TextSection.INFO: + return res.status(200).json(contactsInfo); + + default: + return res.status(404); + } + } + default: return res.status(404); } diff --git a/src/constants/index.ts b/src/constants/index.ts index b94866d..9915f63 100644 --- a/src/constants/index.ts +++ b/src/constants/index.ts @@ -51,6 +51,8 @@ export const PAGE_LINK_LABEL: PAGE_LINK_LABEL_TYPE = { }; export enum TextSection { + DESCRIPTION = 'description', + INFO = 'info', PARK = 'parkInfo', TITLE = 'title', } diff --git a/static/images/title/contacts/desktop.png b/static/images/title/contacts/desktop.png new file mode 100644 index 0000000..75f8dc8 Binary files /dev/null and b/static/images/title/contacts/desktop.png differ diff --git a/static/images/title/contacts/mobile.png b/static/images/title/contacts/mobile.png new file mode 100644 index 0000000..8f52e94 Binary files /dev/null and b/static/images/title/contacts/mobile.png differ