diff --git a/frontend/src/UIComponents/modalWindow/ModalWindow.tsx b/frontend/src/UIComponents/modalWindow/ModalWindow.tsx index 24e6e89..f67b76a 100644 --- a/frontend/src/UIComponents/modalWindow/ModalWindow.tsx +++ b/frontend/src/UIComponents/modalWindow/ModalWindow.tsx @@ -17,7 +17,7 @@ const ModalWindow: React.FC = useEffect(() => { const onKeypress = (e: KeyboardEvent) => e?.key === "Esc" || e.key === "Escape" ? onClose() : null; gsap.fromTo(element.current, {opacity: 0}, {opacity: 1, duration: 0.2}) - gsap.to(element.current, {duration: 0.5, scale: 1.1, ease: "expoScale(i, 2)"}); + gsap.to(element.current, {duration: 0.5, scale: 1.3, ease: "expoScale(i, 2)"}); document.addEventListener('keyup', onKeypress); return () => { diff --git a/frontend/src/UIComponents/modalWindow/modalWindow.css b/frontend/src/UIComponents/modalWindow/modalWindow.css index d4d1472..7b08770 100644 --- a/frontend/src/UIComponents/modalWindow/modalWindow.css +++ b/frontend/src/UIComponents/modalWindow/modalWindow.css @@ -1,5 +1,7 @@ .modal-window { position: fixed; + height: 100%; + width: 100%; top: 0; bottom: 0; right: 0; @@ -16,8 +18,8 @@ color: black; background: #4e4c4c; border-radius: 15px; - min-width: 70vw; - min-height: 80vh; + min-width: 50vw; + min-height: 60vh; position: relative; } diff --git a/frontend/src/UIComponents/modalWindow/modalWindow.css.map b/frontend/src/UIComponents/modalWindow/modalWindow.css.map index b4f827c..9b5fce0 100644 --- a/frontend/src/UIComponents/modalWindow/modalWindow.css.map +++ b/frontend/src/UIComponents/modalWindow/modalWindow.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["modalWindow.scss"],"names":[],"mappings":"AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA","file":"modalWindow.css"} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["modalWindow.scss"],"names":[],"mappings":"AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA","file":"modalWindow.css"} \ No newline at end of file diff --git a/frontend/src/UIComponents/modalWindow/modalWindow.scss b/frontend/src/UIComponents/modalWindow/modalWindow.scss index a84148a..359c05c 100644 --- a/frontend/src/UIComponents/modalWindow/modalWindow.scss +++ b/frontend/src/UIComponents/modalWindow/modalWindow.scss @@ -1,6 +1,8 @@ .modal-window { position: fixed; + height: 100%; + width: 100%; top: 0; bottom: 0; right: 0; @@ -17,7 +19,7 @@ color: black; background: #4e4c4c; border-radius: 15px; - min-width: 70vw; - min-height: 80vh; + min-width: 50vw; + min-height: 60vh; position: relative; } diff --git a/frontend/src/components/mapMenu/MapMenu.tsx b/frontend/src/components/mapMenu/MapMenu.tsx index 8df33b8..4798dd2 100644 --- a/frontend/src/components/mapMenu/MapMenu.tsx +++ b/frontend/src/components/mapMenu/MapMenu.tsx @@ -43,7 +43,7 @@ const MapMenu: React.FC = () => { id: 3, level: { levelName: "Уровень 3", - title: "Начни бить Никиту", + title: "Начни текст", menu: [ { taskName: "video", diff --git a/frontend/src/components/mapMenu/UIMapMenu/Level/ModalLevelBody.tsx b/frontend/src/components/mapMenu/UIMapMenu/Level/ModalLevelBody.tsx index a11021a..1cf98f4 100644 --- a/frontend/src/components/mapMenu/UIMapMenu/Level/ModalLevelBody.tsx +++ b/frontend/src/components/mapMenu/UIMapMenu/Level/ModalLevelBody.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, {useState} from 'react'; import "./modalLevelBody.scss" import ArrowLeft from "../UIChooseModule/ArrowLeft.tsx"; import ArrowRight from "../UIChooseModule/ArrowRight.tsx"; @@ -27,6 +27,8 @@ const ModalLevelBody: React.FC = ({levelName, title, menu}) => {name: "test", element: } ] + const [currentTaskIndex, setCurrentTaskIndex] = useState(0) + return (
@@ -42,21 +44,19 @@ const ModalLevelBody: React.FC = ({levelName, title, menu}) =>
- {menu.map((item) => - tasks.map((task, index) => { + {menu.map((item, index) => + tasks.map((task) => { return task.name === item.taskName - ?
{task.element}
+ ?
{ + setCurrentTaskIndex(index) + }}>{task.element}
: "" }))}
{title.toUpperCase()}
- {menu.map((item, index) =>
{item.body}
)} - +
{menu[currentTaskIndex].body}
); diff --git a/frontend/src/components/mapMenu/UIMapMenu/Level/modalLevelBody.css b/frontend/src/components/mapMenu/UIMapMenu/Level/modalLevelBody.css index 25ee983..74da657 100644 --- a/frontend/src/components/mapMenu/UIMapMenu/Level/modalLevelBody.css +++ b/frontend/src/components/mapMenu/UIMapMenu/Level/modalLevelBody.css @@ -2,7 +2,7 @@ width: 100%; height: 4rem; border-radius: 15px; - background: #D9D9D9; + background: #E8E8E8; display: flex; justify-content: center; align-items: center; @@ -12,8 +12,11 @@ position: absolute; margin-left: 1.25rem; top: 23%; - width: 6rem; - height: 16rem; + width: 8%; + max-height: 75%; + background: #E8E8E8; + padding: 2px; + border-radius: 30px; } .text-info { diff --git a/frontend/src/components/mapMenu/UIMapMenu/Level/modalLevelBody.css.map b/frontend/src/components/mapMenu/UIMapMenu/Level/modalLevelBody.css.map index eb1d9f9..1d45ef7 100644 --- a/frontend/src/components/mapMenu/UIMapMenu/Level/modalLevelBody.css.map +++ b/frontend/src/components/mapMenu/UIMapMenu/Level/modalLevelBody.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["modalLevelBody.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;;;AAGF;EACE","file":"modalLevelBody.css"} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["modalLevelBody.scss","../../../../styles/variablesStyles.scss"],"names":[],"mappings":"AAEA;EACE;EACA;EACA;EACA,YCLa;EDMb;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA,YCjBa;EDkBb;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;;;AAGF;EACE","file":"modalLevelBody.css"} \ No newline at end of file diff --git a/frontend/src/components/mapMenu/UIMapMenu/Level/modalLevelBody.scss b/frontend/src/components/mapMenu/UIMapMenu/Level/modalLevelBody.scss index b257d33..7b535db 100644 --- a/frontend/src/components/mapMenu/UIMapMenu/Level/modalLevelBody.scss +++ b/frontend/src/components/mapMenu/UIMapMenu/Level/modalLevelBody.scss @@ -1,8 +1,10 @@ +@import './../../../../styles/variablesStyles'; + .header-modal { width: 100%; height: 4rem; border-radius: 15px; - background: #D9D9D9; + background: $formsBGColor; display: flex; justify-content: center; align-items: center; @@ -12,8 +14,11 @@ position: absolute; margin-left: 1.25rem; top: 23%; - width: 6rem; - height: 16rem; + width: 8%; + max-height: 75%; + background: $formsBGColor; + padding: 2px; + border-radius: 30px; } .text-info { diff --git a/frontend/src/styles/variablesStyles.scss b/frontend/src/styles/variablesStyles.scss index 5dff734..49bc987 100644 --- a/frontend/src/styles/variablesStyles.scss +++ b/frontend/src/styles/variablesStyles.scss @@ -1,2 +1,3 @@ $mainBGColor: #787878; $formsBGColor: #E8E8E8; +$modalWindowBGColor: #D9D9D9;