File tree 5 files changed +94
-6
lines changed
5 files changed +94
-6
lines changed Original file line number Diff line number Diff line change 21
21
"react-calendar" : " ^5.0.0" ,
22
22
"react-dom" : " ^18.2.0" ,
23
23
"react-router-dom" : " ^6.22.3" ,
24
- "swiper" : " ^11.1.1 "
24
+ "swiper" : " ^11.1.3 "
25
25
},
26
26
"devDependencies" : {
27
27
"@types/lodash" : " ^4.17.1" ,
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import moment from "moment";
28
28
import "moment/locale/ko" ;
29
29
import { Beforeunload } from "react-beforeunload" ;
30
30
import NotDataWithContentBox from "@/component/common/NotDataWithContentBox.tsx" ;
31
+ import StatusBar from "@/component/main/StatusBar.tsx" ;
31
32
32
33
export type ValuePiece = Date | null ;
33
34
export type Value = ValuePiece | [ ValuePiece , ValuePiece ] ;
@@ -231,6 +232,7 @@ export default function Main() {
231
232
text-align : center;
232
233
` }
233
234
/>
235
+ < StatusBar todoList = { todo } completeList = { complete } />
234
236
</ ContentBox >
235
237
</ div >
236
238
< ContentBox
Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ import telemechine3D from "@/assets/3d/performence/telemechine.gif";
15
15
16
16
import { css } from "@emotion/react" ;
17
17
import { Swiper , SwiperSlide } from "swiper/react" ;
18
+ import { Autoplay } from "swiper/modules" ;
19
+
18
20
import "swiper/css" ;
19
21
import { DESIGN_SYSTEM_COLOR } from "@/style/variable.ts" ;
20
22
import { useRef } from "react" ;
@@ -41,7 +43,16 @@ export default function Performence() {
41
43
42
44
return (
43
45
< div >
44
- < Swiper spaceBetween = { 30 } slidesPerView = { 3 } >
46
+ < Swiper
47
+ modules = { [ Autoplay ] }
48
+ spaceBetween = { 30 }
49
+ slidesPerView = { 3.5 }
50
+ autoplay = { {
51
+ delay : 1500 ,
52
+ disableOnInteraction : false ,
53
+ } }
54
+ loop = { true }
55
+ >
45
56
{ mock . map ( ( item ) => {
46
57
const key = useRef ( Math . floor ( Math . random ( ) * GRAPHIC_LIST . length ) ) ;
47
58
return (
Original file line number Diff line number Diff line change
1
+ import { css } from "@emotion/react" ;
2
+ import { DESIGN_SYSTEM_COLOR } from "@/style/variable.ts" ;
3
+ import { agendaProps } from "@/app/main" ;
4
+
5
+ interface statusDataProps {
6
+ todoList : agendaProps [ ] ;
7
+ completeList : agendaProps [ ] ;
8
+ }
9
+ export default function StatusBar ( { todoList, completeList } : statusDataProps ) {
10
+ return (
11
+ < div
12
+ css = { css `
13
+ display : flex;
14
+ flex-direction : column;
15
+ row-gap : 1.5rem ;
16
+ width : 100% ;
17
+ ` }
18
+ >
19
+ < div
20
+ css = { css `
21
+ position : relative;
22
+ width : 100% ;
23
+ border-radius : 0.7rem ;
24
+ height : 0.8rem ;
25
+ background-color : ${ DESIGN_SYSTEM_COLOR . grey100 } ;
26
+ ` }
27
+ >
28
+ < div
29
+ css = { css `
30
+ position : absolute;
31
+ width : ${ ( completeList . length / ( todoList . length + completeList . length ) ) * 100 } %;
32
+ bor der- radius: 0.7rem ;
33
+ height : 0.8rem ;
34
+ background-color : ${ DESIGN_SYSTEM_COLOR . kreamBlack } ;
35
+ transition : 0.4s all;
36
+ ` }
37
+ />
38
+ </ div >
39
+ < div
40
+ css = { css `
41
+ width : 100% ;
42
+ display : flex;
43
+ color : ${ DESIGN_SYSTEM_COLOR . kreamBlack } ;
44
+ font-weight : 300 ;
45
+
46
+ # score {
47
+ font-weight : 500 ;
48
+ }
49
+
50
+ span : nth-of-type (1 ) {
51
+ margin-right : auto;
52
+ }
53
+
54
+ div : nth-of-type (1 ) {
55
+ margin-left : auto;
56
+ display : flex;
57
+ column-gap : 0.8rem ;
58
+ }
59
+ ` }
60
+ >
61
+ < span id = "score" >
62
+ { todoList . length && completeList . length ? Math . floor ( ( completeList . length / ( todoList . length + completeList . length ) ) * 100 ) : 0 } %{ " " }
63
+ </ span >
64
+ < div >
65
+ < span >
66
+ 완료된 아젠다 < span id = "score" > { completeList . length } </ span >
67
+ </ span >
68
+ < span >
69
+ 오픈된 아젠다 < span id = "score" > { todoList . length } </ span >
70
+ </ span >
71
+ </ div >
72
+ </ div >
73
+ </ div >
74
+ ) ;
75
+ }
You can’t perform that action at this time.
0 commit comments