Compare commits

..

No commits in common. "1c8348dee54d4d6a391367fa93c280b2b509d85e" and "116e883e91460958f5f8458a91639ba418da8426" have entirely different histories.

52 changed files with 1038 additions and 1522 deletions

57
Jenkinsfile vendored
View File

@ -1,57 +0,0 @@
pipeline {
agent {
docker {
image 'node:20'
}
}
stages {
stage('install (ci)') {
steps {
sh 'node -v'
sh 'npm -v'
script {
String tag = sh(returnStdout: true, script: 'git tag --contains').trim()
String branchName = sh(returnStdout: true, script: 'git rev-parse --abbrev-ref HEAD').trim()
String commit = sh(returnStdout: true, script: 'git log -1 --oneline').trim()
String commitMsg = commit.substring(commit.indexOf(' ')).trim()
if (tag) {
currentBuild.displayName = "#${BUILD_NUMBER}, tag ${tag}"
} else {
currentBuild.displayName = "#${BUILD_NUMBER}, branch ${branchName}"
}
String author = sh(returnStdout: true, script: "git log -1 --pretty=format:'%an'").trim()
currentBuild.description = "${author}<br />${commitMsg}"
echo 'starting installing'
sh 'npm ci'
}
}
}
stage('checks') {
parallel {
stage('eslint') {
steps {
sh 'npm run eslint'
}
}
stage('build') {
steps {
sh 'npm run build'
}
}
}
}
stage('clean-all') {
steps {
sh 'rm -rf .[!.]*'
sh 'rm -rf ./*'
sh 'ls -a'
}
}
}
}

View File

@ -1,33 +1,5 @@
{ {
"dry-wash.arm.master.add": "Добавить", "dry-wash.arm.masters.add": "Добавить",
"dry-wash.arm.order.title": "Заказы", "dry-wash.order.status.progress": "Выполняется",
"dry-wash.arm.order.status.progress": "Выполняется", "dry-wash.order.status.complete": "Завершено"
"dry-wash.arm.order.status.complete": "Завершено",
"dry-wash.arm.order.status.pending": "в ожидании",
"dry-wash.arm.order.status.working": "В работе",
"dry-wash.arm.order.status.canceled": "Отменено",
"dry-wash.arm.order.status.placeholder": "Выберите статус",
"dry-wash.arm.order.table.header.carNumber": "Номер машины",
"dry-wash.arm.order.table.header.washingTime": "Время мойки",
"dry-wash.arm.order.table.header.orderDate": "Дата заказа",
"dry-wash.arm.order.table.header.status": "Статус",
"dry-wash.arm.order.table.header.telephone": "Телефон",
"dry-wash.arm.order.table.header.location": "Расположение",
"dry-wash.arm.master.title": "Мастера",
"dry-wash.arm.master.table.header.name": "Имя",
"dry-wash.arm.master.table.header.currentJob": "Актуальная занятость",
"dry-wash.arm.master.table.header.phone": "Телефон",
"dry-wash.arm.master.table.header.actions": "Действия",
"dry-wash.arm.master.table.actionsMenu.delete": "Удалить мастера",
"dry-wash.arm.master.drawer.title": "Добавить нового мастера",
"dry-wash.arm.master.drawer.inputName.label": "ФИО",
"dry-wash.arm.master.drawer.inputName.placeholder": "Введите ФИО",
"dry-wash.arm.master.drawer.inputPhone.label": "Номер телефона",
"dry-wash.arm.master.drawer.inputPhone.placeholder": "Введите номер телефона",
"dry-wash.arm.master.drawer.button.save": "Сохранить",
"dry-wash.arm.master.drawer.button.cancel": "Отменить",
"dry-wash.arm.master.sideBar.title": " Сухой мастер",
"dry-wash.arm.master.sideBar.title.master": "Мастера",
"dry-wash.arm.master.sideBar.title.orders": "Заказы"
} }

1816
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -17,19 +17,18 @@
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@brojs/cli": "^1.6.1", "@brojs/cli": "^1.3.0",
"@brojs/i18nextreactconfig": "^1.3.3",
"@chakra-ui/icons": "^2.2.4", "@chakra-ui/icons": "^2.2.4",
"@chakra-ui/react": "^2.4.2", "@chakra-ui/react": "^2.4.2",
"@emotion/react": "^11.4.1", "@emotion/react": "^11.4.1",
"@emotion/styled": "^11.3.0", "@emotion/styled": "^11.3.0",
"@fontsource/open-sans": "^5.1.0",
"@types/react": "^18.3.12", "@types/react": "^18.3.12",
"express": "^4.21.1", "express": "^4.21.1",
"framer-motion": "^6.2.8", "framer-motion": "^6.2.8",
"i18next": "^23.16.4", "i18next": "^23.16.4",
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
"react-icons": "^5.3.0",
"react-router-dom": "^6.27.0" "react-router-dom": "^6.27.0"
}, },
"devDependencies": { "devDependencies": {

Binary file not shown.

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 11 KiB

View File

@ -1 +0,0 @@
export { default as LogoSvg } from './dry-master-logo.svg';

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

View File

@ -1 +0,0 @@
export { default as DemoVideoPosterImg } from './demo-video-poster.webp';

View File

@ -7,16 +7,15 @@ import {
IconButton, IconButton,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import { EditIcon } from '@chakra-ui/icons'; import { EditIcon } from '@chakra-ui/icons';
import i18next from 'i18next';
const MasterActionsMenu = () => { const MasterActionsMenu = () => {
return ( return (
<Menu> <Menu>
<MenuButton icon={<EditIcon />} as={IconButton} variant='outline' /> <MenuButton icon={<EditIcon />} as={IconButton} variant='outline' />
<MenuList> <MenuList>
<MenuItem> <MenuItem>Посмотреть профиль</MenuItem>
{i18next.t('dry-wash.arm.master.table.actionsMenu.delete')} <MenuItem>Изменить расписание</MenuItem>
</MenuItem> <MenuItem>Удалить мастера</MenuItem>
</MenuList> </MenuList>
</Menu> </Menu>
); );

View File

@ -12,7 +12,6 @@ import {
DrawerHeader, DrawerHeader,
DrawerOverlay, DrawerOverlay,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import i18next from 'i18next';
const MasterDrawer = ({ isOpen, onClose }) => { const MasterDrawer = ({ isOpen, onClose }) => {
const [newMaster, setNewMaster] = useState({ name: '', phone: '' }); const [newMaster, setNewMaster] = useState({ name: '', phone: '' });
@ -27,46 +26,35 @@ const MasterDrawer = ({ isOpen, onClose }) => {
<DrawerOverlay /> <DrawerOverlay />
<DrawerContent> <DrawerContent>
<DrawerCloseButton /> <DrawerCloseButton />
<DrawerHeader> <DrawerHeader>Добавить нового мастера</DrawerHeader>
{i18next.t('dry-wash.arm.master.drawer.title')}
</DrawerHeader>
<DrawerBody> <DrawerBody>
<FormControl mb='4'> <FormControl mb='4'>
<FormLabel> <FormLabel>ФИО</FormLabel>
{i18next.t('dry-wash.arm.master.drawer.inputName.label')}
</FormLabel>
<Input <Input
value={newMaster.name} value={newMaster.name}
onChange={(e) => onChange={(e) =>
setNewMaster({ ...newMaster, name: e.target.value }) setNewMaster({ ...newMaster, name: e.target.value })
} }
placeholder={i18next.t( placeholder='Введите ФИО'
'dry-wash.arm.master.drawer.inputName.placeholder',
)}
/> />
</FormControl> </FormControl>
<FormControl> <FormControl>
<FormLabel> <FormLabel>Номер телефона</FormLabel>
{' '}
{i18next.t('dry-wash.arm.master.drawer.inputPhone.label')}
</FormLabel>
<Input <Input
value={newMaster.phone} value={newMaster.phone}
onChange={(e) => onChange={(e) =>
setNewMaster({ ...newMaster, phone: e.target.value }) setNewMaster({ ...newMaster, phone: e.target.value })
} }
placeholder={i18next.t( placeholder='Введите номер телефона'
'dry-wash.arm.master.drawer.inputPhone.placeholder',
)}
/> />
</FormControl> </FormControl>
</DrawerBody> </DrawerBody>
<DrawerFooter> <DrawerFooter>
<Button colorScheme='teal' mr={3} onClick={handleSave}> <Button colorScheme='teal' mr={3} onClick={handleSave}>
{i18next.t('dry-wash.arm.master.drawer.button.save')} Сохранить
</Button> </Button>
<Button variant='ghost' onClick={onClose}> <Button variant='ghost' onClick={onClose}>
{i18next.t('dry-wash.arm.master.drawer.button.cancel')} Отменить
</Button> </Button>
</DrawerFooter> </DrawerFooter>
</DrawerContent> </DrawerContent>

View File

@ -13,10 +13,10 @@ import {
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import { mastersData } from '../../mocks'; import { mastersData } from '../../mocks';
import MasterItem from '../MasterItem'; import MasterItem from '../MasterItem';
import MasterDrawer from '../MasterDrawer'; import MasterDrawer from '../MasterModal';
import i18next from 'i18next'; import i18next from 'i18next';
const TABLE_HEADERS = ['name', 'currentJob', 'phone', 'actions']; const TABLE_HEADERS = ['Имя', 'Актуальная занятость', 'Телефон', 'Действия'];
const Masters = () => { const Masters = () => {
const { isOpen, onOpen, onClose } = useDisclosure(); const { isOpen, onOpen, onClose } = useDisclosure();
@ -24,18 +24,16 @@ const Masters = () => {
return ( return (
<Box p='8'> <Box p='8'>
<Flex justifyContent='space-between' alignItems='center' mb='5'> <Flex justifyContent='space-between' alignItems='center' mb='5'>
<Heading size='lg'> {i18next.t('dry-wash.arm.master.title')}</Heading> <Heading size='lg'>Мастера</Heading>
<Button colorScheme='green' onClick={onOpen}> <Button colorScheme='green' onClick={onOpen}>
+ {i18next.t('dry-wash.arm.master.add')} + {i18next.t('dry-wash.arm.masters.add')}
</Button> </Button>
</Flex> </Flex>
<Table variant='simple' colorScheme='blackAlpha'> <Table variant='simple' colorScheme='blackAlpha'>
<Thead> <Thead>
<Tr> <Tr>
{TABLE_HEADERS.map((name) => ( {TABLE_HEADERS.map((name) => (
<Th key={name}> <Th key={name}>{name}</Th>
{i18next.t(`dry-wash.arm.master.table.header.${name}`)}
</Th>
))} ))}
</Tr> </Tr>
</Thead> </Thead>

View File

@ -23,11 +23,11 @@ const OrderItem = ({
<Select <Select
value={statusSelect} value={statusSelect}
onChange={(e) => setStatus(e.target.value)} onChange={(e) => setStatus(e.target.value)}
placeholder={i18next.t(`dry-wash.arm.order.status.placeholder`)} placeholder='Выберите статус'
> >
{statuses.map((status) => ( {statuses.map((status) => (
<option key={status} value={status}> <option key={status} value={status}>
{i18next.t(`dry-wash.arm.order.status.${status}`)} {i18next.t(`dry-wash.order.status.${status}`)}
</option> </option>
))} ))}
</Select> </Select>

View File

@ -2,28 +2,26 @@ import { Box, Heading, Table, Thead, Tbody, Tr, Th } from '@chakra-ui/react';
import React from 'react'; import React from 'react';
import { ordersData } from '../../mocks'; import { ordersData } from '../../mocks';
import OrderItem from '../OrderItem'; import OrderItem from '../OrderItem';
import i18next from 'i18next';
const Orders = () => { const Orders = () => {
const TABLE_HEADERS = [ const TABLE_HEADERS = [
'carNumber', 'Номер машины',
'washingTime', 'Время мойки',
'orderDate', 'Дата заказа',
'status', 'Статус',
'telephone', 'Телефон',
'location', 'Расположение',
]; ];
return ( return (
<Box p='8'> <Box p='8'>
<Heading size='lg' mb='5'> <Heading size='lg' mb='5'>
{i18next.t('dry-wash.arm.order.title')} Заказы
</Heading> </Heading>
<Table variant='simple' colorScheme='blackAlpha'> <Table variant='simple' colorScheme='blackAlpha'>
<Thead> <Thead>
<Tr> <Tr>
{TABLE_HEADERS.map((name, key) => ( {TABLE_HEADERS.map((name, key) => (
<Th key={key}> <Th key={key}>{name}</Th>
{i18next.t(`dry-wash.arm.order.table.header.${name}`)}
</Th>
))} ))}
</Tr> </Tr>
</Thead> </Thead>

View File

@ -1,16 +0,0 @@
import React, { FC } from 'react';
import { Flex, Spinner } from '@chakra-ui/react';
export const PageSpinner: FC = () => {
return (
<Flex w='full' h='100vh' justifyContent='center' alignItems='center'>
<Spinner
thickness='5px'
speed='0.65s'
emptyColor='gray.200'
color='green.500'
size='xl'
/>
</Flex>
);
};

View File

@ -1 +0,0 @@
export { PageSpinner } from './PageSpinner';

View File

@ -1,9 +1,7 @@
import { Box, Button, Heading, VStack } from '@chakra-ui/react'; import { Box, Button, Heading, VStack } from '@chakra-ui/react';
import React from 'react'; import React from 'react';
import { Divider } from '@chakra-ui/react'; import { Divider } from '@chakra-ui/react';
import i18next from 'i18next';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
const Sidebar = () => ( const Sidebar = () => (
<Box <Box
borderRight='1px solid black' borderRight='1px solid black'
@ -14,20 +12,20 @@ const Sidebar = () => (
pt='8' pt='8'
> >
<Heading color='green' size='lg' mb='5'> <Heading color='green' size='lg' mb='5'>
{i18next.t(`dry-wash.arm.master.sideBar.title`)} Сухой мастер
</Heading> </Heading>
<VStack align='start' spacing='4'> <VStack align='start' spacing='4'>
<Divider /> <Divider />
<Link to='orders'> <Link to='orders'>
<Button w='100%' colorScheme='green' variant='ghost'> <Button w='100%' colorScheme='green' variant='ghost'>
{i18next.t(`dry-wash.arm.master.sideBar.title.orders`)} Заказы
</Button> </Button>
</Link> </Link>
<Divider /> <Divider />
<Link to='masters'> <Link to='masters'>
<Button w='100%' colorScheme='green' variant='ghost'> <Button w='100%' colorScheme='green' variant='ghost'>
{i18next.t(`dry-wash.arm.master.sideBar.title.master`)} Мастера
</Button> </Button>
</Link> </Link>
<Divider /> <Divider />

View File

@ -1 +0,0 @@
export * from './PageSpinner';

View File

@ -1,48 +0,0 @@
import React, { FC } from 'react';
import {
MdEco,
MdMiscellaneousServices,
MdPlace,
MdHandshake,
} from 'react-icons/md';
import { Heading, HStack, List, Text, VStack } from '@chakra-ui/react';
import { CtaButton, PageSection } from '../';
import { ListItem } from './ListItem';
export const BenefitsSection: FC = () => {
return (
<PageSection>
<VStack w='full' spacing={2}>
<Heading as='h2'>Преимущества экологичной автомойки</Heading>
<Text>
Откройте для себя преимущества наших услуг по химчистке автомобилей
</Text>
</VStack>
<List display='flex' flexDirection='column' spacing={3}>
{[
{
Icon: MdEco,
children: 'Экологически безопасные продукты',
},
{
Icon: MdMiscellaneousServices,
children: 'Быстрое и эффективное обслуживание',
},
{
Icon: MdPlace,
children: 'Удобный мобильный доступ',
},
{
Icon: MdHandshake,
children: 'Надежный и заслуживающий доверия',
},
].map((props, i) => (
<ListItem key={i} {...props} />
))}
</List>
<HStack w='full' justify='flex-end'>
<CtaButton />
</HStack>
</PageSection>
);
};

View File

@ -1,16 +0,0 @@
import React, { FC, PropsWithChildren } from 'react';
import { ListIcon, ListItem as ChakraListItem } from '@chakra-ui/react';
import { IconType } from 'react-icons';
type ListItemProps = PropsWithChildren & {
Icon: IconType;
};
export const ListItem: FC<ListItemProps> = ({ Icon, children }) => {
return (
<ChakraListItem display='inline-flex'>
<ListIcon as={Icon} color='primary.500' boxSize='6' />
{children}
</ChakraListItem>
);
};

View File

@ -1 +0,0 @@
export { ListItem } from './ListItem';

View File

@ -1 +0,0 @@
export { BenefitsSection } from './BenefitsSection';

View File

@ -1,11 +0,0 @@
import React, { FC } from 'react';
import { Link as RouterLink } from 'react-router-dom';
import { ButtonProps, Button } from '@chakra-ui/react';
export const CtaButton: FC<ButtonProps> = (props) => {
return (
<Button as={RouterLink} to='/dry-wash/order-form' colorScheme='primary' {...props}>
Сделать заказ
</Button>
);
};

View File

@ -1 +0,0 @@
export { CtaButton } from './CtaButton';

View File

@ -1,8 +0,0 @@
import React, { FC } from 'react';
import { Text } from '@chakra-ui/react';
const currentYear = new Date().getFullYear();
export const Copyright: FC = () => {
return <Text color='whiteAlpha.500'>&copy; {currentYear} DryMaster. Все права защищены</Text>;
};

View File

@ -1 +0,0 @@
export { Copyright } from './Copyright';

View File

@ -1,27 +0,0 @@
import React, { FC } from 'react';
import { Link, List, ListItem } from '@chakra-ui/react';
import { Link as RouterLink } from 'react-router-dom';
import { SiteLogo, PageSection } from '../';
import { Copyright } from './Copyright';
export const Footer: FC = () => {
return (
<PageSection as='footer' py={5} bg='gray.700' color='white'>
<SiteLogo />
<Copyright />
<List spacing={2}>
{[
{ to: '#', label: 'Политика конфиденциальности' },
{ to: '#', label: 'Условия обслуживания' },
{ to: '#', label: 'FAQ' },
].map(({ to, label }, i) => (
<ListItem key={i}>
<Link as={RouterLink} to={to}>
{label}
</Link>
</ListItem>
))}
</List>
</PageSection>
);
};

View File

@ -1 +0,0 @@
export { Footer } from './Footer';

View File

@ -1,59 +0,0 @@
import React, { FC } from 'react';
import { Box, Heading, Text, Center, VStack, BoxProps } from '@chakra-ui/react';
import { DemoVideoPosterImg } from '../../../assets/images';
import { CtaButton, SiteLogo, PageSection } from '../';
type HeroSectionProps = Pick<BoxProps, 'flexShrink'>;
export const HeroSection: FC<HeroSectionProps> = ({ flexShrink }) => {
return (
<Box flexShrink={flexShrink} as='header' pos='relative' zIndex={0}>
<Box
as='video'
src={`${__webpack_public_path__}/remote-assets/demo.mp4`}
poster={DemoVideoPosterImg}
autoPlay
loop
muted
w='full'
h='full'
pos='absolute'
objectFit='cover'
filter='brightness(50%)'
zIndex={-1}
/>
<PageSection
h='full'
minH='375px'
maxH='1000px'
py={10}
justifyContent='center'
alignItems='center'
spacing={8}
>
<Center>
<SiteLogo />
</Center>
<VStack spacing={4}>
<Heading
as='h1'
textAlign='center'
color='white'
__css={{ textWrap: 'balance' }}
>
Оживите свою поездку с помощью экологически чистого ухода!
</Heading>
<Text
textAlign='center'
__css={{ textWrap: 'balance' }}
color='white'
>
Ощутите максимальное удобство сухой мойки автомобилей, созданной для
того, чтобы планета стала чище
</Text>
</VStack>
<CtaButton size='lg' />
</PageSection>
</Box>
);
};

View File

@ -1 +0,0 @@
export { HeroSection } from './HeroSection';

View File

@ -1,12 +0,0 @@
import React, { FC, PropsWithChildren } from 'react';
import { StackProps, VStack } from '@chakra-ui/react';
type PageSectionProps = StackProps & PropsWithChildren;
export const PageSection: FC<PageSectionProps> = ({ children, ...restProps }) => {
return (
<VStack as='section' w='full' px={5} py={5} spacing={6} alignItems='flex-start' {...restProps}>
{children}
</VStack>
);
};

View File

@ -1 +0,0 @@
export { PageSection } from './PageSection';

View File

@ -1,10 +0,0 @@
import React, { FC } from 'react';
import { Image } from '@chakra-ui/react';
import { LogoSvg } from '../../../assets/icons';
export const SiteLogo: FC = () => {
return <Image src={LogoSvg} alt='Логотип компании "Сухой мастер"' w={40} />;
};
// todo: add i18n for alt
// todo: replace Image by SVG React component

View File

@ -1 +0,0 @@
export { SiteLogo } from './SiteLogo';

View File

@ -1,37 +0,0 @@
import React, { FC } from 'react';
import { Card, Avatar, Text } from '@chakra-ui/react';
type ReviewCardProps = {
firstname: string;
lastname: string;
picture: string;
text: string;
};
export const ReviewCard: FC<ReviewCardProps> = ({
firstname,
lastname,
picture,
text,
}) => {
const name = [firstname, lastname].join(' ');
return (
<Card p={4} gap={2} alignItems='center' variant='elevated'>
<Avatar
name={name}
src={picture}
size='xl'
boxShadow='2px 2px 0 1px var(--chakra-colors-secondary-500)'
/>
<Text
as='q'
fontSize='sm'
textAlign='center'
__css={{ textWrap: 'balance' }}
>
{text}
</Text>
</Card>
);
};

View File

@ -1 +0,0 @@
export { ReviewCard } from './ReviewCard';

View File

@ -1,73 +0,0 @@
import React, { FC, useEffect, useState } from 'react';
import {
Tab,
TabList,
TabPanel,
TabPanels,
Tabs,
Text,
} from '@chakra-ui/react';
import { mockReviews } from '../../../../mocks/landing';
import { ReviewCard } from './ReviewCard';
const reviewsCount = mockReviews.length;
const SLIDE_CHANGE_INTERVAL = 5000;
export const ReviewsSlider: FC = () => {
const [activeTab, setActiveTab] = useState(0);
const [isSlideShowStopped, setIsSlideShowStopped] = useState(false);
useEffect(() => {
const timer = setInterval(() => {
const newActiveTab = (activeTab + 1) % reviewsCount;
setActiveTab(newActiveTab);
}, SLIDE_CHANGE_INTERVAL);
if (isSlideShowStopped) {
clearInterval(timer);
}
return () => {
clearInterval(timer);
};
}, [activeTab]);
return (
<Tabs
index={activeTab}
onChange={(selectedTab) => {
setIsSlideShowStopped(true);
setActiveTab(selectedTab);
}}
display='flex'
flexDir='column'
alignItems='center'
variant='soft-rounded'
colorScheme='gray'
>
<TabList gap={2}>
{mockReviews.map(({ id }, i) => (
<Tab
key={id}
w={4}
h={4}
p={0}
bg='gray.100'
_selected={{
bg: 'secondary.100',
}}
>
<Text visibility='hidden'>{i}</Text>
</Tab>
))}
</TabList>
<TabPanels>
{mockReviews.map(({ id, ...reviewProps }) => (
<TabPanel key={id}>
<ReviewCard {...reviewProps} />
</TabPanel>
))}
</TabPanels>
</Tabs>
);
};

View File

@ -1 +0,0 @@
export { ReviewsSlider } from './ReviewsSlider';

View File

@ -1,19 +0,0 @@
import React, { FC } from 'react';
import {
Heading,
HStack,
} from '@chakra-ui/react';
import { CtaButton, PageSection } from '../';
import { ReviewsSlider } from './ReviewsSlider';
export const SocialProofSection: FC = () => {
return (
<PageSection>
<Heading as='h2'>Нас выбирают</Heading>
<ReviewsSlider />
<HStack w='full' justify='flex-end'>
<CtaButton />
</HStack>
</PageSection>
);
};

View File

@ -1 +0,0 @@
export { SocialProofSection } from './SocialProofSection';

View File

@ -1,7 +0,0 @@
export * from './CtaButton';
export * from './PageSection';
export * from './BenefitsSection'; // CtaButton, PageSection
export * from './SocialProofSection'; // CtaButton, PageSection
export * from './SiteLogo';
export * from './Footer'; // PageSection, SiteLogo
export * from './HeroSection'; // CtaButton, PageSection, SiteLogo

View File

@ -1,31 +0,0 @@
import React from 'react';
import { Global } from '@emotion/react';
import '@fontsource/open-sans/400.css';
import '@fontsource/open-sans/700.css';
const Fonts = () => (
<Global
styles={`
/* open-sans-cyrillic-400-normal */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-display: swap;
font-weight: 400;
src: url(./files/open-sans-cyrillic-400-normal.woff2) format('woff2'), url(./files/open-sans-cyrillic-400-normal.woff) format('woff');
unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
/* open-sans-cyrillic-700-normal */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-display: swap;
font-weight: 700;
src: url(./files/open-sans-cyrillic-700-normal.woff2) format('woff2'), url(./files/open-sans-cyrillic-700-normal.woff) format('woff');
unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
`}
/>
);
export default Fonts;

View File

@ -1,13 +0,0 @@
import React, { FC, PropsWithChildren } from 'react';
import { ChakraProvider } from '@chakra-ui/react';
import { default as landingTheme } from './theme-config';
import Fonts from './Fonts';
export const LandingThemeProvider: FC<PropsWithChildren> = ({ children }) => {
return (
<ChakraProvider theme={landingTheme}>
<Fonts />
{children}
</ChakraProvider>
);
};

View File

@ -1 +0,0 @@
export { LandingThemeProvider } from './LandingThemeProvider';

View File

@ -1,42 +0,0 @@
import { extendTheme } from '@chakra-ui/react';
const overrides = {
colors: {
primary: {
50: "#F1F8ED",
100: "#D9EACC",
200: "#C0DDAC",
300: "#A8D08B",
400: "#8FC26B",
500: "#77B54A",
600: "#5F913B",
700: "#476D2C",
800: "#2F481E",
900: "#18240F"
},
secondary: {
50: "#E7F7FD",
100: "#BCEAFB",
200: "#91DCF8",
300: "#66CEF5",
400: "#3BC1F2",
500: "#0FB3F0",
600: "#0C8FC0",
700: "#096B90",
800: "#064860",
900: "#032430"
}
},
fonts: {
heading: `'Open Sans', sans-serif`,
},
styles: {
global: {
body: {
bg: 'gray.100'
}
},
},
};
export default extendTheme(overrides);

View File

@ -1 +0,0 @@
export * from './LandingThemeProvider';

View File

@ -1,7 +1,7 @@
/* eslint-disable react/display-name */ /* eslint-disable react/display-name */
import React from 'react'; import React from 'react';
import ReactDOM from 'react-dom/client'; import ReactDOM from 'react-dom/client';
import { i18nextReactInitConfig } from '@brojs/cli'; import { i18nextReactInitConfig } from '@brojs/i18nextreactconfig';
import App from './app'; import App from './app';
import i18next from 'i18next'; import i18next from 'i18next';

View File

@ -1,34 +0,0 @@
type ReviewItem = {
id: string;
firstname: string;
lastname: string;
picture: string;
text: string;
};
export const mockReviews: ReviewItem[] = [
{
firstname: 'Анна',
lastname: 'Смирнова',
picture: 'https://img.freepik.com/free-photo/indoor-portrait-beautiful-freckled-woman-with-dark-curly-hair-wears-fashionable-striped-shirt-rejoices-day-off-isolated-white-wall-curly-satisfied-woman-stands-indoor-alone_273609-15765.jpg',
text: "Недавно воспользовалась услугами сухой мойки автомобилей и осталась крайне удовлетворена. Процесс был проведён профессионально: сотрудники использовали качественные средства, которые не повредили лакокрасочное покрытие. Особенно впечатлила возможность мыть машину без воды, что не только экономит ресурсы, но и бережет окружающую среду. Рекомендую всем, кто заботится о своём автомобиле и экологии!"
},
{
firstname: 'Дмитрий',
lastname: 'Петров',
picture: 'https://img.freepik.com/free-photo/calm-handsome-curly-haired-boy-posing-isolated-light-grey-standing-still-looks-peaceful-wearing-casual-manner-youth-style-concept_176532-8831.jpg',
text: "Как же я рад, что нашел эту сухую мойку! Моя машина сияет, как новенькая! 🌟 Сначала был скептически настроен, думал, как же без воды можно отмыть всё это? Но результат превзошёл все ожидания! Ветеринар мойки профессионально подошёл к делу, и она теперь выглядит потрясающе. Если вы хотите, чтобы ваш автомобиль всегда выглядел на 100%, обязательно попробуйте!"
},
{
firstname: 'Алексей',
lastname: 'Сидоров',
picture: 'https://img.freepik.com/free-photo/waist-up-portrait-handsome-serious-unshaven-male-keeps-hands-together-dressed-dark-blue-shirt-has-talk-with-interlocutor-stands-against-white-wall-self-confident-man-freelancer_273609-16320.jpg',
text: "Сухая мойка автомобилей - интересное решение, которое я опробовал недавно. В целом остался доволен качеством работы. Однако, не все загрязнения удалось удалить с первого раза, но сотрудник предложил дополнительные услуги, что меня устроило. Плюс, большое внимание уделили защите поверхности, что тоже немаловажно. Думаю, в следующий раз снова воспользуюсь этой услугой."
},
{
firstname: 'Екатерина',
lastname: 'Иванова',
picture: 'https://img.freepik.com/free-photo/portrait-young-blonde-woman-with-plait-polka-dot-blouse_273609-10490.jpg',
text: "К сожалению, мой опыт с сухой мойкой автомобилей оказался неудачным. Ожидала увидеть чистую машину после процедуры, но многие участки остались незаделанными. Кроме того, процедура заняла больше времени, чем мне обещали. Возможно, в этом конкретном центре что-то пошло не так, но я бы не стала повторно обращаться за этой услугой."
},
].map((data, i) => ({ id: `review${i}`, ...data }));

View File

@ -1,37 +1,7 @@
import React, { FC } from 'react'; import React from "react";
import { Box, Container, VStack } from '@chakra-ui/react';
import {
BenefitsSection,
Footer,
HeroSection,
SocialProofSection,
} from '../../components/landing';
import { LandingThemeProvider } from '../../containers';
const Page: FC = () => { const Page = () => {
return ( return <h1>Landing</h1>;
<LandingThemeProvider>
<Container
w='full'
maxWidth='container.xl'
minH='100vh'
padding={0}
bg='white'
centerContent
>
<VStack w='full' h='full' alignItems='stretch'>
<HeroSection flexShrink={0} />
<Box flexGrow={1}>
<VStack as='main'>
<BenefitsSection />
<SocialProofSection />
</VStack>
</Box>
<Footer />
</VStack>
</Container>
</LandingThemeProvider>
);
}; };
export default Page; export default Page;

View File

@ -1,25 +1,16 @@
import React, { lazy, Suspense } from 'react'; import React from 'react';
import { Routes, Route } from 'react-router-dom'; import { Routes, Route } from 'react-router-dom';
import { PageSpinner } from './components';
import Arm from './pages/arm'; import Arm from './pages/arm';
import Order from './pages/order-view';
const Landing = lazy(() => import('./pages/landing')); import Landing from './pages/landing';
const OrderForm = lazy(() => import('./pages/order-form'));
const OrderView = lazy(() => import('./pages/order-view'));
const Routers = () => { const Routers = () => {
return ( return (
<Suspense fallback={<PageSpinner />}> <Routes>
<Routes> <Route path='/dry-wash' element={<Landing />}></Route>
<Route path='/dry-wash'> <Route path='/dry-wash/order' element={<Order />}></Route>
<Route index element={<Landing />} /> <Route path='/dry-wash/arm/*' element={<Arm />}></Route>
<Route path='order-form' element={<OrderForm />} /> </Routes>
<Route path='order-view' element={<OrderView />} />
</Route>
<Route path='/dry-wash/arm/*' element={<Arm />}></Route>
</Routes>
</Suspense>
); );
}; };

14
types.d.ts vendored
View File

@ -3,17 +3,3 @@ declare interface NodeModule {
accept: (path: string, callback: () => void) => void; accept: (path: string, callback: () => void) => void;
}; };
} }
declare module "*.svg" {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const value: any;
export = value;
}
declare module "*.webp" {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const value: any;
export = value;
}
declare const __webpack_public_path__: string;