Skip to content

Commit ae1c696

Browse files
Lisofffaalsakhaev
authored andcommitted
fix: update styles about page
1 parent 8d1fc6f commit ae1c696

File tree

8 files changed

+189
-4
lines changed

8 files changed

+189
-4
lines changed
Lines changed: 12 additions & 0 deletions
Loading
Lines changed: 12 additions & 0 deletions
Loading

website/src/components/HomePage/ExamplesFirstSection.module.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@
4444
height: auto;
4545
border-radius: .625rem;
4646
transition: none;
47+
48+
&:hover{
49+
transform: none!important;
50+
cursor: default;
51+
}
4752
}
4853

4954
.content {

website/src/components/HomePage/FeaturesSection.module.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
display: flex;
9696
justify-content: center;
9797
align-items: center;
98+
opacity: 0;
9899
}
99100

100101
.featureImage {
@@ -133,6 +134,7 @@
133134
transition: all 0.2s ease;
134135
text-decoration: none;
135136
color: inherit;
137+
opacity: 0;
136138

137139
&:hover {
138140
background: radial-gradient(

website/src/components/HomePage/HeroSection.module.scss

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
transform: scale(1.01);
2222
z-index: 1;
2323
pointer-events: none;
24+
25+
&--mobile{
26+
display: none;
27+
}
2428
}
2529

2630
.titleBlock {
@@ -67,7 +71,17 @@
6771
}
6872

6973
.img {
70-
display: none;
74+
&--desk{
75+
display: none;
76+
}
77+
78+
&--mobile{
79+
display: block;
80+
width: auto;
81+
height: auto;
82+
top: -15rem;
83+
object-fit: contain;
84+
}
7185
}
7286

7387
.buttons {
@@ -80,6 +94,12 @@
8094
}
8195
}
8296

97+
@media (max-width: 849px) {
98+
.img--mobile{
99+
display: none;
100+
}
101+
}
102+
83103
@media (max-width: 719px) {
84104
.wrapper {
85105
padding: 0 1.25rem;

website/src/components/HomePage/HeroSection.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,19 @@ const HeroSection = () => {
9999
</div>
100100
<SupportedBySection />
101101
<ThemeImage
102-
className={cn(styles.img, styles['img-left'])}
102+
className={cn(styles.img, styles['img--desk'])}
103103
width={1920}
104104
height={761}
105105
alt='arrow'
106106
src='icons/home/bg-title.svg'
107107
/>
108+
<ThemeImage
109+
className={cn(styles.img,styles['img--mobile'])}
110+
width={1185}
111+
height={761}
112+
alt='arrow'
113+
src='icons/home/bg-tablet.svg'
114+
/>
108115
</section>
109116
);
110117
};

website/src/pages/about/About.module.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,24 @@
5353
justify-content: center;
5454
margin-top: -3.75rem;
5555
transform: translateX(0.625rem);
56+
position: relative;
57+
transition: transform 0.1s ease-out;
58+
will-change: transform;
59+
60+
img:hover{
61+
transform: none!important;
62+
}
5663
}
5764

5865
.supportedBlockIcon {
5966
margin: 0 auto;
6067
max-width: 75rem;
68+
transition: transform 0.3s cubic-bezier(0.17, 0.67, 0.83, 0.67);
69+
filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
70+
71+
&:hover {
72+
filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.2));
73+
}
6174
}
6275

6376
.problemWrapper {

website/src/pages/about/index.tsx

Lines changed: 116 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,116 @@
1+
'use client';
2+
3+
import { useEffect, useRef } from 'react';
14
import styles from './About.module.scss';
25
import { Layout } from '@/components/Layout';
36
import { brand, mission, problem, title } from '@/constants/constantsTextAbout';
47
import { Button } from '@/components/Button';
58
import { ThemeImage } from '@/components/ThemeImage';
9+
import gsap from 'gsap';
610

711
function About() {
12+
const rotatingImageRef = useRef<HTMLDivElement>(null);
13+
const mousePosition = useRef({ x: 0, y: 0 });
14+
const animationRef = useRef<gsap.core.Tween | null>(null);
15+
const floatAnimationRef = useRef<gsap.core.Tween | null>(null);
16+
17+
useEffect(() => {
18+
if (!rotatingImageRef.current) return;
19+
20+
const initComplexAnimation = () => {
21+
gsap.set(rotatingImageRef.current, {
22+
transformPerspective: 1000,
23+
transformOrigin: 'center center'
24+
});
25+
26+
const appearTl = gsap.timeline();
27+
appearTl.from(rotatingImageRef.current, {
28+
scale: 0.7,
29+
opacity: 0,
30+
rotationY: 180,
31+
duration: 1.8,
32+
ease: 'elastic.out(1, 0.6)'
33+
});
34+
35+
floatAnimationRef.current = gsap.to(rotatingImageRef.current, {
36+
y: '-=15',
37+
duration: 3,
38+
repeat: -1,
39+
yoyo: true,
40+
ease: 'sine.inOut'
41+
});
42+
43+
gsap.to(rotatingImageRef.current, {
44+
rotationY: 360,
45+
duration: 25,
46+
repeat: -1,
47+
ease: 'none'
48+
});
49+
};
50+
51+
const handleMouseMove = (e: MouseEvent) => {
52+
if (!rotatingImageRef.current) return;
53+
54+
mousePosition.current = {
55+
x: (e.clientX / window.innerWidth - 0.5) * 2,
56+
y: (e.clientY / window.innerHeight - 0.5) * 2
57+
};
58+
59+
if (animationRef.current) animationRef.current.kill();
60+
61+
animationRef.current = gsap.to(rotatingImageRef.current, {
62+
rotationY: mousePosition.current.x * 15,
63+
rotationX: -mousePosition.current.y * 10,
64+
x: mousePosition.current.x * 20,
65+
y: mousePosition.current.y * 20,
66+
duration: 1.5,
67+
ease: 'power2.out'
68+
});
69+
};
70+
71+
const handleMouseEnter = () => {
72+
gsap.to(rotatingImageRef.current, {
73+
scale: 1.1,
74+
duration: 0.7,
75+
ease: 'back.out(2)',
76+
overwrite: true
77+
});
78+
79+
gsap.to(rotatingImageRef.current, {
80+
'--glow-opacity': 0.3,
81+
'--glow-spread': '20px',
82+
duration: 0.5
83+
});
84+
};
85+
86+
const handleMouseLeave = () => {
87+
gsap.to(rotatingImageRef.current, {
88+
scale: 1,
89+
rotationY: 0,
90+
rotationX: 0,
91+
x: 0,
92+
y: 0,
93+
'--glow-opacity': 0.1,
94+
'--glow-spread': '10px',
95+
duration: 1.5,
96+
ease: 'elastic.out(1, 0.5)'
97+
});
98+
};
99+
100+
initComplexAnimation();
101+
window.addEventListener('mousemove', handleMouseMove);
102+
rotatingImageRef.current.addEventListener('mouseenter', handleMouseEnter);
103+
rotatingImageRef.current.addEventListener('mouseleave', handleMouseLeave);
104+
105+
return () => {
106+
window.removeEventListener('mousemove', handleMouseMove);
107+
rotatingImageRef.current?.removeEventListener('mouseenter', handleMouseEnter);
108+
rotatingImageRef.current?.removeEventListener('mouseleave', handleMouseLeave);
109+
animationRef.current?.kill();
110+
floatAnimationRef.current?.kill();
111+
};
112+
}, []);
113+
8114
return (
9115
<Layout
10116
title='Empowering Web Communities with Dapplets and Mutable Web: Solving Centralization Issues.'
@@ -30,7 +136,15 @@ function About() {
30136
/>
31137
</div>
32138
</div>
33-
<div className={styles.iconBlock}>
139+
<div
140+
className={styles.iconBlock}
141+
ref={rotatingImageRef}
142+
style={{
143+
'--glow-color': 'var(--accent-color)',
144+
'--glow-opacity': '0.1',
145+
'--glow-spread': '10px'
146+
} as React.CSSProperties}
147+
>
34148
<ThemeImage
35149
className={styles.supportedBlockIcon}
36150
width={439}
@@ -105,4 +219,4 @@ function About() {
105219
);
106220
}
107221

108-
export default About;
222+
export default About;

0 commit comments

Comments
 (0)