Skip to content

Commit 69cf5c3

Browse files
committed
Home page sliding animation updated
1 parent 0e604ab commit 69cf5c3

File tree

2 files changed

+8
-33
lines changed

2 files changed

+8
-33
lines changed

src/routes/Home/index.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,7 @@ function Home(): JSX.Element {
3838
</span>
3939
<span className={styles.webDeveloperOverlay} data-nosnippet>
4040
<span className={styles.cursor}>|</span>
41-
<span className={styles.overlay}>
42-
<span>Web Developer&nbsp;</span>
43-
<i className="fas fa-laptop-code" />
44-
</span>
41+
<span className={styles.overlay} />
4542
</span>
4643
</span>
4744
</h2>

src/routes/Home/styles.module.scss

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ $animationDelay: 1s;
5353
opacity: 1;
5454
color: white;
5555
background-color: white;
56-
// animation: toggle 5s linear 4s infinite normal;
57-
animation: toggle 5s linear $animationDelay infinite normal;
56+
animation: toggle 8s linear $animationDelay infinite normal;
5857
left: 100%;
58+
will-change: transform;
5959

6060
.cursor {
6161
position: relative;
@@ -66,29 +66,13 @@ $animationDelay: 1s;
6666
}
6767

6868
.overlay {
69-
display: flex;
70-
width: 212px;
69+
width: 210px;
7170
}
7271
}
7372
}
7473
}
7574

7675
.pointsWrapper {
77-
// ul {
78-
// li {
79-
// transform: translateX(200%);
80-
// animation: slide-from-right 2s linear 1s 1 forwards;
81-
// }
82-
83-
// li:first-child {
84-
// animation-delay: 0s;
85-
// }
86-
87-
// li:last-child {
88-
// animation-delay: 2s;
89-
// }
90-
// }
91-
9276
blockquote {
9377
color: #000;
9478
text-shadow: 1px 1px 2px gold;
@@ -151,15 +135,15 @@ $animationDelay: 1s;
151135

152136
@keyframes toggle {
153137
0%,
154-
10%,
155-
90%,
138+
15%,
139+
85%,
156140
100% {
157-
left: 100%;
141+
transform: translateX(0%)
158142
}
159143

160144
33%,
161145
67% {
162-
left: 0%;
146+
transform: translateX(calc(-100% + 7.5px))
163147
}
164148
}
165149

@@ -169,12 +153,6 @@ $animationDelay: 1s;
169153
}
170154
}
171155

172-
// @keyframes slide-from-right {
173-
// to {
174-
// transform: translateX(0%);
175-
// }
176-
// }
177-
178156
@keyframes glowing {
179157
from {
180158
text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px gold, 0 0 40px gold,

0 commit comments

Comments
 (0)