diff --git a/src/api/routes/breadcrumbs/controller.ts b/src/api/routes/breadcrumbs/controller.ts index 57d15c9..42ddc81 100644 --- a/src/api/routes/breadcrumbs/controller.ts +++ b/src/api/routes/breadcrumbs/controller.ts @@ -45,6 +45,12 @@ const aboutPageBreadcrumbs: BreadcrumbsType[] = [ { href: PAGE_LINK.ABOUT, label: PAGE_LINK_LABEL[PAGE_LINK.ABOUT] }, ]; +const masterClassesPageBreadcrumbs: BreadcrumbsType[] = [ + { href: PAGE_LINK.HOME, label: PAGE_LINK_LABEL[PAGE_LINK.HOME] }, + { href: PAGE_LINK.SERVICES, label: PAGE_LINK_LABEL[PAGE_LINK.SERVICES] }, + { href: PAGE_LINK.MASTER_CLASSES, label: PAGE_LINK_LABEL[PAGE_LINK.MASTER_CLASSES] }, +]; + export const getBreadcrumbs = (req: Request, res: Response) => { // @ts-ignore const { page } = req.body; @@ -78,6 +84,10 @@ export const getBreadcrumbs = (req: Request, res: Response) => { return res.status(200).json(aboutPageBreadcrumbs); } + case PAGE_LINK.MASTER_CLASSES: { + return res.status(200).json(masterClassesPageBreadcrumbs); + } + default: return res.status(404); } diff --git a/src/api/routes/faq/controller.ts b/src/api/routes/faq/controller.ts index 7131060..291ef7f 100644 --- a/src/api/routes/faq/controller.ts +++ b/src/api/routes/faq/controller.ts @@ -70,6 +70,25 @@ const outdoorsQuestions: QuestionType[] = [ }, ]; +const masterClassesQuestions: QuestionType[] = [ + { + answer: 'Ответ на вопрос как забронировать зал для проведения выездного праздника?', + id: uuid(), + question: 'Как забронировать зал для проведения Дня рождения?', + }, + { + answer: 'Мы не требуем предоплату. Для бронирования мероприятия достаточно Вашего номера телефона. ' + + 'Мероприятие оплачивается на месте перед его началом.', + id: uuid(), + question: 'Как производится оплата мероприятия?', + }, + { + answer: 'Ответ на вопрос какое максимальное количество детей допустимо на празднике?', + id: uuid(), + question: 'Какое максимальное количество детей допустимо на празднике?', + }, +]; + type QuestionsType = { categories: QuestionCategoryType[]; group: string; @@ -93,6 +112,10 @@ export const getFaq = (req: Request, res: Response) => { return res.status(200).json(outdoorsQuestions); } + case PAGE_LINK.MASTER_CLASSES: { + return res.status(200).json(masterClassesQuestions); + } + case PAGE_LINK.QUESTS: { switch (id) { case 'eger': diff --git a/src/api/routes/image/controller.ts b/src/api/routes/image/controller.ts index 94ff73f..599dded 100644 --- a/src/api/routes/image/controller.ts +++ b/src/api/routes/image/controller.ts @@ -34,6 +34,9 @@ const contactsDesktopImage = path.join(imageRootDir, 'contacts/desktop.png'); const aboutMobileImage = path.join(imageRootDir, 'about/mobile.png'); const aboutDesktopImage = path.join(imageRootDir, 'about/desktop.png'); +const masterClassesMobileImage = path.join(imageRootDir, 'master-classes/mobile.png'); +const masterClassesDesktopImage = path.join(imageRootDir, 'master-classes/desktop.png'); + export const getTitleImage = (req: Request, res: Response) => { // @ts-ignore const { body } = req; @@ -100,6 +103,14 @@ export const getTitleImage = (req: Request, res: Response) => { }); } + case PAGE_LINK.MASTER_CLASSES: { + return res.status(200).json({ + alt: 'master-classes', + mobileSrc: masterClassesMobileImage, + src: masterClassesDesktopImage, + }); + } + default: return res.status(404); } diff --git a/src/api/routes/services/controller.ts b/src/api/routes/services/controller.ts index c4fa597..2c0633b 100644 --- a/src/api/routes/services/controller.ts +++ b/src/api/routes/services/controller.ts @@ -1,9 +1,28 @@ +import path from 'path'; + import { Request, Response } from 'express'; +import { v4 as uuid } from 'uuid'; import { - PAGE_LINK, SERVICE, servicesList, ServiceType, + PAGE_LINK, SERVICE, ServiceItemType, servicesList, ServiceType, } from '../../../constants'; +const imageRootDir = 'static/images/'; + +const cakesImage = path.join(imageRootDir, 'master-classes/desktop/cakes.png'); +const cupImage = path.join(imageRootDir, 'master-classes/desktop/cup.png'); +const cutImage = path.join(imageRootDir, 'master-classes/desktop/cut.png'); +const fishImage = path.join(imageRootDir, 'master-classes/desktop/fish.png'); +const paintImage = path.join(imageRootDir, 'master-classes/desktop/paint.png'); +const shopImage = path.join(imageRootDir, 'master-classes/desktop/shop.png'); + +const cakesMobileImage = path.join(imageRootDir, 'master-classes/mobile/cakes.png'); +const cupImMobileImage = path.join(imageRootDir, 'master-classes/mobile/cup.png'); +const cutImMobileImage = path.join(imageRootDir, 'master-classes/mobile/cut.png'); +const fishIMobileImage = path.join(imageRootDir, 'master-classes/mobile/fish.png'); +const paintMobileImage = path.join(imageRootDir, 'master-classes/mobile/paint.png'); +const shopIMobileImage = path.join(imageRootDir, 'master-classes/mobile/shop.png'); + const birthdayPageServices: ServiceType[] = [ servicesList[SERVICE.QUEST], servicesList[SERVICE.HALL], @@ -42,6 +61,227 @@ const outdoorsPageServices: ServiceType[] = [ servicesList[SERVICE.FACE_PAINTING], ]; +const masterClassItems: ServiceItemType[] = [ + { + age: { + text: '5+', + }, + description: 'Пожалуй, самый вкусный кулинарный мастер-класс. Роспись имбирно-медовых пряников -\n' + + 'очень увлекательный процесс, во время которого каждый ребенок сможет почувствовать\n' + + 'себя настоящим кондитером. Цветная глазурь, корица, разнообразные кондитерские посыпки\n' + + 'и творческая атмосфера помогут детям сотворить кулинарный шедевр', + id: uuid(), + image: { + alt: 'Роспись пряников', + height: 270, + mobileHeight: 260, + mobilePosition: { + left: 10, + top: -35, + }, + mobileSrc: cakesMobileImage, + mobileWidth: 310, + position: { + left: -10, + top: -30, + }, + src: cakesImage, + width: 270, + }, + partySize: { + max: 30, + min: 4, + }, + price: 6900, + priceDescription: 'Цена за группу до 12 человек, далее +500 ₽/участник', + time: { + text: '60 минут', + }, + title: 'Роспись пряников', + variant: 'primary', + }, + { + age: { + text: '5+', + }, + description: 'Творческий мастер-класс, где ребенок сможет показать всю свою индивидуальность\n' + + 'и дизайнерские способности. С помощью маркеров и специальных глиттерных блёсток\n' + + 'дети создают свою уникальную сумку-шоппер', + id: uuid(), + image: { + alt: 'Роспись сумок', + height: 268, + mobileHeight: 240, + mobilePosition: { + left: 27, + top: -47, + }, + mobileSrc: shopIMobileImage, + mobileWidth: 270, + position: { + left: 32, + top: -32, + }, + src: shopImage, + width: 186, + }, + partySize: { + max: 30, + min: 4, + }, + price: 6900, + priceDescription: 'Цена за группу до 12 человек, далее +500 ₽/участник', + time: { + text: '60 минут', + }, + title: 'Роспись сумок', + variant: 'secondary', + }, + { + age: { + text: '5+', + }, + description: 'Знаете ли Вы, что из глины и цветных красителей можно сотворить настоящие шедевры?\n' + + 'Декор из глины - интересный и необычный мастер-класс, который развивает мелкую моторику\n' + + 'и воображение', + id: uuid(), + image: { + alt: 'Роспись изделий из глины', + height: 250, + mobileHeight: 206, + mobilePosition: { + left: 27, + top: -47, + }, + mobileSrc: fishIMobileImage, + mobileWidth: 334, + position: { + left: 10, + top: -28, + }, + src: fishImage, + width: 285, + }, + partySize: { + max: 30, + min: 4, + }, + price: 6900, + priceDescription: 'Цена за группу до 12 человек, далее +500 ₽/участник', + time: { + text: '60 минут', + }, + title: 'Роспись изделий из глины', + variant: 'tertiary', + }, + { + age: { + text: '5+', + }, + description: 'Здесь будет описание мастер-класса “Объёмная аппликация” по типу описания\n' + + 'мастер-класса “Роспись пряников”', + id: uuid(), + image: { + alt: 'Объёмная аппликация', + height: 246, + mobileHeight: 220, + mobilePosition: { + left: 30, + top: -24, + }, + mobileSrc: cutImMobileImage, + mobileWidth: 290, + position: { + left: 14, + top: -20, + }, + src: cutImage, + width: 248, + }, + partySize: { + max: 30, + min: 4, + }, + price: 6900, + priceDescription: 'Цена за группу до 12 человек, далее +500 ₽/участник', + time: { + text: '60 минут', + }, + title: 'Объёмная аппликация', + variant: 'quaternary', + }, + { + age: { + text: '5+', + }, + description: 'Здесь будет описание мастер-класса “Роспись деревянных изделий” по типу описания мастер-класса “Роспись пряников”', + id: uuid(), + image: { + alt: 'Роспись деревянных изделий', + height: 240, + mobileHeight: 196, + mobilePosition: { + left: 1, + top: -18, + }, + mobileSrc: paintMobileImage, + mobileWidth: 314, + position: { + left: 24, + top: -20, + }, + src: paintImage, + width: 216, + }, + partySize: { + max: 30, + min: 4, + }, + price: 6900, + priceDescription: 'Цена за группу до 12 человек, далее +500 ₽/участник', + time: { + text: '60 минут', + }, + title: 'Роспись деревянных изделий', + variant: 'quinary', + }, + { + age: { + text: '5+', + }, + description: 'Здесь будет описание мастер-класса “Роспись деревянных изделий” по типу описания мастер-класса “Роспись пряников”', + id: uuid(), + image: { + alt: 'Декупаж', + height: 226, + mobileHeight: 200, + mobilePosition: { + left: 15, + top: -20, + }, + mobileSrc: cupImMobileImage, + mobileWidth: 300, + position: { + left: -18, + top: -15, + }, + src: cupImage, + width: 280, + }, + partySize: { + max: 30, + min: 4, + }, + price: 6900, + priceDescription: 'Цена за группу до 12 человек, далее +500 ₽/участник', + time: { + text: '60 минут', + }, + title: 'Декупаж', + variant: 'hexadecimal', + }, +]; + export const getServices = (req: Request, res: Response) => { // @ts-ignore const { page } = req.body; @@ -59,6 +299,10 @@ export const getServices = (req: Request, res: Response) => { return res.status(200).json(outdoorsPageServices); } + case PAGE_LINK.MASTER_CLASSES: { + return res.status(200).json(masterClassItems); + } + default: return res.status(404); } diff --git a/src/api/routes/statistic/controller.ts b/src/api/routes/statistic/controller.ts index 2f0e2b8..793be16 100644 --- a/src/api/routes/statistic/controller.ts +++ b/src/api/routes/statistic/controller.ts @@ -1,8 +1,10 @@ import * as path from 'path'; import { Request, Response } from 'express'; +import { v4 as uuid } from 'uuid'; import { PAGE_LINK } from '../../../constants'; +import { ImageType } from '../image/controller'; const imageRootDir = 'static/images/information/statistics'; @@ -19,6 +21,9 @@ const KeysDesktopImg = path.join(imageRootDir, 'desktop/quests/eger/keys.png'); const MapDesktopImg = path.join(imageRootDir, 'desktop/quests/eger/map.png'); const RateDesktopImg = path.join(imageRootDir, 'desktop/rate.png'); const StarDesktopImg = path.join(imageRootDir, 'desktop/star.png'); +const MasterClassDecorImg = path.join(imageRootDir, 'desktop/master-classes/decoration.png'); +const MasterClassLeadingImg = path.join(imageRootDir, 'desktop/master-classes/leading.png'); +const MasterClassMaterialsImg = path.join(imageRootDir, 'desktop/master-classes/materials.png'); const CupMobileImg = path.join(imageRootDir, 'mobile/cup.png'); const DecorationMobileImg = path.join(imageRootDir, 'mobile/decoration.png'); @@ -35,6 +40,9 @@ const KeysMobileImg = path.join(imageRootDir, 'mobile/quests/eger/keys.png'); const MapMobileImg = path.join(imageRootDir, 'mobile/quests/eger/map.png'); const RateMobileImg = path.join(imageRootDir, 'mobile/rate.png'); const StarMobileImg = path.join(imageRootDir, 'mobile/star.png'); +const MasterClassDecorMobileImg = path.join(imageRootDir, 'mobile/master-classes/decoration.png'); +const MasterClassLeadingMobileImg = path.join(imageRootDir, 'mobile/master-classes/leading.png'); +const MasterClassMaterialsMobileImg = path.join(imageRootDir, 'mobile/master-classes/materials.png'); export type StatisticsItem = { img?: { @@ -69,6 +77,11 @@ export type StatisticsItem = { text: string; title: string; }; +export type MasterClassStatisticItem = { + id: string; + image: ImageType; + text: string; +}; const birthdayItems: StatisticsItem[] = [ { @@ -898,6 +911,48 @@ const multQuestItems: StatisticsItem[] = [ }, ]; +const masterClassItems: MasterClassStatisticItem[] = [ + { + id: uuid(), + image: { + alt: 'Качественные материалы для творчества', + height: 189, + mobileHeight: 127, + mobileSrc: MasterClassMaterialsMobileImg, + mobileWidth: 147, + src: MasterClassMaterialsImg, + width: 219, + }, + text: 'Качественные материалы\\n для творчества', + }, + { + id: uuid(), + image: { + alt: 'Красивый реквизит, который понравится детям', + height: 195, + mobileHeight: 139, + mobileSrc: MasterClassDecorMobileImg, + mobileWidth: 128, + src: MasterClassDecorImg, + width: 180, + }, + text: 'Красивый реквизит,\\n который понравится детям', + }, + { + id: uuid(), + image: { + alt: 'Профессиональный ведущий с опытом', + height: 210, + mobileHeight: 125, + mobileSrc: MasterClassLeadingMobileImg, + mobileWidth: 172, + src: MasterClassLeadingImg, + width: 288, + }, + text: 'Профессиональный\\n ведущий с опытом', + }, +]; + export const getStatistics = (req: Request, res: Response) => { // @ts-ignore const { id, page } = req.body; @@ -935,6 +990,10 @@ export const getStatistics = (req: Request, res: Response) => { } } + case PAGE_LINK.MASTER_CLASSES: { + return res.status(200).json(masterClassItems); + } + default: return res.status(404); } diff --git a/src/api/routes/text/controller.ts b/src/api/routes/text/controller.ts index 9852e35..14a7eb6 100644 --- a/src/api/routes/text/controller.ts +++ b/src/api/routes/text/controller.ts @@ -43,6 +43,19 @@ const aboutTitleText = { title: 'Информация о парке', }; +const masterClassesTitleText = { + description: 'Сделайте праздник ярче, добавив фирменный мастер-класс\\n ' + + 'к любой комбо-программе из категорий «День Рождения»,\\n «Выпускной», «Выездной праздник»', + title: 'Мастер-классы', +}; + +const masterClassesInfo = [ + 'Знакомимся и проводим общий инструктаж', + 'Рассказываем и показываем, как пользоваться реквизитом', + 'Начинаем процесс изготовления в выбранной тематике', + 'Упаковываем готовое изделие, которое ребенок заберёт с собой', +]; + const contactsDescriptionText = [ { description: 'Мы находимся в Торговом Центре «Ашан» (бывший «Атак») на 3 этаже. ' @@ -182,6 +195,19 @@ export const getTitle = (req: Request, res: Response) => { } } + case PAGE_LINK.MASTER_CLASSES: { + switch (section) { + case TextSection.TITLE: + return res.status(200).json(masterClassesTitleText); + + case TextSection.INFO: + return res.status(200).json(masterClassesInfo); + + default: + return res.status(404); + } + } + default: return res.status(404); } diff --git a/src/constants/index.ts b/src/constants/index.ts index 0b2e642..d652855 100644 --- a/src/constants/index.ts +++ b/src/constants/index.ts @@ -1,3 +1,5 @@ +import { ImageType } from '../api/routes/image/controller'; + export const enum PAGE_LINK { ABOUT = '/about', BIRTHDAY = '/holidays/birthday', @@ -12,14 +14,15 @@ export const enum PAGE_LINK { GRADUATION = '/holidays/graduation', HOLIDAYS = '/holidays', HOME = '/', - MASTER_CLASSES = '/master_classes', + MASTER_CLASSES = '/services/master-classes', NEW_YEAR = '/new_year', OUTDOORS = '/holidays/outdoors', PARTNERS = '/partners', PRICE = '/price', QUESTS = '/quests', RENT = '/rent', - SERVICE = '/service', + SERVICES = '/services', + SHOW_PROGRAMS = '/services/show-programs', } export type PAGE_LINK_LABEL_TYPE = { @@ -47,7 +50,8 @@ export const PAGE_LINK_LABEL: PAGE_LINK_LABEL_TYPE = { [PAGE_LINK.PRICE]: 'Цены', [PAGE_LINK.QUESTS]: 'Квесты', [PAGE_LINK.RENT]: 'Аренда залов', - [PAGE_LINK.SERVICE]: 'Услуги для праздника', + [PAGE_LINK.SERVICES]: 'Услуги', + [PAGE_LINK.SHOW_PROGRAMS]: 'Шоу программы', }; export enum TextSection { @@ -83,6 +87,19 @@ export type ServiceType = { tooltip?: boolean; }; +export type ServiceItemType = { + age: { text: string }; + description: string; + id: string; + image: ImageType; + partySize: { max: number; min: number }; + price: number; + priceDescription: string; + time: { text: string }; + title: string; + variant?: 'hexadecimal' | 'primary' | 'quaternary' | 'quinary' | 'secondary' | 'tertiary'; +}; + export enum ApiRoute { BREADCRUMBS = '/breadcrumbs', FAQ = '/faq', diff --git a/static/images/information/statistics/desktop/master-classes/decoration.png b/static/images/information/statistics/desktop/master-classes/decoration.png new file mode 100644 index 0000000..9bfaee3 Binary files /dev/null and b/static/images/information/statistics/desktop/master-classes/decoration.png differ diff --git a/static/images/information/statistics/desktop/master-classes/leading.png b/static/images/information/statistics/desktop/master-classes/leading.png new file mode 100644 index 0000000..db52969 Binary files /dev/null and b/static/images/information/statistics/desktop/master-classes/leading.png differ diff --git a/static/images/information/statistics/desktop/master-classes/materials.png b/static/images/information/statistics/desktop/master-classes/materials.png new file mode 100644 index 0000000..0934a97 Binary files /dev/null and b/static/images/information/statistics/desktop/master-classes/materials.png differ diff --git a/static/images/information/statistics/mobile/master-classes/decoration.png b/static/images/information/statistics/mobile/master-classes/decoration.png new file mode 100644 index 0000000..028d40e Binary files /dev/null and b/static/images/information/statistics/mobile/master-classes/decoration.png differ diff --git a/static/images/information/statistics/mobile/master-classes/leading.png b/static/images/information/statistics/mobile/master-classes/leading.png new file mode 100644 index 0000000..49289d1 Binary files /dev/null and b/static/images/information/statistics/mobile/master-classes/leading.png differ diff --git a/static/images/information/statistics/mobile/master-classes/materials.png b/static/images/information/statistics/mobile/master-classes/materials.png new file mode 100644 index 0000000..3424d5e Binary files /dev/null and b/static/images/information/statistics/mobile/master-classes/materials.png differ diff --git a/static/images/master-classes/desktop/cakes.png b/static/images/master-classes/desktop/cakes.png new file mode 100644 index 0000000..dab21df Binary files /dev/null and b/static/images/master-classes/desktop/cakes.png differ diff --git a/static/images/master-classes/desktop/cup.png b/static/images/master-classes/desktop/cup.png new file mode 100644 index 0000000..4c271c2 Binary files /dev/null and b/static/images/master-classes/desktop/cup.png differ diff --git a/static/images/master-classes/desktop/cut.png b/static/images/master-classes/desktop/cut.png new file mode 100644 index 0000000..41e0468 Binary files /dev/null and b/static/images/master-classes/desktop/cut.png differ diff --git a/static/images/master-classes/desktop/fish.png b/static/images/master-classes/desktop/fish.png new file mode 100644 index 0000000..9fc8782 Binary files /dev/null and b/static/images/master-classes/desktop/fish.png differ diff --git a/static/images/master-classes/desktop/paint.png b/static/images/master-classes/desktop/paint.png new file mode 100644 index 0000000..c941a75 Binary files /dev/null and b/static/images/master-classes/desktop/paint.png differ diff --git a/static/images/master-classes/desktop/shop.png b/static/images/master-classes/desktop/shop.png new file mode 100644 index 0000000..8f09bea Binary files /dev/null and b/static/images/master-classes/desktop/shop.png differ diff --git a/static/images/master-classes/mobile/cakes.png b/static/images/master-classes/mobile/cakes.png new file mode 100644 index 0000000..15e7a17 Binary files /dev/null and b/static/images/master-classes/mobile/cakes.png differ diff --git a/static/images/master-classes/mobile/cup.png b/static/images/master-classes/mobile/cup.png new file mode 100644 index 0000000..a148367 Binary files /dev/null and b/static/images/master-classes/mobile/cup.png differ diff --git a/static/images/master-classes/mobile/cut.png b/static/images/master-classes/mobile/cut.png new file mode 100644 index 0000000..743eaa1 Binary files /dev/null and b/static/images/master-classes/mobile/cut.png differ diff --git a/static/images/master-classes/mobile/fish.png b/static/images/master-classes/mobile/fish.png new file mode 100644 index 0000000..8088cf6 Binary files /dev/null and b/static/images/master-classes/mobile/fish.png differ diff --git a/static/images/master-classes/mobile/paint.png b/static/images/master-classes/mobile/paint.png new file mode 100644 index 0000000..bec5fae Binary files /dev/null and b/static/images/master-classes/mobile/paint.png differ diff --git a/static/images/master-classes/mobile/shop.png b/static/images/master-classes/mobile/shop.png new file mode 100644 index 0000000..d583c35 Binary files /dev/null and b/static/images/master-classes/mobile/shop.png differ diff --git a/static/images/title/master-classes/desktop.png b/static/images/title/master-classes/desktop.png new file mode 100644 index 0000000..607e160 Binary files /dev/null and b/static/images/title/master-classes/desktop.png differ diff --git a/static/images/title/master-classes/mobile.png b/static/images/title/master-classes/mobile.png new file mode 100644 index 0000000..e325fc2 Binary files /dev/null and b/static/images/title/master-classes/mobile.png differ