Skip to content

Commit 67ae9a4

Browse files
authored
Merge pull request #60 from KWcapstone/59-feat-스플래시-페이지-애니메이션-작업-완성
59 feat 스플래시 페이지 애니메이션 작업 완성
2 parents 01ce680 + 2356569 commit 67ae9a4

File tree

11 files changed

+130
-18
lines changed

11 files changed

+130
-18
lines changed
-168 KB
Binary file not shown.
Lines changed: 4 additions & 0 deletions
Loading
Lines changed: 4 additions & 0 deletions
Loading
Lines changed: 4 additions & 0 deletions
Loading
Lines changed: 4 additions & 0 deletions
Loading
Lines changed: 4 additions & 0 deletions
Loading

src/assets/imgs/common/mainImage.svg renamed to src/assets/imgs/common/splash_main_img.svg

Lines changed: 8 additions & 8 deletions
Loading
Lines changed: 7 additions & 0 deletions
Loading

src/sass/helpers/_mixins.scss

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,53 @@
1+
@mixin keyframe($name) {
2+
// #{}는 템플릿 리터럴과 비슷한 역할을 한다. 인자를 쿼리명으로 받는다.
3+
@keyframes #{$name} {
4+
@content;
5+
}
6+
}
7+
8+
@include keyframe(appear) {
9+
from {
10+
opacity: 0;
11+
scale: 0.3;
12+
}
13+
to {
14+
opacity: 1;
15+
scale: 1;
16+
}
17+
}
18+
19+
@include keyframe(appear_x) {
20+
from {
21+
opacity: 0;
22+
transform: translateX(-100px);
23+
}
24+
to {
25+
opacity: 1;
26+
transform: translateX(0);
27+
}
28+
}
29+
30+
@include keyframe(appear_y) {
31+
from {
32+
opacity: 0;
33+
transform: translateY(150px);
34+
}
35+
to {
36+
opacity: 1;
37+
transform: translateY(0);
38+
}
39+
}
40+
41+
@mixin animation(
42+
$name,
43+
$timingFunction: linear,
44+
$animationRange: "entry 0% cover 40%"
45+
) {
46+
animation: #{$name} $timingFunction;
47+
animation-timeline: view();
48+
animation-range: #{$animationRange};
49+
}
50+
151
@mixin size($width: null, $height: null) {
252
$width_attr: width, max, min;
353
$height_attr: height, max, min;

src/views/splash/page/SplashPage.tsx

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,27 @@
1-
import Navbar from "@/views/splash/components/Navbar";
2-
1+
// style
32
import "@/views/splash/style/splash.sass";
43
import "@/views/components/style/modal.sass";
4+
import splashIcon from "@/assets/imgs/common/splashIcon.svg";
5+
import mainImage from "@/assets/imgs/common/splash_main_img.svg";
6+
import solarSystem from "@/assets/imgs/common/splash_solarSystem.svg";
7+
import keyword1 from "@/assets/imgs/common/splash_keyword1.svg";
8+
import keyword2 from "@/assets/imgs/common/splash_keyword2.svg";
9+
import keyword3 from "@/assets/imgs/common/splash_keyword3.svg";
10+
import keyword4 from "@/assets/imgs/common/splash_keyword4.svg";
11+
import keyword5 from "@/assets/imgs/common/splash_keyword5.svg";
512

13+
// library
614
import { useState, useEffect, useRef } from "react";
715

16+
// component
17+
import Navbar from "@/views/splash/components/Navbar";
818
import LoginModal from "@/views/splash/components/LoginModal";
919
import SignupModal from "@/views/splash/components/SignupModal";
1020
import AgreeModal from "@/views/splash/components/AgreeModal";
1121
import PasswordResetModal from "@/views/splash/components/PasswordResetModal";
12-
import { getTest } from "@/api/common/common";
1322

14-
import splashIcon from "@/assets/imgs/common/splashIcon.svg";
15-
import mainImage from "@/assets/imgs/common/mainImage.svg";
16-
import solarSystem from "@/assets/imgs/common/solarSystem.svg";
23+
// api
24+
import { getTest } from "@/api/common/common";
1725

1826
const SplashPage = () => {
1927
type ModalType = "login" | "signup" | "agree" | "resetPw" | null;
@@ -133,8 +141,14 @@ const SplashPage = () => {
133141
<img
134142
src={solarSystem}
135143
alt="solarSystem"
136-
className="spacial-img-img"
144+
className="spacial-solar-img"
137145
/>
146+
147+
<img src={keyword1} alt="keyword1" className="keyword1" />
148+
<img src={keyword2} alt="keyword2" className="keyword2" />
149+
<img src={keyword3} alt="keyword3" className="keyword3" />
150+
<img src={keyword4} alt="keyword4" className="keyword4" />
151+
<img src={keyword5} alt="keyword5" className="keyword5" />
138152
</div>
139153
</div>
140154
</div>

0 commit comments

Comments
 (0)