Skip to content

Commit 2a71f1e

Browse files
authored
Merge pull request #2 from Snowgent/feature/#1-setting
[FEATURE] 초기 세팅 진행
2 parents 95642d1 + 45d5e73 commit 2a71f1e

File tree

12 files changed

+884
-80
lines changed

12 files changed

+884
-80
lines changed

package-lock.json

Lines changed: 667 additions & 65 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@
1010
"preview": "vite preview"
1111
},
1212
"dependencies": {
13+
"@tailwindcss/vite": "^4.1.17",
1314
"axios": "^1.13.2",
1415
"react": "^19.1.1",
1516
"react-dom": "^19.1.1",
17+
"react-router-dom": "^7.9.5",
1618
"socket.io-client": "^4.8.1"
1719
},
1820
"devDependencies": {

public/vite.svg

Lines changed: 9 additions & 1 deletion
Loading

src/App.css

Whitespace-only changes.

src/App.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
const App = () => {
2-
return <div>Snowgent</div>;
3-
};
1+
import { Outlet } from 'react-router-dom';
42

5-
export default App;
3+
export default function App() {
4+
return (
5+
<div className="mobile-container">
6+
<div className="mobile-content">
7+
<Outlet />
8+
</div>
9+
</div>
10+
);
11+
}

src/index.css

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
@import 'tailwindcss';
2+
3+
@font-face {
4+
font-family: 'Pretendard';
5+
src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Thin.woff2')
6+
format('woff2');
7+
font-weight: 100;
8+
font-display: swap;
9+
}
10+
11+
@font-face {
12+
font-family: 'Pretendard';
13+
src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-ExtraLight.woff2')
14+
format('woff2');
15+
font-weight: 200;
16+
font-display: swap;
17+
}
18+
19+
@font-face {
20+
font-family: 'Pretendard';
21+
src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Light.woff2')
22+
format('woff2');
23+
font-weight: 300;
24+
font-display: swap;
25+
}
26+
27+
@font-face {
28+
font-family: 'Pretendard';
29+
src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Regular.woff2')
30+
format('woff2');
31+
font-weight: 400;
32+
font-display: swap;
33+
}
34+
35+
@font-face {
36+
font-family: 'Pretendard';
37+
src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Medium.woff2')
38+
format('woff2');
39+
font-weight: 500;
40+
font-display: swap;
41+
}
42+
43+
@font-face {
44+
font-family: 'Pretendard';
45+
src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-SemiBold.woff2')
46+
format('woff2');
47+
font-weight: 600;
48+
font-display: swap;
49+
}
50+
51+
@font-face {
52+
font-family: 'Pretendard';
53+
src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Bold.woff2')
54+
format('woff2');
55+
font-weight: 700;
56+
font-display: swap;
57+
}
58+
59+
@font-face {
60+
font-family: 'Pretendard';
61+
src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-ExtraBold.woff2')
62+
format('woff2');
63+
font-weight: 800;
64+
font-display: swap;
65+
}
66+
67+
@font-face {
68+
font-family: 'Pretendard';
69+
src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Black.woff2')
70+
format('woff2');
71+
font-weight: 900;
72+
font-display: swap;
73+
}
74+
75+
@layer base {
76+
* {
77+
@apply box-border;
78+
}
79+
80+
html {
81+
@apply h-full overflow-x-hidden;
82+
height: 100dvh;
83+
}
84+
85+
body {
86+
@apply m-0 h-full p-0 antialiased;
87+
font-family:
88+
'Pretendard',
89+
-apple-system,
90+
BlinkMacSystemFont,
91+
system-ui,
92+
sans-serif;
93+
background-color: #f9f9f9;
94+
overscroll-behavior: none;
95+
touch-action: pan-y;
96+
}
97+
98+
#root {
99+
@apply h-full;
100+
}
101+
}
102+
103+
@layer components {
104+
.mobile-container {
105+
@apply mx-auto flex h-full w-full justify-center;
106+
max-width: 480px;
107+
}
108+
109+
.mobile-content {
110+
@apply flex h-full w-full flex-col;
111+
background-color: white;
112+
}
113+
114+
.mobile-padding {
115+
@apply px-4 py-4;
116+
}
117+
118+
.safe-top {
119+
padding-top: max(env(safe-area-inset-top), 1rem);
120+
}
121+
122+
.safe-bottom {
123+
padding-bottom: max(env(safe-area-inset-bottom), 1rem);
124+
}
125+
}

src/index.tsx

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { createBrowserRouter, RouterProvider } from 'react-router-dom';
2+
import Onboarding from './pages/onboarding/Onboarding';
3+
import Chat from './pages/chat/Chat';
4+
import App from './App';
5+
import HomePage from './pages/HomePage';
6+
7+
const router = createBrowserRouter([
8+
{
9+
path: '/',
10+
element: <App />,
11+
children: [
12+
{
13+
index: true,
14+
element: <HomePage />,
15+
},
16+
{
17+
path: 'onboarding',
18+
element: <Onboarding />,
19+
},
20+
{
21+
path: 'chat',
22+
element: <Chat />,
23+
},
24+
],
25+
},
26+
]);
27+
28+
export default function Router() {
29+
return <RouterProvider router={router} />;
30+
}

src/main.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { StrictMode } from 'react'
2-
import { createRoot } from 'react-dom/client'
3-
import './index.css'
4-
import App from './App.tsx'
1+
import { StrictMode } from 'react';
2+
import { createRoot } from 'react-dom/client';
3+
import './index.css';
4+
import Router from './index.tsx';
55

66
createRoot(document.getElementById('root')!).render(
77
<StrictMode>
8-
<App />
8+
<Router />
99
</StrictMode>,
10-
)
10+
);

src/pages/HomePage.tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { useNavigate } from 'react-router-dom';
2+
import logo from '/vite.svg';
3+
4+
const HomePage = () => {
5+
const navigate = useNavigate();
6+
return (
7+
<div className="flex h-full flex-col items-center justify-center gap-8">
8+
<img src={logo} alt="Vite logo" className="h-40" />
9+
<h1 className="text-6xl text-[#0D2D84]">Snowgent</h1>
10+
<button
11+
onClick={() => navigate('/onboarding')}
12+
className="cursor-pointer rounded-lg bg-blue-50 px-10 py-5 text-xl font-semibold text-[#0D2D84] hover:bg-blue-100"
13+
>
14+
시작하기
15+
</button>
16+
</div>
17+
);
18+
};
19+
20+
export default HomePage;

src/pages/chat/Chat.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const Chat = () => {
2+
return <div className="flex h-full flex-col">Chat</div>;
3+
};
4+
5+
export default Chat;

0 commit comments

Comments
 (0)