diff --git a/src/main/webapp/src/App.tsx b/src/main/webapp/src/App.tsx index 09f35ee..4369858 100644 --- a/src/main/webapp/src/App.tsx +++ b/src/main/webapp/src/App.tsx @@ -12,6 +12,7 @@ import Menu from "./components/Menu/Menu" import ProcessFile from "./pages/processfile"; import { setRuleSet } from './reducers/counterReducer'; +import GuidePage from './pages/guide'; interface Rule { id: number; @@ -64,6 +65,7 @@ function App(): JSX.Element { } /> } /> + } /> } /> } /> } /> diff --git a/src/main/webapp/src/components/Menu/Menu.tsx b/src/main/webapp/src/components/Menu/Menu.tsx index 97fe90e..65611af 100644 --- a/src/main/webapp/src/components/Menu/Menu.tsx +++ b/src/main/webapp/src/components/Menu/Menu.tsx @@ -22,6 +22,7 @@ const Menu = () => { > navigateTo('/Home')}>Главная + navigateTo('/Guide')}>Инструкция navigateTo('/About')}>Контакты navigateTo('/Presets')}>Наборы правил navigateTo('/Download')}>Загрузка файлов diff --git a/src/main/webapp/src/css/guide.css b/src/main/webapp/src/css/guide.css new file mode 100644 index 0000000..96d7f92 --- /dev/null +++ b/src/main/webapp/src/css/guide.css @@ -0,0 +1,61 @@ +.stepCard { + width: calc(33.33% - 20px); + margin: 10px; + height: 600px; + border: 2px solid violet; + border-radius: 8px; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + position: relative; + transition: transform 0.5s ease; +} + +.aboutPage { + margin-top: 50px; + display: flex; + justify-content: center; + text-align: center; + font-size: 26px; +} + +.label { + display: 'flex'; + flex-direction:'column'; + height: '70vh'; +} + +.lead { + font-size: '24px'; + font-weight: 'bold'; + margin-bottom: '20px'; +} + +.githubButton { + padding-top: 15px; + padding-bottom: 15px; +} + +.guide { + display: 'flex'; + flex-direction: 'column'; + justify-content: center; + text-align: center; + padding: '20px'; + +} +.arrow { + font-size: 68px; + color: violet; + margin-top: 10px; + } + +.down { + transform: rotate(90deg); + } +.left { + transform: rotate(180deg); + } + + \ No newline at end of file diff --git a/src/main/webapp/src/pages/guide.tsx b/src/main/webapp/src/pages/guide.tsx new file mode 100644 index 0000000..b230228 --- /dev/null +++ b/src/main/webapp/src/pages/guide.tsx @@ -0,0 +1,69 @@ +import React, { useState } from 'react'; +import { Card, Text, Button, Title } from '@mantine/core'; +import firstStepGif from "../resources/firstStep.gif" +import secondStepGif from "../resources/secondStep.gif" +import thirdStepGif from "../resources/thirdStep.gif" +import fourthStepGif from "../resources/fourthStep.gif" +import fifthStepGif from "../resources/fifthStep.gif" +import sixthStepGif from "../resources/sixthStep.gif" +import '../css/guide.css'; +const GuidePage: React.FC = () => { + const [selectedCard, setSelectedCard] = useState(null); + const arrowDownCard = 2; + const arrowRightCards = [0,1]; + const arrowLeftCards = [5,4]; + const steps = [ + { text: 'Для начала вам следует выбрать набор правил. Если вы хотите провести проверку со всеми правилами, тогда игнорируйте этот пункт. Вам следует перейти в пункт "Наборы правил и там выбрать один из существующих наборов или создать свой."', gif: firstStepGif }, + { text: 'После выбора набора правил, вам следует перейти на страницу для загрузки файлов. Здесь надо выбрать файл и начать загрузку. После обработки нажмите на количество ошибок и сможете перейти на обзор файла.', gif: secondStepGif }, + { text: 'Вам откроется страница с тремя полями, в первом идет список ошибок, нажав на которые их можно просмотреть. Также тут возможно фильтровать ошибки по названиям или страницам.', gif: thirdStepGif }, + { text: 'Наконец, если среди нарушений вы нашли ошибочное, например, вам кажется, что тут все правильно, а отчет говорит обратное, то стоит отправить нам отчет, нажав на соответствующую кнопку. ', gif: sixthStepGif }, + { text: 'По центру будет поле со страницей, на которой подчеркнута ошибка. Если ошибка занимает больше одной строки, то будут подчеркнуты несколько строк.', gif: fifthStepGif }, + { text: 'Слева будет поле, на котором будут все найденные типы ошибок. Если навести на тип ошибки, то можно увидеть описание данной ошибки. Также рядом написан тип ошибки: "предупреждение" или "ошибка". Предупреждения не так принципиальны, как ошибки.', gif: fourthStepGif }, + ]; + + const handleCardClick = (index: number) => { + if (selectedCard === index) { + setSelectedCard(null); + } else { + setSelectedCard(index); + } + }; + return ( +
+ + Приложение{' '}<br /> + <Text component="span" color="violet"> + MAP + </Text>{' '}<br />- + это инструмент<br /> для проверки студенческих <br />работ + +
+ Ниже приведен демо файл для тестового прогона программы. Также снизу есть пошаговая инструкция. +
+ +
+ {steps.map((step, index) => ( + handleCardClick(index)} + > +
+ {step.text} + {index === arrowDownCard && selectedCard !== index &&
➜➤
} + {arrowLeftCards.includes(index) && selectedCard !== index &&
➜➤
} + {selectedCard !== index && arrowRightCards.includes(index) &&
➜➤
} + {selectedCard === index && {`Step} +
+
+ ))} +
+
+ ); +}; + +export default GuidePage; \ No newline at end of file diff --git a/src/main/webapp/src/resources/Demo.pdf b/src/main/webapp/src/resources/Demo.pdf new file mode 100755 index 0000000..dfc56dc Binary files /dev/null and b/src/main/webapp/src/resources/Demo.pdf differ diff --git a/src/main/webapp/src/resources/fifthStep.gif b/src/main/webapp/src/resources/fifthStep.gif new file mode 100755 index 0000000..884ae7a Binary files /dev/null and b/src/main/webapp/src/resources/fifthStep.gif differ diff --git a/src/main/webapp/src/resources/firstStep.gif b/src/main/webapp/src/resources/firstStep.gif new file mode 100755 index 0000000..4b97818 Binary files /dev/null and b/src/main/webapp/src/resources/firstStep.gif differ diff --git a/src/main/webapp/src/resources/fourthStep.gif b/src/main/webapp/src/resources/fourthStep.gif new file mode 100755 index 0000000..dc97263 Binary files /dev/null and b/src/main/webapp/src/resources/fourthStep.gif differ diff --git a/src/main/webapp/src/resources/secondStep.gif b/src/main/webapp/src/resources/secondStep.gif new file mode 100755 index 0000000..edfe85c Binary files /dev/null and b/src/main/webapp/src/resources/secondStep.gif differ diff --git a/src/main/webapp/src/resources/sixthStep.gif b/src/main/webapp/src/resources/sixthStep.gif new file mode 100755 index 0000000..88373d9 Binary files /dev/null and b/src/main/webapp/src/resources/sixthStep.gif differ diff --git a/src/main/webapp/src/resources/thirdStep.gif b/src/main/webapp/src/resources/thirdStep.gif new file mode 100755 index 0000000..a9b3b6f Binary files /dev/null and b/src/main/webapp/src/resources/thirdStep.gif differ