i forgot
This commit is contained in:
parent
30f2b4714d
commit
0c9f7a7822
21 changed files with 1868 additions and 1839 deletions
|
|
@ -6,32 +6,31 @@
|
|||
import { useEffect, useState } from "preact/hooks";
|
||||
|
||||
export default function Name() {
|
||||
const names = ["muxiepuff", "lívia", "aury"];
|
||||
const ipas = ["/ˈmuˌksipʌf/", "/li.vjɐ/", "/ˈaʊ̯ˌɾi/"]
|
||||
;
|
||||
const [currentIndex, setCurrentIndex] = useState(0);
|
||||
const [isAnimating, setIsAnimating] = useState(false);
|
||||
const names = ["muxiepuff", "lívia", "aury"];
|
||||
const ipas = ["/ˈmuˌksipʌf/", "/li.vjɐ/", "/ˈaʊ̯ˌɾi/"];
|
||||
const [currentIndex, setCurrentIndex] = useState(0);
|
||||
const [isAnimating, setIsAnimating] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
const interval = setInterval(() => {
|
||||
setIsAnimating(true);
|
||||
setTimeout(() => {
|
||||
setCurrentIndex((prev) => (prev + 1) % names.length);
|
||||
setIsAnimating(false);
|
||||
}, 200);
|
||||
}, 2000);
|
||||
return () => clearInterval(interval);
|
||||
}, []);
|
||||
useEffect(() => {
|
||||
const interval = setInterval(() => {
|
||||
setIsAnimating(true);
|
||||
setTimeout(() => {
|
||||
setCurrentIndex((prev) => (prev + 1) % names.length);
|
||||
setIsAnimating(false);
|
||||
}, 200);
|
||||
}, 2000);
|
||||
return () => clearInterval(interval);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<span class="name-scroller">
|
||||
<span class={`name-wrapper ${isAnimating ? "animating" : ""}`}>
|
||||
<span class="name-text">
|
||||
{names[currentIndex]}
|
||||
<span class="name-underline"></span>
|
||||
</span>{" "}
|
||||
<span class="alt alt-font">({ipas[currentIndex]}, she/her)</span>
|
||||
</span>
|
||||
</span>
|
||||
);
|
||||
return (
|
||||
<span class="name-scroller">
|
||||
<span class={`name-wrapper ${isAnimating ? "animating" : ""}`}>
|
||||
<span class="name-text">
|
||||
{names[currentIndex]}
|
||||
<span class="name-underline"></span>
|
||||
</span>{" "}
|
||||
<span class="alt alt-font">({ipas[currentIndex]}, she/her)</span>
|
||||
</span>
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue