Skip to content

Commit b25f42d

Browse files
authored
Merge pull request #6 from KGU-Vote-System/feature/1
[FEAT] : 로그인 화면 구현
2 parents e784955 + 1c4bb3a commit b25f42d

24 files changed

Lines changed: 266 additions & 15 deletions

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,13 @@
1515
"@stackflow/plugin-renderer-basic": "^1.1.13",
1616
"@stackflow/react": "^1.5.2",
1717
"@tailwindcss/vite": "^4.1.7",
18+
"class-variance-authority": "^0.7.1",
19+
"clsx": "^2.1.1",
1820
"jotai": "^2.12.4",
1921
"react": "^19.1.0",
2022
"react-dom": "^19.1.0",
23+
"react-hook-form": "^7.56.4",
24+
"tailwind-merge": "^3.3.0",
2125
"tailwindcss": "^4.1.7"
2226
},
2327
"devDependencies": {

pnpm-lock.yaml

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

src/app/global.css

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,26 @@
1414
--color-grad1: #5ba5f8;
1515
--color-grad2: #7c81ff;
1616

17-
--text-3xl: 32px;
17+
--text-4xl: 32px;
18+
--text-3xl: 28px;
1819
--text-2xl: 24px;
19-
2020
--text-xl: 20px;
2121

2222
--text-lg: 18px;
2323
--text-md: 16px;
2424
--text-sm: 14px;
2525

2626
--spacing-normal: 20px;
27+
--spacing-normal-half: 10px;
28+
29+
--radius-lg: 20px;
30+
--radius-md: 12px;
31+
}
32+
33+
@font-face {
34+
font-family: 'Fredoka';
35+
src: url('../assets/font/fredoka-variable.ttf') format('truetype');
36+
font-weight: 600;
2737
}
2838

2939
:root {
@@ -47,6 +57,18 @@
4757
color: #111;
4858
}
4959

60+
/* Chrome, Safari, Edge, Opera */
61+
input[type='number']::-webkit-outer-spin-button,
62+
input[type='number']::-webkit-inner-spin-button {
63+
-webkit-appearance: none;
64+
margin: 0;
65+
}
66+
67+
/* Firefox */
68+
input[type='number'] {
69+
-moz-appearance: textfield;
70+
}
71+
5072
@layer utilities {
5173
.container-mobile {
5274
max-width: 402px;
@@ -61,4 +83,12 @@
6183
-ms-overflow-style: none;
6284
scrollbar-width: none;
6385
}
86+
87+
.logo {
88+
font-family: Fredoka;
89+
}
90+
91+
.shadow-login {
92+
box-shadow: 0px 4px 20px 0px rgba(55, 127, 248, 0.04);
93+
}
6494
}

src/app/main.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { StrictMode } from 'react';
22
import { createRoot } from 'react-dom/client';
33
import './global.css';
4+
import '@stackflow/plugin-basic-ui/index.css';
45
import App from './App';
56

67
createRoot(document.getElementById('root')!).render(

src/app/stackflow/Stack.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
import { basicUIPlugin } from "@stackflow/plugin-basic-ui";
2-
import { basicRendererPlugin } from "@stackflow/plugin-renderer-basic";
3-
import { stackflow } from "@stackflow/react";
4-
import { HomeScreen } from "../../screen/home/ui";
1+
import { basicUIPlugin } from '@stackflow/plugin-basic-ui';
2+
import { basicRendererPlugin } from '@stackflow/plugin-renderer-basic';
3+
import { stackflow } from '@stackflow/react';
4+
import { LoginScreen } from '@/screen/login/ui';
55

66
export const { Stack, useFlow } = stackflow({
77
transitionDuration: 350,
8-
activities: { HomeScreen },
8+
activities: { LoginScreen },
99
plugins: [
1010
basicRendererPlugin(),
1111
basicUIPlugin({
12-
theme: "cupertino",
12+
theme: 'cupertino',
1313
}),
1414
],
15-
initialActivity: () => "HomeScreen",
15+
initialActivity: () => 'LoginScreen',
1616
});
154 KB
Binary file not shown.

src/assets/image/bg-login.png

72.8 KB
Loading

src/assets/image/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import LoginBg from './bg-login.png';
2+
3+
export { LoginBg };
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { Button, Input } from '@/shared/ui';
2+
3+
export default function LoginForm() {
4+
return (
5+
<form className="flex w-full flex-col gap-y-15">
6+
<div className="flex w-full flex-col gap-[10px]">
7+
<Input
8+
intent="login"
9+
placeholder="학번 8자리"
10+
className="no-spinner"
11+
type="number"
12+
/>
13+
<Input placeholder="패스워드" intent="login" type="password" />
14+
</div>
15+
<div className="flex w-full flex-col gap-3">
16+
<Button>학생으로 로그인</Button>
17+
<Button intent="textmain" size="fit">
18+
관리자로 로그인
19+
</Button>
20+
</div>
21+
</form>
22+
);
23+
}

src/features/login/ui/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default as LoginForm } from './LoginForm';

0 commit comments

Comments
 (0)