diff --git a/package.json b/package.json
index 8b8189b..84b1eef 100644
--- a/package.json
+++ b/package.json
@@ -10,6 +10,7 @@
"preview": "vite preview"
},
"dependencies": {
+ "framer-motion": "^11.2.14",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.23.1",
diff --git a/src/components/Main/Availables.tsx b/src/components/Main/Availables.tsx
index b6a851e..c0b1c97 100644
--- a/src/components/Main/Availables.tsx
+++ b/src/components/Main/Availables.tsx
@@ -1,6 +1,20 @@
+import AppearanceText from '../../ui/AppearanceText';
import { MiniTitle } from '../../ui/MiniTitle';
import { Title } from '../../ui/Title';
+const splits = [
+ 'В одном ',
+ 'цифровом ',
+ 'пространстве ',
+ 'могут работать ',
+ 'сотрудники, ',
+ 'находящиеся ',
+ 'в разных ',
+ 'помещениях, ',
+ 'зданиях ',
+ 'или городах',
+];
+
export function Availables() {
return (
@@ -21,7 +35,7 @@ export function Availables() {
-
+
-
- В одном цифровом пространстве{' '}
-
- могут работать сотрудники, находящиеся в разных помещениях,
- зданиях или городах
-
+
+ {splits.map((text, index) => (
+ 2 ? 60 : 100}
+ duration={3 + index}
+ />
+ ))}
@@ -50,9 +71,9 @@ export function Availables() {
function MultiUserFeature({ text, img }: { text: string; img: string }) {
return (
-
+
-
{text}
+
{text}
);
}
diff --git a/src/components/Main/Efficiency.tsx b/src/components/Main/Efficiency.tsx
index 9aa8467..83d4036 100644
--- a/src/components/Main/Efficiency.tsx
+++ b/src/components/Main/Efficiency.tsx
@@ -1,12 +1,28 @@
import { MiniTitle } from '../../ui/MiniTitle';
+import AppearanceText from '../../ui/AppearanceText';
+
+const splits = [
+ 'В тренажере человек ',
+ 'принимает решения ',
+ 'так же, ',
+ 'как в реальном мире, ',
+ 'активируя ',
+ 'те же нейронные ',
+ 'цепочки в мозгу. ',
+ 'Это позволяет ',
+ 'добиться ',
+ 'реальной ',
+ 'производительности ',
+ 'в работе. ',
+];
export function Effeciency() {
return (
-
+
-
+
-
- В тренажере человек принимает решения так же, как в реальном мире,{' '}
-
- активируя те же нейронные цепочки в мозгу. Это позволяет добиться
- реальной производительность в работе.
-
+
+ {splits.map((text, index) => (
+ 3 ? 60 : 100}
+ duration={3 + index}
+ />
+ ))}
@@ -48,14 +71,16 @@ function Figure({
return (
-
{title}
+
+ {title}
+
{percents}
diff --git a/src/components/Main/Products.tsx b/src/components/Main/Products.tsx
index 23e897c..8b03a18 100644
--- a/src/components/Main/Products.tsx
+++ b/src/components/Main/Products.tsx
@@ -28,52 +28,54 @@ export function Products() {
продуктами GRAFF.training
-
-
-
{
- ref.current?.scrollTo({
- left: e.currentTarget.offsetLeft - 16,
- behavior: 'smooth',
- });
- setCurTab(0);
- }}
- text="Промышленные тренажеры"
- />
- {
- ref.current?.scrollTo({
- left: e.currentTarget.offsetLeft - 16,
- behavior: 'smooth',
- });
- setCurTab(1);
- }}
- text="Симуляторы управления техникой"
- />
- {
- ref.current?.scrollTo({
- left: e.currentTarget.offsetLeft - 16,
- behavior: 'smooth',
- });
- setCurTab(2);
- }}
- text="Тренажеры для учебных заведений"
- />
+
+
+
+ {
+ ref.current?.scrollTo({
+ left: e.currentTarget.offsetLeft - 16,
+ behavior: 'smooth',
+ });
+ setCurTab(0);
+ }}
+ text="Промышленные тренажеры"
+ />
+ {
+ ref.current?.scrollTo({
+ left: e.currentTarget.offsetLeft - 16,
+ behavior: 'smooth',
+ });
+ setCurTab(1);
+ }}
+ text="Симуляторы управления техникой"
+ />
+ {
+ ref.current?.scrollTo({
+ left: e.currentTarget.offsetLeft - 16,
+ behavior: 'smooth',
+ });
+ setCurTab(2);
+ }}
+ text="Тренажеры для учебных заведений"
+ />
+
+ {curTab === 0 ? (
+
+ ) : curTab === 1 ? (
+
+ ) : (
+
+ )}
- {curTab === 0 ? (
-
- ) : curTab === 1 ? (
-
- ) : (
-
- )}
);
}
@@ -129,7 +131,7 @@ function TeachingItem({
function TrainingsTab() {
return (
-
+
@@ -246,7 +248,7 @@ function SimulatorsTab() {
>
@@ -318,7 +320,7 @@ function SimulatorsItem({ text }: { text: string }) {
function ForTeachingTab() {
return (
-
+
Интерактивные тренажеры для учебных заведений
diff --git a/src/components/Main/Teaching.tsx b/src/components/Main/Teaching.tsx
index b003ba2..e428155 100644
--- a/src/components/Main/Teaching.tsx
+++ b/src/components/Main/Teaching.tsx
@@ -67,7 +67,7 @@ function TeachingFeaturesForDesktop() {
diff --git a/src/ui/AppearanceText.tsx b/src/ui/AppearanceText.tsx
new file mode 100644
index 0000000..33ae792
--- /dev/null
+++ b/src/ui/AppearanceText.tsx
@@ -0,0 +1,28 @@
+import { useInView, motion } from 'framer-motion';
+import { useRef } from 'react';
+
+export default function AppearanceText({
+ text,
+ opacity,
+ duration,
+}: {
+ text: string;
+ opacity: number;
+ duration: number;
+}) {
+ const ref = useRef
(null);
+ const isInView = useInView(ref);
+
+ return (
+
+ {text}
+
+ );
+}
diff --git a/yarn.lock b/yarn.lock
index 074e16c..b33f520 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1242,6 +1242,13 @@ fraction.js@^4.3.7:
resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.3.7.tgz#06ca0085157e42fda7f9e726e79fefc4068840f7"
integrity sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==
+framer-motion@^11.2.14:
+ version "11.2.14"
+ resolved "https://registry.yarnpkg.com/framer-motion/-/framer-motion-11.2.14.tgz#739aa2eb7bcd4fe49f4cd9b88d352eb85d6cda8b"
+ integrity sha512-0Nwg++Jymj4Yn7LFKH/nKuGrgVZTEIgIbLjl+LBBFBEzNd4rX+n3z/doqjEbvjk1xcmsim9h7du2+LTYdQTULw==
+ dependencies:
+ tslib "^2.4.0"
+
fs.realpath@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
@@ -2123,6 +2130,11 @@ ts-interface-checker@^0.1.9:
resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699"
integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==
+tslib@^2.4.0:
+ version "2.6.3"
+ resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0"
+ integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==
+
type-check@^0.4.0, type-check@~0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1"