feat(quest): add plot modal

This commit is contained in:
Sergey Krylov 2023-06-28 08:49:20 +03:00
parent 1809d83cfd
commit b9e01a913e
20 changed files with 283 additions and 5 deletions

View File

@ -52,6 +52,21 @@ const egerPriceCardImage = path.join(imageRootDir, 'cards/price/desktop/eger.png
const faraonPriceCardImage = path.join(imageRootDir, 'cards/price/desktop/faraon.png'); const faraonPriceCardImage = path.join(imageRootDir, 'cards/price/desktop/faraon.png');
const multPriceCardImage = path.join(imageRootDir, 'cards/price/desktop/mult.png'); const multPriceCardImage = path.join(imageRootDir, 'cards/price/desktop/mult.png');
const egerPlotBatDesktopImage = path.join(imageRootDir, '/stories/eger/desktop/plot/bat.png');
const egerPlotBatMobileImage = path.join(imageRootDir, '/stories/eger/desktop/plot/batMobile.png');
const egerPlotBottleDesktopImage = path.join(imageRootDir, '/stories/eger/desktop/plot/bottle.png');
const egerPlotBottleMobileImage = path.join(imageRootDir, '/stories/eger/desktop/plot/bottleMobile.png');
const egerJarDesktopImage = path.join(imageRootDir, '/stories/eger/desktop/plot/jar.png');
const faraonPlotScrollDesktopImage = path.join(imageRootDir, '/stories/faraon/desktop/plot/scroll.png');
const faraonPlotKeysDesktopImage = path.join(imageRootDir, '/stories/faraon/desktop/plot/keys.png');
const multPlotPlantDesktopImage = path.join(imageRootDir, '/stories/mult/desktop/plot/plant.png');
const multPlotStarDesktopImage = path.join(imageRootDir, '/stories/mult/desktop/plot/star.png');
const multPlotTreeDesktopImage = path.join(imageRootDir, '/stories/mult/desktop/plot/tree.png');
const multPlotStarMobileImage = path.join(imageRootDir, '/stories/mult/mobile/plot/star.png');
export type QuestItemType = { export type QuestItemType = {
age: { age: {
styles?: object; styles?: object;
@ -113,6 +128,88 @@ const egerStories: StoryType[] = [
src: egerPlotMobileImage, src: egerPlotMobileImage,
}, },
modal: { modal: {
content: {
background: {
color: COLORS[ColorVariant.GRADIENT_PURPLE],
images: [
{
alt: 'летучая мышь',
height: 124,
mobileHeight: 70,
mobilePosition: {
left: 0,
top: -73,
},
mobileSrc: egerPlotBatMobileImage,
mobileWidth: 130,
position: {
bottom: -63,
right: -162,
},
src: egerPlotBatDesktopImage,
width: 170,
},
{
alt: 'bottle',
height: 180,
mobileHeight: 100,
mobilePosition: {
bottom: -88,
right: 22,
},
mobileSrc: egerPlotBottleMobileImage,
mobileWidth: 64,
position: {
left: -161,
top: -38,
},
src: egerPlotBottleDesktopImage,
width: 180,
},
{
alt: 'jar',
height: 127,
mobileHeight: 1,
mobileWidth: 1,
position: {
right: -102,
top: -30,
},
src: egerJarDesktopImage,
width: 100,
},
],
},
mobileText: 'Гуляя в этих местах, самое главное\n'
+ '- не упустить солнце.\\n'
+ 'Ведь в кромешной тьме прятаться негде\\n'
+ '\\n'
+ '«Разве что в этой скрипучей хижине»,\\n'
+ '- так думает каждый,\\n'
+ 'кто ночью оказывается здесь без ночлега\\n'
+ '\\n'
+ 'А зря! В беспроглядной холодной ночи\\n'
+ 'куда безопаснее, чем там\\n'
+ '\\n'
+ 'Ведь вы зашли на ночлег в дом,\\n'
+ 'где в одиноком долголетии справляется\\n'
+ 'со скукой сумасшедший дед\\n'
+ '\\n'
+ 'Он ужасно не любит незваных гостей,\\n'
+ 'а потому развлечет вас так,\\n'
+ 'что вы больше никогда сюда\\n'
+ 'не вернётесь',
text: 'Гуляя в этих местах, самое главное - не упустить солнце.\\n'
+ 'Ведь в кромешной тьме прятаться негде\\n\\n'
+ '«Разве что в этой скрипучей хижине», - так думает каждый,'
+ '\\nкто ночью оказывается здесь без ночлега\\n\\n'
+ 'А зря! В беспроглядной холодной ночи куда безопаснее, чем там\\n\\n'
+ 'Ведь вы зашли на ночлег в дом, где в одиноком долголетии\\n'
+ 'справляется со скукой сумасшедший дед\\n\\n'
+ 'Он ужасно не любит незваных гостей, а потому\\n'
+ 'развлечет вас так, что вы больше никогда сюда не вернётесь...',
title: 'Сюжет “Егерь”',
},
type: 'questPlot', type: 'questPlot',
}, },
title: 'Сюжет', title: 'Сюжет',
@ -217,6 +314,91 @@ const faraonStories: StoryType[] = [
src: faraonPlotMobileImage, src: faraonPlotMobileImage,
}, },
modal: { modal: {
content: {
background: {
color: 'linear-gradient(173deg, #FFB76F 0%, #FB5858 100%)',
images: [
{
alt: 'свиток',
height: 190,
mobileHeight: 1,
mobilePosition: {
left: -1000,
top: -1000,
},
mobileWidth: 1,
position: {
left: -180,
top: -37,
},
src: faraonPlotScrollDesktopImage,
width: 170,
},
{
alt: 'ключи',
height: 138,
mobileHeight: 80,
mobilePosition: {
bottom: -70,
right: 5,
},
mobileWidth: 60,
position: {
bottom: -75,
right: -120,
},
src: faraonPlotKeysDesktopImage,
width: 105,
},
{
alt: 'летучая мышь',
height: 124,
mobileHeight: 70,
mobilePosition: {
left: 0,
top: -75,
},
mobileSrc: egerPlotBatMobileImage,
mobileWidth: 130,
position: {
right: -149,
top: -75,
},
src: egerPlotBatDesktopImage,
width: 170,
},
],
},
mobileText: 'Гуляя в этих местах, самое главное\n'
+ '- не упустить солнце.\\n'
+ 'Ведь в кромешной тьме прятаться негде\\n'
+ '\\n'
+ '«Разве что в этой скрипучей хижине»,\\n'
+ '- так думает каждый,\\n'
+ 'кто ночью оказывается здесь без ночлега\\n'
+ '\\n'
+ 'А зря! В беспроглядной холодной ночи\\n'
+ 'куда безопаснее, чем там\\n'
+ '\\n'
+ 'Ведь вы зашли на ночлег в дом,\\n'
+ 'где в одиноком долголетии справляется\\n'
+ 'со скукой сумасшедший дед\\n'
+ '\\n'
+ 'Он ужасно не любит незваных гостей,\\n'
+ 'а потому развлечет вас так,\\n'
+ 'что вы больше никогда сюда\\n'
+ 'не вернётесь',
text: 'Гуляя в этих местах, самое главное - не упустить солнце.\\n'
+ 'Ведь в кромешной тьме прятаться негде\\n\\n'
+ '«Разве что в этой скрипучей хижине», - так думает каждый,'
+ '\\nкто ночью оказывается здесь без ночлега\\n\\n'
+ 'А зря! В беспроглядной холодной ночи куда безопаснее, чем там\\n\\n'
+ 'Ведь вы зашли на ночлег в дом, где в одиноком долголетии\\n'
+ 'справляется со скукой сумасшедший дед\\n\\n'
+ 'Он ужасно не любит незваных гостей, а потому\\n'
+ 'развлечет вас так, что вы больше никогда сюда не вернётесь...',
title: 'Сюжет “Фараон”',
},
type: 'questPlot', type: 'questPlot',
}, },
title: 'Сюжет', title: 'Сюжет',
@ -252,7 +434,6 @@ const faraonStories: StoryType[] = [
title: 'Фотографии\\n и видео', title: 'Фотографии\\n и видео',
}, },
]; ];
export const faraonQuest: QuestItemType = { export const faraonQuest: QuestItemType = {
age: { age: {
styles: { styles: {
@ -329,7 +510,7 @@ export const faraonQuest: QuestItemType = {
}, },
}; };
const stories: StoryType[] = [ const multStories: StoryType[] = [
{ {
id: uuid(), id: uuid(),
img: { img: {
@ -341,6 +522,91 @@ const stories: StoryType[] = [
src: multPlotMobileImage, src: multPlotMobileImage,
}, },
modal: { modal: {
content: {
background: {
color: COLORS[ColorVariant.GRADIENT_GREEN2],
images: [
{
alt: 'елка',
height: 205,
mobileHeight: 1,
mobilePosition: {
left: -1000,
top: -1000,
},
mobileWidth: 1,
position: {
left: -140,
top: -40,
},
src: multPlotTreeDesktopImage,
width: 134,
},
{
alt: 'звезды',
height: 150,
mobileHeight: 80,
mobilePosition: {
left: 20,
top: -60,
},
mobileSrc: multPlotStarMobileImage,
mobileWidth: 80,
position: {
right: -95,
top: -50,
},
src: multPlotStarDesktopImage,
width: 120,
},
{
alt: 'цветок',
height: 150,
mobileHeight: 114,
mobilePosition: {
bottom: -100,
right: 0,
},
mobileWidth: 115,
position: {
bottom: -75,
right: -152,
},
src: multPlotPlantDesktopImage,
width: 152,
},
],
},
mobileText: 'Гуляя в этих местах, самое главное\n'
+ '- не упустить солнце.\\n'
+ 'Ведь в кромешной тьме прятаться негде\\n'
+ '\\n'
+ '«Разве что в этой скрипучей хижине»,\\n'
+ '- так думает каждый,\\n'
+ 'кто ночью оказывается здесь без ночлега\\n'
+ '\\n'
+ 'А зря! В беспроглядной холодной ночи\\n'
+ 'куда безопаснее, чем там\\n'
+ '\\n'
+ 'Ведь вы зашли на ночлег в дом,\\n'
+ 'где в одиноком долголетии справляется\\n'
+ 'со скукой сумасшедший дед\\n'
+ '\\n'
+ 'Он ужасно не любит незваных гостей,\\n'
+ 'а потому развлечет вас так,\\n'
+ 'что вы больше никогда сюда\\n'
+ 'не вернётесь',
text: 'Гуляя в этих местах, самое главное - не упустить солнце.\\n'
+ 'Ведь в кромешной тьме прятаться негде\\n\\n'
+ '«Разве что в этой скрипучей хижине», - так думает каждый,'
+ '\\nкто ночью оказывается здесь без ночлега\\n\\n'
+ 'А зря! В беспроглядной холодной ночи куда безопаснее, чем там\\n\\n'
+ 'Ведь вы зашли на ночлег в дом, где в одиноком долголетии\\n'
+ 'справляется со скукой сумасшедший дед\\n\\n'
+ 'Он ужасно не любит незваных гостей, а потому\\n'
+ 'развлечет вас так, что вы больше никогда сюда не вернётесь...',
title: 'Сюжет “Мульт”',
},
type: 'questPlot', type: 'questPlot',
}, },
title: 'Сюжет', title: 'Сюжет',
@ -376,7 +642,6 @@ const stories: StoryType[] = [
title: 'Фотографии\\n и видео', title: 'Фотографии\\n и видео',
}, },
]; ];
export const multQuest: QuestItemType = { export const multQuest: QuestItemType = {
age: { age: {
text: '5+', text: '5+',
@ -417,7 +682,7 @@ export const multQuest: QuestItemType = {
price: 7500, price: 7500,
rating: 230, rating: 230,
statisticsBackground: COLORS[ColorVariant.GRADIENT_GREEN], statisticsBackground: COLORS[ColorVariant.GRADIENT_GREEN],
stories, stories: multStories,
time: { time: {
text: '60 минут', text: '60 минут',
}, },

View File

@ -4,6 +4,7 @@ import { Request, Response } from 'express';
import { v4 as uuid } from 'uuid'; import { v4 as uuid } from 'uuid';
import { PAGE_LINK } from '../../../constants'; import { PAGE_LINK } from '../../../constants';
import { ImageType } from '../image/controller';
const imageRootDir = 'static/images/stories/'; const imageRootDir = 'static/images/stories/';
@ -20,7 +21,15 @@ const example2 = path.join(imageRootDir, 'example2.jpg');
export type StoryFeedbackModalType = {}; export type StoryFeedbackModalType = {};
export type StoryGalleryModalType = {}; export type StoryGalleryModalType = {};
export type StoryInfoModalType = {}; export type StoryInfoModalType = {};
export type StoryQuestPlotModalType = {}; export type StoryQuestPlotModalType = {
background: {
color: string;
images: ImageType[];
};
mobileText: string;
text: string;
title: string;
};
export type StoryModalContent = StoryFeedbackModalType | StoryGalleryModalType | StoryInfoModalType | StoryQuestPlotModalType; export type StoryModalContent = StoryFeedbackModalType | StoryGalleryModalType | StoryInfoModalType | StoryQuestPlotModalType;
export type StoryModalType = 'faq' | 'feedback' | 'gallery' | 'info' | 'questPlot'; export type StoryModalType = 'faq' | 'feedback' | 'gallery' | 'info' | 'questPlot';

View File

@ -223,6 +223,8 @@ export enum ColorVariant {
GRADIENT_YELLOW, GRADIENT_YELLOW,
GRADIENT_ORANGE, GRADIENT_ORANGE,
GRADIENT_GREEN, GRADIENT_GREEN,
GRADIENT_GREEN2,
GRADIENT_PURPLE,
GREEN, GREEN,
GREY, GREY,
ORANGE, ORANGE,
@ -246,6 +248,8 @@ export const COLORS: ColorType = {
[ColorVariant.GRADIENT_YELLOW]: 'linear-gradient(154.56deg, #FDF041 -35.9%, #FBAB01 129.39%)', [ColorVariant.GRADIENT_YELLOW]: 'linear-gradient(154.56deg, #FDF041 -35.9%, #FBAB01 129.39%)',
[ColorVariant.GRADIENT_ORANGE]: 'linear-gradient(135.23deg, #FFB76F 20.94%, #FB5858 75.76%)', [ColorVariant.GRADIENT_ORANGE]: 'linear-gradient(135.23deg, #FFB76F 20.94%, #FB5858 75.76%)',
[ColorVariant.GRADIENT_GREEN]: 'linear-gradient(120.58deg, #E9CA26 12.53%, #33CC99 92.98%)', [ColorVariant.GRADIENT_GREEN]: 'linear-gradient(120.58deg, #E9CA26 12.53%, #33CC99 92.98%)',
[ColorVariant.GRADIENT_GREEN2]: 'linear-gradient(142deg, #E9CA26 6.25%, #3C9 100%)',
[ColorVariant.GRADIENT_PURPLE]: 'linear-gradient(142deg, #968CE0 0%, #3748AA 100%)',
[ColorVariant.GREEN]: '#15B555', [ColorVariant.GREEN]: '#15B555',
[ColorVariant.GREY]: '#F1F7FD', [ColorVariant.GREY]: '#F1F7FD',
[ColorVariant.ORANGE]: '#FFB76F', [ColorVariant.ORANGE]: '#FFB76F',

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 514 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 231 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB