@edu-tosel/design 1.0.6 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (252) hide show
  1. package/README.md +0 -20
  2. package/{src/board/index.tsx → board/index.d.ts} +3 -4
  3. package/board/index.js +3 -0
  4. package/board/template/CanvasBoard.d.ts +2 -0
  5. package/board/template/CanvasBoard.js +10 -0
  6. package/board/template/ManageBoard.d.ts +4 -0
  7. package/board/template/ManageBoard.js +27 -0
  8. package/board/widget/Board.d.ts +2 -0
  9. package/board/widget/Board.js +16 -0
  10. package/board/widget/DataField.d.ts +6 -0
  11. package/board/widget/DataField.js +24 -0
  12. package/board/widget/Header.d.ts +2 -0
  13. package/board/widget/Header.js +22 -0
  14. package/board/widget/Tab.d.ts +4 -0
  15. package/board/widget/Tab.js +17 -0
  16. package/board/widget/Tags.d.ts +3 -0
  17. package/board/widget/Tags.js +30 -0
  18. package/{src/card/index.tsx → card/index.d.ts} +6 -6
  19. package/card/index.js +6 -0
  20. package/card/template/ChartCard.d.ts +2 -0
  21. package/card/template/ChartCard.js +6 -0
  22. package/card/template/InfoCard.d.ts +2 -0
  23. package/card/template/InfoCard.js +6 -0
  24. package/card/template/ProfileCard.d.ts +14 -0
  25. package/card/template/ProfileCard.js +8 -0
  26. package/card/template/RowCard.d.ts +5 -0
  27. package/card/template/RowCard.js +26 -0
  28. package/card/template/TableCard.d.ts +2 -0
  29. package/card/template/TableCard.js +12 -0
  30. package/card/template/TrumpCard.d.ts +2 -0
  31. package/card/template/TrumpCard.js +19 -0
  32. package/card/widget/Card.d.ts +2 -0
  33. package/card/widget/Card.js +45 -0
  34. package/deck/Deck.d.ts +16 -0
  35. package/deck/Deck.js +15 -0
  36. package/{src/deck/index.tsx → deck/index.d.ts} +1 -1
  37. package/deck/index.js +1 -0
  38. package/{src/index.tsx → index.d.ts} +11 -11
  39. package/index.js +11 -0
  40. package/interaction/index.d.ts +4 -0
  41. package/interaction/index.js +4 -0
  42. package/interaction/template/Exception.d.ts +2 -0
  43. package/interaction/template/Exception.js +9 -0
  44. package/interaction/widget/LoadingJumper.d.ts +1 -0
  45. package/interaction/widget/LoadingJumper.js +4 -0
  46. package/interaction/widget/LoadingSpinner.d.ts +1 -0
  47. package/interaction/widget/LoadingSpinner.js +5 -0
  48. package/interaction/widget/NoData.d.ts +1 -0
  49. package/interaction/widget/NoData.js +4 -0
  50. package/interface/Board.d.ts +57 -0
  51. package/interface/Board.js +1 -0
  52. package/interface/Card.d.ts +76 -0
  53. package/interface/Card.js +1 -0
  54. package/{src/interface/HTMLElement.ts → interface/HTMLElement.d.ts} +23 -27
  55. package/interface/HTMLElement.js +1 -0
  56. package/interface/Interaction.d.ts +5 -0
  57. package/interface/Interaction.js +1 -0
  58. package/interface/Menu.d.ts +6 -0
  59. package/interface/Menu.js +1 -0
  60. package/interface/Modal.d.ts +18 -0
  61. package/interface/Modal.js +1 -0
  62. package/{src/interface/Property.ts → interface/Property.d.ts} +40 -46
  63. package/interface/Property.js +14 -0
  64. package/interface/Widget.d.ts +4 -0
  65. package/interface/Widget.js +1 -0
  66. package/{src/interface/index.ts → interface/index.d.ts} +3 -3
  67. package/interface/index.js +3 -0
  68. package/layout/dashboard/Header.d.ts +5 -0
  69. package/layout/dashboard/Header.js +19 -0
  70. package/layout/dashboard/index.d.ts +7 -0
  71. package/layout/dashboard/index.js +10 -0
  72. package/{src/layout/index.tsx → layout/index.d.ts} +1 -1
  73. package/layout/index.js +1 -0
  74. package/menu/index.d.ts +1 -0
  75. package/menu/index.js +1 -0
  76. package/menu/template/SideMenu.d.ts +2 -0
  77. package/menu/template/SideMenu.js +20 -0
  78. package/menu/widget/HTMLElement.d.ts +8 -0
  79. package/menu/widget/HTMLElement.js +9 -0
  80. package/modal/AlertModal.d.ts +2 -0
  81. package/modal/AlertModal.js +8 -0
  82. package/modal/ControllerModal.d.ts +6 -0
  83. package/modal/ControllerModal.js +6 -0
  84. package/modal/Modal.d.ts +2 -0
  85. package/modal/Modal.js +31 -0
  86. package/modal/TestModal.d.ts +8 -0
  87. package/modal/TestModal.js +6 -0
  88. package/{src/modal/index.tsx → modal/index.d.ts} +3 -3
  89. package/modal/index.js +3 -0
  90. package/navigation/Navigation.d.ts +5 -0
  91. package/navigation/Navigation.js +24 -0
  92. package/{src/navigation/index.tsx → navigation/index.d.ts} +1 -1
  93. package/navigation/index.js +1 -0
  94. package/package.json +28 -49
  95. package/shelf/Shelf.d.ts +4 -0
  96. package/shelf/Shelf.js +4 -0
  97. package/{src/shelf/index.tsx → shelf/index.d.ts} +1 -1
  98. package/shelf/index.js +1 -0
  99. package/store/index.d.ts +16 -0
  100. package/store/index.js +39 -0
  101. package/text/LineBreaks.d.ts +4 -0
  102. package/text/LineBreaks.js +5 -0
  103. package/{src/text/index.tsx → text/index.d.ts} +1 -1
  104. package/text/index.js +1 -0
  105. package/util/classNames.d.ts +1 -0
  106. package/util/classNames.js +4 -0
  107. package/util/colors.d.ts +10 -0
  108. package/util/colors.js +10 -0
  109. package/util/display.d.ts +25 -0
  110. package/util/display.js +25 -0
  111. package/util/displayResponsive.d.ts +3 -0
  112. package/util/displayResponsive.js +15 -0
  113. package/{src/util/index.ts → util/index.d.ts} +7 -7
  114. package/util/index.js +7 -0
  115. package/util/pattern.d.ts +7 -0
  116. package/util/pattern.js +15 -0
  117. package/util/position.d.ts +14 -0
  118. package/util/position.js +44 -0
  119. package/util/shape.d.ts +1 -0
  120. package/util/shape.js +3 -0
  121. package/version.txt +1 -0
  122. package/.eslintrc.cjs +0 -17
  123. package/Dockerfile +0 -16
  124. package/LICENCE +0 -19
  125. package/docs/README.md +0 -47
  126. package/index.html +0 -13
  127. package/postcss.config.js +0 -6
  128. package/public/images/daeng.jpg +0 -0
  129. package/public/images/faker.jpg +0 -0
  130. package/public/images/haerin.png +0 -0
  131. package/public/images/haewon.png +0 -0
  132. package/public/images/hani.png +0 -0
  133. package/public/images/home/admin.png +0 -0
  134. package/public/images/home/dashboard.png +0 -0
  135. package/public/images/home/detection.png +0 -0
  136. package/public/images/home/homepage.png +0 -0
  137. package/public/images/home/olympiad.png +0 -0
  138. package/public/images/home/partner.png +0 -0
  139. package/public/images/home/report.png +0 -0
  140. package/public/images/home/space.png +0 -0
  141. package/public/images/home/sun.png +0 -0
  142. package/public/images/info.png +0 -0
  143. package/public/images/itc.png +0 -0
  144. package/public/images/jenkins.png +0 -0
  145. package/public/images/minji.png +0 -0
  146. package/public/images/seulgi.png +0 -0
  147. package/public/images/test-full.png +0 -0
  148. package/public/images/test-image.png +0 -0
  149. package/public/images/test-paper.png +0 -0
  150. package/public/images/tosel-blue-lab-spiral.png +0 -0
  151. package/public/images/tosel.png +0 -0
  152. package/public/images/yujin.png +0 -0
  153. package/public/videos/loading.gif +0 -0
  154. package/public/vite.svg +0 -1
  155. package/setupPackage.js +0 -78
  156. package/src/App.tsx +0 -32
  157. package/src/_components/asset/interface.ts +0 -2
  158. package/src/_components/asset/links.ts +0 -17
  159. package/src/_components/asset/mock/academies.ts +0 -52
  160. package/src/_components/asset/mock/chartData.ts +0 -104
  161. package/src/_components/asset/mock/exams.ts +0 -42
  162. package/src/_components/asset/mock/index.ts +0 -2
  163. package/src/_components/asset/mock/people.ts +0 -291
  164. package/src/_components/asset/mock/test.ts +0 -67
  165. package/src/_components/asset/navigation.ts +0 -17
  166. package/src/_components/asset/people.ts +0 -226
  167. package/src/_components/asset/planets.ts +0 -49
  168. package/src/_components/controller/store.ts +0 -11
  169. package/src/_components/hook/useRoute.ts +0 -47
  170. package/src/_components/hook/useTyping.ts +0 -46
  171. package/src/_components/types/Level.ts +0 -1
  172. package/src/_components/view/Explore.tsx +0 -16
  173. package/src/_components/view/Home.tsx +0 -180
  174. package/src/_components/view/LottiePlayer.tsx +0 -17
  175. package/src/app/admin/exam/page.tsx +0 -36
  176. package/src/app/admin/grade/page.tsx +0 -5
  177. package/src/app/admin/layout.tsx +0 -56
  178. package/src/app/admin/news/page.tsx +0 -15
  179. package/src/app/admin/page.tsx +0 -42
  180. package/src/app/admin/rnd/monthly-test/page.tsx +0 -5
  181. package/src/app/admin/rnd/page.tsx +0 -17
  182. package/src/app/admin/statistics/page.tsx +0 -5
  183. package/src/app/admin/user/page.tsx +0 -147
  184. package/src/app/agency/exam/page.tsx +0 -5
  185. package/src/app/agency/group/page.tsx +0 -5
  186. package/src/app/agency/layout.tsx +0 -55
  187. package/src/app/agency/page.tsx +0 -68
  188. package/src/app/agency/sales/page.tsx +0 -5
  189. package/src/app/convention/page.tsx +0 -58
  190. package/src/app/page.tsx +0 -4
  191. package/src/asset/fonts/Kostar.ttf +0 -0
  192. package/src/asset/fonts/Megrim.ttf +0 -0
  193. package/src/asset/fonts/NicoMoji.ttf +0 -0
  194. package/src/asset/fonts/Pretendard-Medium.otf +0 -0
  195. package/src/board/template/CanvasBoard.tsx +0 -17
  196. package/src/board/template/ManageBoard.tsx +0 -56
  197. package/src/board/widget/Board.tsx +0 -28
  198. package/src/board/widget/DataField.tsx +0 -70
  199. package/src/board/widget/Header.tsx +0 -63
  200. package/src/board/widget/Tab.tsx +0 -36
  201. package/src/board/widget/Tags.tsx +0 -81
  202. package/src/card/template/ChartCard.tsx +0 -42
  203. package/src/card/template/InfoCard.tsx +0 -22
  204. package/src/card/template/ProfileCard.tsx +0 -36
  205. package/src/card/template/RowCard.tsx +0 -91
  206. package/src/card/template/TableCard.tsx +0 -41
  207. package/src/card/template/TrumpCard.tsx +0 -46
  208. package/src/card/widget/Card.tsx +0 -53
  209. package/src/deck/Deck.tsx +0 -46
  210. package/src/interaction/Exception.tsx +0 -10
  211. package/src/interaction/LoadingSpinner.tsx +0 -10
  212. package/src/interaction/NoData.tsx +0 -5
  213. package/src/interaction/index.tsx +0 -2
  214. package/src/interface/Board.ts +0 -55
  215. package/src/interface/Card.ts +0 -66
  216. package/src/interface/Interaction.ts +0 -4
  217. package/src/interface/Menu.ts +0 -5
  218. package/src/interface/Modal.ts +0 -19
  219. package/src/interface/Widget.ts +0 -4
  220. package/src/layout/dashboard/Header.tsx +0 -56
  221. package/src/layout/dashboard/index.tsx +0 -38
  222. package/src/main.tsx +0 -10
  223. package/src/menu/SideMenu.tsx +0 -104
  224. package/src/menu/index.tsx +0 -1
  225. package/src/modal/AlertModal.tsx +0 -24
  226. package/src/modal/ControllerModal.tsx +0 -17
  227. package/src/modal/Modal.tsx +0 -66
  228. package/src/modal/TestModal.tsx +0 -19
  229. package/src/navigation/Navigation.tsx +0 -37
  230. package/src/shelf/Shelf.tsx +0 -3
  231. package/src/store/index.ts +0 -66
  232. package/src/text/LineBreaks.tsx +0 -13
  233. package/src/util/classNames.ts +0 -4
  234. package/src/util/colors.ts +0 -11
  235. package/src/util/display.ts +0 -31
  236. package/src/util/displayResponsive.ts +0 -17
  237. package/src/util/pattern.ts +0 -18
  238. package/src/util/position.ts +0 -43
  239. package/src/util/shape.ts +0 -3
  240. package/src/vite-env.d.ts +0 -1
  241. package/tsconfig.build.json +0 -42
  242. package/tsconfig.json +0 -28
  243. package/tsconfig.node.json +0 -10
  244. package/vite.config.ts +0 -10
  245. /package/{public → asset}/fonts/Kostar.ttf +0 -0
  246. /package/{public → asset}/fonts/Megrim.ttf +0 -0
  247. /package/{public → asset}/fonts/NicoMoji.ttf +0 -0
  248. /package/{public → asset}/fonts/Pretendard-Medium.otf +0 -0
  249. /package/{src/asset → asset}/json/credit-lottie.json +0 -0
  250. /package/{src/asset → asset}/json/loading-lottie.json +0 -0
  251. /package/{src/asset → asset}/json/test.svg +0 -0
  252. /package/{src/globals.css → globals.css} +0 -0
@@ -1,226 +0,0 @@
1
- export const people = [
2
- {
3
- info: {
4
- name: "이상혁",
5
- birthday: "1996-05-07",
6
- image: "/images/faker.jpg",
7
- },
8
- },
9
- {
10
- info: {
11
- name: "젠킨스",
12
- birthday: "1997-05-08",
13
- image: "/images/jenkins.png",
14
- },
15
- },
16
- {
17
- info: {
18
- name: "댕댕이",
19
- birthday: "2012-04-13",
20
- image: "/images/daeng.jpg",
21
- },
22
- },
23
- {
24
- info: {
25
- name: "김민지",
26
- birthday: "2004-05-07",
27
- image: "/images/minji.png",
28
- },
29
- },
30
- {
31
- info: {
32
- name: "팜하니",
33
- birthday: "2004-10-06",
34
- image: "/images/hani.png",
35
- },
36
- },
37
- {
38
- info: {
39
- name: "오해원",
40
- birthday: "2003-02-25",
41
- image: "/images/haewon.png",
42
- },
43
- },
44
- {
45
- info: {
46
- name: "안유진",
47
- birthday: "2003-09-01",
48
- image: "/images/yujin.png",
49
- },
50
- },
51
- {
52
- info: {
53
- name: "강슬기",
54
- birthday: "1994-02-10",
55
- image: "/images/seulgi.png",
56
- },
57
- },
58
- {
59
- info: {
60
- name: "강해린",
61
- birthday: "2006-05-15",
62
- image: "/images/haerin.png",
63
- },
64
- },
65
- {
66
- info: {
67
- name: "TOSEL",
68
- birthday: "2006-05-15",
69
- image: null,
70
- },
71
- },
72
- {
73
- info: {
74
- name: "TOSEL",
75
- birthday: "2006-05-15",
76
- image: null,
77
- },
78
- },
79
- {
80
- info: {
81
- name: "TOSEL",
82
- birthday: "2006-05-15",
83
- image: null,
84
- },
85
- },
86
- {
87
- info: {
88
- name: "TOSEL",
89
- birthday: "2006-05-15",
90
- image: null,
91
- },
92
- },
93
- {
94
- info: {
95
- name: "TOSEL",
96
- birthday: "2006-05-15",
97
- image: null,
98
- },
99
- },
100
- {
101
- info: {
102
- name: "TOSEL",
103
- birthday: "2006-05-15",
104
- image: null,
105
- },
106
- },
107
- {
108
- info: {
109
- name: "TOSEL",
110
- birthday: "2006-05-15",
111
- image: null,
112
- },
113
- },
114
- {
115
- info: {
116
- name: "TOSEL",
117
- birthday: "2006-05-15",
118
- image: null,
119
- },
120
- },
121
- {
122
- info: {
123
- name: "TOSEL",
124
- birthday: "2006-05-15",
125
- image: null,
126
- },
127
- },
128
- {
129
- info: {
130
- name: "TOSEL",
131
- birthday: "2006-05-15",
132
- image: null,
133
- },
134
- },
135
- {
136
- info: {
137
- name: "TOSEL",
138
- birthday: "2006-05-15",
139
- image: null,
140
- },
141
- },
142
- {
143
- info: {
144
- name: "TOSEL",
145
- birthday: "2006-05-15",
146
- image: null,
147
- },
148
- },
149
- {
150
- info: {
151
- name: "TOSEL",
152
- birthday: "2006-05-15",
153
- image: null,
154
- },
155
- },
156
- {
157
- info: {
158
- name: "TOSEL",
159
- birthday: "2006-05-15",
160
- image: null,
161
- },
162
- },
163
- {
164
- info: {
165
- name: "TOSEL",
166
- birthday: "2006-05-15",
167
- image: null,
168
- },
169
- },
170
- {
171
- info: {
172
- name: "TOSEL",
173
- birthday: "2006-05-15",
174
- image: null,
175
- },
176
- },
177
- {
178
- info: {
179
- name: "TOSEL",
180
- birthday: "2006-05-15",
181
- image: null,
182
- },
183
- },
184
- {
185
- info: {
186
- name: "TOSEL",
187
- birthday: "2006-05-15",
188
- image: null,
189
- },
190
- },
191
- {
192
- info: {
193
- name: "TOSEL",
194
- birthday: "2006-05-15",
195
- image: null,
196
- },
197
- },
198
- {
199
- info: {
200
- name: "TOSEL",
201
- birthday: "2006-05-15",
202
- image: null,
203
- },
204
- },
205
- {
206
- info: {
207
- name: "TOSEL",
208
- birthday: "2006-05-15",
209
- image: null,
210
- },
211
- },
212
- {
213
- info: {
214
- name: "TOSEL",
215
- birthday: "2006-05-15",
216
- image: null,
217
- },
218
- },
219
- {
220
- info: {
221
- name: "TOSEL",
222
- birthday: "2006-05-15",
223
- image: null,
224
- },
225
- },
226
- ];
@@ -1,49 +0,0 @@
1
- import { Planet } from "./interface";
2
-
3
- export const planets: Record<Planet, Record<string, string>> = {
4
- olympiad: {
5
- title: "PROJECT: OLYMPIAD",
6
- href: "https://olympiad.tosel.co.kr",
7
- description: `
8
- 올림피아드는 IBT방식의 영어단어 경시대회 및 영어말하기 대회로 기획되었다.
9
- 브라우저에서 도입할 수 있는 치팅 방지 시스템을 개발하였다.
10
- 또한, 영어말하기 대회에서는 녹음을 통해 음성을 전송할 예정이다.
11
-
12
- 올림피아드를 참고하여 토셀 IBT 시험도 개발될 예정이다.
13
- `,
14
- },
15
- admin: {
16
- title: "PROJECT: ADMIN",
17
- href: "/admin",
18
- description: `
19
- 와썹폐기
20
- `,
21
- },
22
- partner: {
23
- title: "PROJECT: PARTNER",
24
- href: "/partner",
25
- description: `
26
- 지본용
27
- `,
28
- },
29
- report: {
30
- title: "PROJECT: REPORT",
31
- href: "/report",
32
- description: `
33
- 기존의 성적 분석 자료 및 성적표를 대체할 새로운 성적 분석 자료로 기획되었다.
34
- 온라인 친화적인 웹뷰와 함께, 다양한 기능을 제공할 것이다.
35
- 또한, 기존의 출력물을 대체할 수 있도록, 다양한 출력물을 제공할 것이다.
36
-
37
- 성적표 프로젝트를 진행하면서 성적 처리 시스템도 보완하였다.
38
- `,
39
- },
40
- homepage: {
41
- title: "PROJECT: HOMEPAGE (NEW)",
42
- href: "/homepage",
43
- description: `
44
- TOSEL의 신규사이트이다.
45
- 기존의 사이트는 불필요한 정보가 많아서 사용자가 원하는 정보를 찾기 어려웠다.
46
- 이를 개선하기 위해 새로운 사이트를 기획하였다.
47
- `,
48
- },
49
- };
@@ -1,11 +0,0 @@
1
- import { create } from "zustand";
2
-
3
- interface PreviewProps {
4
- planet: string;
5
- setPlanet: (planet: string) => void;
6
- }
7
-
8
- export const usePreviewStore = create<PreviewProps>((set) => ({
9
- planet: "",
10
- setPlanet: (planet) => set({ planet }),
11
- }));
@@ -1,47 +0,0 @@
1
- import { useState, useEffect, ComponentType } from "react";
2
-
3
- type PageComponent = ComponentType<any>;
4
-
5
- type RouteItem = {
6
- path: string;
7
- component: PageComponent;
8
- layout: PageComponent | null;
9
- };
10
- const LAYOUTS = import.meta.glob("/src/app/**/layout.tsx") as Record<
11
- string,
12
- () => Promise<{ default: PageComponent }>
13
- >;
14
- const COMPONENTS = import.meta.glob("/src/app/**/[a-z[]*.tsx") as Record<
15
- string,
16
- () => Promise<{ default: PageComponent }>
17
- >;
18
-
19
- export default function useRoute() {
20
- const [routes, setRoutes] = useState<RouteItem[]>([]);
21
- useEffect(() => {
22
- const loadRoutes = async () => {
23
- const routeItems: RouteItem[] = await Promise.all(
24
- Object.keys(COMPONENTS).map(async (key) => {
25
- const path = key
26
- .replace(/\/src\/app|page|\.tsx$/g, "")
27
- .replace(/\[\.{3}.+\]/, "*")
28
- .replace(/\[(.+)\]/, ":$1");
29
- const Component = (await COMPONENTS[key]()).default;
30
- const layoutPath = Object.keys(LAYOUTS).find((layoutKey) =>
31
- key.startsWith(layoutKey.replace(/layout.tsx$/, ""))
32
- );
33
- const Layout = layoutPath
34
- ? (await LAYOUTS[layoutPath]()).default
35
- : null;
36
-
37
- return { path, component: Component, layout: Layout };
38
- })
39
- );
40
-
41
- setRoutes(routeItems);
42
- };
43
- loadRoutes();
44
- }, []);
45
-
46
- return routes;
47
- }
@@ -1,46 +0,0 @@
1
- import { useState, useEffect } from "react";
2
-
3
- export default function useTyping(
4
- text: string,
5
- flag: boolean,
6
- isTitleComplete: boolean,
7
- delay = 100,
8
- ) {
9
- const [displayedText, setDisplayedText] = useState<string[]>([]);
10
- const [index, setIndex] = useState<number>(0);
11
- const [isStarted, setIsStarted] = useState<boolean>(false);
12
- useEffect(() => {
13
- if (flag && !isStarted) {
14
- const startTimer = setTimeout(() => {
15
- setIsStarted(true);
16
- }, 1500);
17
- return () => clearTimeout(startTimer);
18
- }
19
- if (isStarted && flag && index <= text.length) {
20
- if (!isTitleComplete) {
21
- setDisplayedText([]);
22
- setIndex(0);
23
- return;
24
- }
25
- const timer = setTimeout(() => {
26
- const nextChar = text[index] || "";
27
- setDisplayedText((prev) => {
28
- if (nextChar === "\n") {
29
- return [...prev, ""];
30
- }
31
- const last = prev[prev.length - 1] || "";
32
- return [...prev.slice(0, -1), last + nextChar];
33
- });
34
- setIndex(index + 1);
35
- }, delay);
36
- return () => clearTimeout(timer);
37
- }
38
- return () => {
39
- setDisplayedText([]);
40
- setIndex(0);
41
- setIsStarted(false);
42
- };
43
- }, [text, index, delay, flag, isTitleComplete, isStarted]);
44
-
45
- return displayedText;
46
- }
@@ -1 +0,0 @@
1
- export type Level = "" | "PS" | "ST" | "BA" | "JR" | "HJ";
@@ -1,16 +0,0 @@
1
- import { Link } from "react-router-dom";
2
-
3
- export default function Explore() {
4
- return (
5
- <Link
6
- to="/"
7
- className="fixed bottom-16 right-16 flex h-20 w-20 z-50 items-center justify-center rounded-full bg-black/80 shadow-md duration-500 "
8
- >
9
- <img
10
- src="/images/home/sun.png"
11
- alt="explore another space"
12
- className="h-16 w-16"
13
- />
14
- </Link>
15
- );
16
- }
@@ -1,180 +0,0 @@
1
- import { useState, useEffect } from "react";
2
- import { Link } from "react-router-dom";
3
- import { absolute } from "../../util/position";
4
- import { links } from "../asset/links";
5
- import { center } from "../../util/display";
6
- import { Planet, Status } from "../asset/interface";
7
- import { planets } from "../asset/planets";
8
- import useTyping from "../hook/useTyping";
9
- import Explore from "./Explore";
10
- import { useWidgetStore } from "../../store";
11
-
12
- export default function Home() {
13
- const { setView } = useWidgetStore();
14
- const [planet, setPlanet] = useState<Planet>("homepage");
15
- const [clickSun, setClickSun] = useState<boolean>(false);
16
- const [clickPlanet, setClickPlanet] = useState<boolean>(false);
17
- const [planetStatus, setPlanetStatus] = useState<Status>("waiting");
18
- const { title, description } = planets[planet];
19
-
20
- const [hover, setHover] = useState<string>("");
21
-
22
- const toggleSun = () => setClickSun(true);
23
- const togglePlanet = (planet: string) => {
24
- setClickPlanet(!clickPlanet);
25
- setView("preview");
26
- setPlanet(planet as Planet);
27
- };
28
-
29
- useEffect(() => {
30
- if (clickPlanet) {
31
- const timerDoing = setTimeout(() => {
32
- setPlanetStatus("doing");
33
- const timerDone = setTimeout(() => setPlanetStatus("done"), 1500);
34
- return () => clearTimeout(timerDone);
35
- }, 1500);
36
- return () => clearTimeout(timerDoing);
37
- }
38
- }, [clickPlanet]);
39
-
40
- const toselClassNames = () => {
41
- const classNames =
42
- "text-white text-center text-8xl animate-in duration-2000 font-nicomoji ";
43
- if (clickPlanet) return classNames + absolute.full.tl(-48, 0);
44
- if (clickSun) return classNames + absolute.full.tl("1/10", 0);
45
- return classNames + absolute.full.tl("1/5", 0);
46
- };
47
-
48
- const sunClassNames = [
49
- clickSun ? "" : "cursor-pointer",
50
- "h-48 w-48 animate-spin duration-300000",
51
- ].join(" ");
52
- const sunMoveClassNames = () => {
53
- const classNames =
54
- "absolute top-2/5 animate-in duration-1000 flex justify-center w-full ";
55
- if (clickPlanet) return classNames + "-left-3/4";
56
- if (clickSun) return classNames + "-left-1/2";
57
- return classNames + "left-0";
58
- };
59
-
60
- const designSpaceClassNames = [
61
- clickSun ? absolute.full.bl("5/100", 0) : absolute.full.bl("1/5", 0),
62
- "text-white text-center text-3xl animate-in duration-2000 font-kostar ",
63
- ].join(" ");
64
- const planetsContainerClassNames = (index: number) =>
65
- [
66
- clickSun && !clickPlanet
67
- ? `top-43/100 delay-${600 * (index + 1.5)}`
68
- : "-top-36",
69
- `left-${72 + 48 * index}`,
70
- "absolute cursor-pointer animate-in duration-1000 z-40",
71
- ].join(" ");
72
-
73
- const planetsClassName = ["h-36 w-36 "].join(" ");
74
- const planetContainerClassNames = () => {
75
- // const classNames = "border-4 border-white rounded-full duration-2000 delay-3000";
76
- const hide = absolute.tl("1/4", -500) + "duration-500";
77
- const appear = absolute.tl("1/4", "5/100") + "duration-2000";
78
- if (planetStatus === "waiting") {
79
- return hide;
80
- }
81
- if (planetStatus === "doing") return [appear].join(" ");
82
- return [appear, "hover:scale-110"].join(" ");
83
- };
84
- const planetClassNames = "animate-spin duration-60000";
85
-
86
- const descriptionClassNames = () => {
87
- if (!clickPlanet) return "hidden";
88
- return [
89
- absolute.tr("1/3", "5/100"),
90
- center.col(6),
91
- "font-kostar text-green-500 w-240",
92
- ].join(" ");
93
- };
94
-
95
- const displayedTitle = useTyping(title, clickPlanet, true);
96
- const isTitleComplete = displayedTitle.join("") === title;
97
- const displayedDescription = useTyping(
98
- description,
99
- clickPlanet,
100
- isTitleComplete,
101
- 50
102
- );
103
- return (
104
- <div
105
- className={`${center.screen.default} relative min-h-screen animate-[slideBackground_20s_ease-in-out_infinite] bg-image-space bg-contain `}
106
- >
107
- <div className={toselClassNames()}>TOSEL</div>
108
- <div className={sunMoveClassNames()}>
109
- <img
110
- onClick={toggleSun}
111
- src="/images/home/sun.png"
112
- alt="sun"
113
- className={sunClassNames}
114
- />
115
- </div>
116
- <div className={designSpaceClassNames}>DESIGN SPACE</div>
117
- {links.map(({ title }, index) => (
118
- <div key={title} className={planetsContainerClassNames(index)}>
119
- <div className="relative h-full w-full delay-200 duration-500 hover:scale-110">
120
- <img
121
- src={"/images/home/" + title + ".png"}
122
- onClick={() => togglePlanet(title)}
123
- alt={title}
124
- className={planetsClassName}
125
- onMouseEnter={() => setHover(title)}
126
- onMouseLeave={() => setHover("")}
127
- />
128
- {hover === title && !clickPlanet && (
129
- <div className="absolute bottom-40 left-28 z-10 flex h-26 w-75 flex-col items-end gap-2">
130
- <div className="font-megrim text-4xl text-white">{title}</div>
131
- <img
132
- src="/images/home/detection.png"
133
- alt="prject"
134
- className="z-0 h-full w-full"
135
- />
136
- </div>
137
- )}
138
- </div>
139
- </div>
140
- ))}
141
- <div className={planetContainerClassNames()}>
142
- <Link to={planets[planet].href} className="relative h-full w-full">
143
- <img
144
- src={"/images/home/" + planet + ".png"}
145
- alt={planet}
146
- className={planetClassNames}
147
- />
148
- </Link>
149
- </div>
150
- {clickPlanet ? (
151
- <div className={descriptionClassNames()}>
152
- {displayedTitle.map((line, index) => (
153
- <div key={`title-${index}`} className="text-5xl font-bold">
154
- {line}
155
- </div>
156
- ))}
157
- <div className={center.col(2)}>
158
- {isTitleComplete &&
159
- displayedDescription &&
160
- displayedDescription.map((line, index) => (
161
- <div key={`desc-${index}`} className="text-2xl">
162
- {line}
163
- </div>
164
- ))}
165
- </div>
166
- </div>
167
- ) : null}
168
- {planetStatus === "done" ? (
169
- <button
170
- onClick={() => {
171
- setPlanetStatus("waiting");
172
- setClickPlanet(!clickPlanet);
173
- }}
174
- >
175
- <Explore />
176
- </button>
177
- ) : null}
178
- </div>
179
- );
180
- }
@@ -1,17 +0,0 @@
1
- import Lottie from "react-lottie-player";
2
- import loading from "../../asset/json/loading-lottie.json";
3
- import test from "../../asset/json/test.svg";
4
-
5
- export default function LottiePlayer() {
6
- return (
7
- <div className="flex">
8
- <Lottie
9
- animationData={loading}
10
- style={{ width: 1920, height: 1080 }}
11
- play={true}
12
- placeholder={test}
13
- />
14
- <img src={"/videos/loading.gif"} />
15
- </div>
16
- );
17
- }
@@ -1,36 +0,0 @@
1
- import { Exam, exams } from "../../../_components/asset/mock/exams";
2
- import { ManageBoard } from "../../../board";
3
- import { Card } from "../../../card/widget/Card";
4
-
5
- export default function Exams() {
6
- return (
7
- <ManageBoard
8
- data={{
9
- gap: 7.5,
10
- dataSets: [
11
- {
12
- title: "진행 중인 시험",
13
- items: exams.filter((exam) => exam.status === "active"),
14
- renderItem: (exam) => <ExamComponent key={exam.id} {...exam} />,
15
- },
16
- {
17
- title: "종료된 시험",
18
- items: exams.filter((exam) => exam.status === "inactive"),
19
- renderItem: (exam) => <ExamComponent key={exam.id} {...exam} />,
20
- },
21
- ],
22
- }}
23
- />
24
- );
25
- }
26
-
27
- function ExamComponent({ title, type, managerUserId, createdAt }: Exam) {
28
- return (
29
- <Card>
30
- <div>{title}</div>
31
- <div>{type}</div>
32
- <div>{managerUserId}</div>
33
- <div>{createdAt}</div>
34
- </Card>
35
- );
36
- }
@@ -1,5 +0,0 @@
1
- import { CanvasBoard } from "../../../board";
2
-
3
- export default function Grade() {
4
- return <CanvasBoard>Grade</CanvasBoard>;
5
- }
@@ -1,56 +0,0 @@
1
- import { Link, useLocation } from "react-router-dom";
2
- import { buttonClassNames } from "../../navigation";
3
- import Explore from "../../_components/view/Explore";
4
- import { DashboardLayout } from "../../layout";
5
-
6
- const navigations = [
7
- {
8
- href: "/admin",
9
- title: "홈",
10
- },
11
- {
12
- href: "/admin/user",
13
- title: "회원관리",
14
- },
15
- {
16
- href: "/admin/exam",
17
- title: "시험관리",
18
- },
19
- {
20
- href: "/admin/rnd",
21
- title: "연구/개발",
22
- },
23
- {
24
- href: "/admin/news",
25
- title: "마케팅/이벤트",
26
- },
27
- {
28
- href: "/admin/statistics",
29
- title: "통계",
30
- },
31
- ];
32
-
33
- export default function Layout({ children }: { children: React.ReactNode }) {
34
- const { pathname: nowPath } = useLocation();
35
- const [title] = nowPath.split("/").slice(-1);
36
- return (
37
- <>
38
- <DashboardLayout
39
- subject={[title, "/images/tosel.png", "https://tosel.org"]}
40
- colors={["gray-300", "black"]}
41
- navigations={navigations.map(({ href, title }) => (
42
- <Link
43
- key={href}
44
- to={href}
45
- className={buttonClassNames(href, nowPath)}
46
- >
47
- {title}
48
- </Link>
49
- ))}
50
- >
51
- {children}
52
- </DashboardLayout>
53
- <Explore />
54
- </>
55
- );
56
- }