add about page
This commit is contained in:
parent
ef3dbfa5c0
commit
ae9a51cdf5
@ -40,6 +40,11 @@ const contactsPageBreadcrumbs: BreadcrumbsType[] = [
|
||||
{ href: PAGE_LINK.CONTACTS, label: PAGE_LINK_LABEL[PAGE_LINK.CONTACTS] },
|
||||
];
|
||||
|
||||
const aboutPageBreadcrumbs: BreadcrumbsType[] = [
|
||||
{ href: PAGE_LINK.HOME, label: PAGE_LINK_LABEL[PAGE_LINK.HOME] },
|
||||
{ href: PAGE_LINK.ABOUT, label: PAGE_LINK_LABEL[PAGE_LINK.ABOUT] },
|
||||
];
|
||||
|
||||
export const getBreadcrumbs = (req: Request, res: Response) => {
|
||||
// @ts-ignore
|
||||
const { page } = req.body;
|
||||
@ -69,6 +74,10 @@ export const getBreadcrumbs = (req: Request, res: Response) => {
|
||||
return res.status(200).json(contactsPageBreadcrumbs);
|
||||
}
|
||||
|
||||
case PAGE_LINK.ABOUT: {
|
||||
return res.status(200).json(aboutPageBreadcrumbs);
|
||||
}
|
||||
|
||||
default:
|
||||
return res.status(404);
|
||||
}
|
||||
|
||||
@ -31,6 +31,9 @@ const faqDesktopImage = path.join(imageRootDir, 'faq/desktop.png');
|
||||
const contactsMobileImage = path.join(imageRootDir, 'contacts/mobile.png');
|
||||
const contactsDesktopImage = path.join(imageRootDir, 'contacts/desktop.png');
|
||||
|
||||
const aboutMobileImage = path.join(imageRootDir, 'about/mobile.png');
|
||||
const aboutDesktopImage = path.join(imageRootDir, 'about/desktop.png');
|
||||
|
||||
export const getTitleImage = (req: Request, res: Response<ImageType>) => {
|
||||
// @ts-ignore
|
||||
const { body } = req;
|
||||
@ -77,6 +80,26 @@ export const getTitleImage = (req: Request, res: Response<ImageType>) => {
|
||||
});
|
||||
}
|
||||
|
||||
case PAGE_LINK.ABOUT: {
|
||||
return res.status(200).json({
|
||||
alt: 'about',
|
||||
height: 584,
|
||||
mobileHeight: 700,
|
||||
mobilePosition: {
|
||||
left: -20,
|
||||
top: -175,
|
||||
},
|
||||
mobileSrc: aboutMobileImage,
|
||||
mobileWidth: 390,
|
||||
position: {
|
||||
left: 170,
|
||||
top: -155,
|
||||
},
|
||||
src: aboutDesktopImage,
|
||||
width: 1158,
|
||||
});
|
||||
}
|
||||
|
||||
default:
|
||||
return res.status(404);
|
||||
}
|
||||
|
||||
@ -38,6 +38,11 @@ const contactsTitleText = {
|
||||
title: 'Контактная информация',
|
||||
};
|
||||
|
||||
const aboutTitleText = {
|
||||
description: 'История открытия и развития Arkids Парка\\n и то, что мы делаем для Вас сегодня',
|
||||
title: 'Информация о парке',
|
||||
};
|
||||
|
||||
const contactsDescriptionText = [
|
||||
{
|
||||
description: 'Мы находимся в Торговом Центре «Ашан» (бывший «Атак») на 3 этаже. '
|
||||
@ -167,6 +172,16 @@ export const getTitle = (req: Request, res: Response) => {
|
||||
}
|
||||
}
|
||||
|
||||
case PAGE_LINK.ABOUT: {
|
||||
switch (section) {
|
||||
case TextSection.TITLE:
|
||||
return res.status(200).json(aboutTitleText);
|
||||
|
||||
default:
|
||||
return res.status(404);
|
||||
}
|
||||
}
|
||||
|
||||
default:
|
||||
return res.status(404);
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ export type PAGE_LINK_LABEL_TYPE = {
|
||||
};
|
||||
|
||||
export const PAGE_LINK_LABEL: PAGE_LINK_LABEL_TYPE = {
|
||||
[PAGE_LINK.ABOUT]: 'О нас',
|
||||
[PAGE_LINK.ABOUT]: 'Информация о парке',
|
||||
[PAGE_LINK.BIRTHDAY]: 'День Рождения',
|
||||
[PAGE_LINK.HOLIDAYS]: 'Праздники',
|
||||
[PAGE_LINK.HOME]: 'Главная',
|
||||
|
||||
BIN
static/images/title/about/desktop.png
Normal file
BIN
static/images/title/about/desktop.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 318 KiB |
BIN
static/images/title/about/mobile.png
Normal file
BIN
static/images/title/about/mobile.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 181 KiB |
Loading…
x
Reference in New Issue
Block a user