diff --git a/src/assets/image/logo-with-pen.png b/src/assets/image/logo-with-pen.png new file mode 100644 index 0000000..d5b78e1 Binary files /dev/null and b/src/assets/image/logo-with-pen.png differ diff --git a/src/assets/image/yellow-diary.png b/src/assets/image/yellow-diary.png new file mode 100644 index 0000000..f78de45 Binary files /dev/null and b/src/assets/image/yellow-diary.png differ diff --git a/src/components/Animation.tsx b/src/components/Animation.tsx new file mode 100644 index 0000000..ae6903a --- /dev/null +++ b/src/components/Animation.tsx @@ -0,0 +1,8 @@ +export const Animation = () => { + return ( +
+
+
+
+ ); +}; diff --git a/src/components/Home/Slogan.tsx b/src/components/Home/Slogan.tsx index 1398255..f65bdb8 100644 --- a/src/components/Home/Slogan.tsx +++ b/src/components/Home/Slogan.tsx @@ -1,15 +1,22 @@ +import { Animation } from '@components/Animation.tsx'; + export const Slogan = (props: any) => { return ( -
-

- TIL을 쓰지 않으면 -

-
-

- 의 하루는 - 나지 않는다. -

-

TIL이란 ? Today I Learned !

+
+
+

+ TIL을 쓰지 않으면 +

+
+

+ 의 하루는 + 나지 않는다. +

+

TIL이란 ? Today I Learned !

+
+
); }; diff --git a/src/globals.css b/src/globals.css index bf1320d..6afbdfb 100644 --- a/src/globals.css +++ b/src/globals.css @@ -89,6 +89,10 @@ @apply fixed bottom-[24px] right-[24px] z-50 flex flex-row gap-x-2; } +.slogan-container { + @apply flex flex-row justify-center w-[800px] h-[150px] +} + .profileImg { transition: 1.5s; } @@ -241,3 +245,65 @@ button:hover .cock-button-img { .highlight-effect { animation: highContrastTwinkle 2s ease-in-out infinite; } + +/* slogan 애니메이션 */ +.animation-container { + @apply rounded w-[400px] overflow-hidden +} + +.star { + animation: star-move 15s infinite; + @apply relative z-10 mx-auto w-[100px] h-[100px] bg-cover +} + +.diary { + animation: diary-move 15s infinite; + @apply relative z-0 mx-auto w-[100px] h-[100px] bg-cover +} + +.animation-container .star { + background-image: url('src/assets/image/logo-with-pen.png'); +} + +.animation-container .diary { + background-image: url('src/assets/image/yellow-diary.png') +} + +@keyframes star-move { + 0% { + transform: translateX(-200px) translateY(200px) rotate(-30deg); + } + 30% { + transform: translateX(0px) translateY(0px) rotate(0deg); + } + 40% { + transform: translateX(10px) + } + 50% { + transform: translateX(-10px) + } + 60% { + transform: translateX(10px) + } + 70% { + transform: translateX(0px) translateY(0px) rotate(0deg); + } + 100% { + transform: translateX(200px) translateY(200px) rotate(30deg); + } +} + +@keyframes diary-move { + 0% { + transform: translateX(400px) translateY(-100px); + } + 30% { + transform: translateX(30px) translateY(-100px); + } + 70% { + transform: translateX(30px) translateY(-100px); + } + 100% { + transform: translateX(-400px) translateY(-100px); + } +} \ No newline at end of file