Skip to content

Commit a563967

Browse files
committed
Add cool animations to title
1 parent 748c655 commit a563967

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

app/globals.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,16 @@ h1 {
8383
font-weight: 800;
8484
}
8585

86+
h1 .char {
87+
transition: 0.1s;
88+
text-shadow: 0 0 0 rgba(0, 0, 0, 0.6);
89+
}
90+
91+
h1 .char:hover {
92+
transform: translate(0, -20px);
93+
text-shadow: 0 20px 20px rgba(0, 0, 0, 0.6);
94+
}
95+
8696
@media screen and (max-width: 900px) {
8797
h1 {
8898
font-size: 96;

app/page.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import toast from "react-hot-toast";
1212
import headerIconStyles from "@/styles/headerIcon.module.css";
1313
import titleStyles from "@/styles/title.module.css";
1414
import cardStyles from "@/styles/card.module.css";
15+
import SplitType from "split-type";
1516

1617
export default function Home() {
1718
const copy = (text: string) => {
@@ -28,7 +29,13 @@ export default function Home() {
2829
<Logo className={headerIconStyles.icon} />
2930
<div className={titleStyles.title}>
3031
<p className={titleStyles.tagline}>Hi, I&apos;m</p>
31-
<h1>FOXED</h1>
32+
<h1
33+
ref={(el) => {
34+
if (el) new SplitType(el, { split: "chars" });
35+
}}
36+
>
37+
FOXED
38+
</h1>
3239
<p className={titleStyles.subtitle}>
3340
I&apos;m a Minecraft data pack creator and web developer from
3441
Germany.

0 commit comments

Comments
 (0)