add contacts page
This commit is contained in:
parent
cdbe10fcc0
commit
ef3dbfa5c0
@ -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);
|
||||
}
|
||||
|
||||
@ -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<ImageType>) => {
|
||||
// @ts-ignore
|
||||
const { body } = req;
|
||||
@ -53,6 +57,26 @@ export const getTitleImage = (req: Request, res: Response<ImageType>) => {
|
||||
});
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -51,6 +51,8 @@ export const PAGE_LINK_LABEL: PAGE_LINK_LABEL_TYPE = {
|
||||
};
|
||||
|
||||
export enum TextSection {
|
||||
DESCRIPTION = 'description',
|
||||
INFO = 'info',
|
||||
PARK = 'parkInfo',
|
||||
TITLE = 'title',
|
||||
}
|
||||
|
||||
BIN
static/images/title/contacts/desktop.png
Normal file
BIN
static/images/title/contacts/desktop.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 308 KiB |
BIN
static/images/title/contacts/mobile.png
Normal file
BIN
static/images/title/contacts/mobile.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 180 KiB |
Loading…
x
Reference in New Issue
Block a user