정의왕

Login UI ver1.0

1 <?xml version="1.0" encoding="UTF-8"?> 1 <?xml version="1.0" encoding="UTF-8"?>
2 <project version="4"> 2 <project version="4">
3 <component name="VcsDirectoryMappings"> 3 <component name="VcsDirectoryMappings">
4 + <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
4 <mapping directory="$PROJECT_DIR$" vcs="Git" /> 5 <mapping directory="$PROJECT_DIR$" vcs="Git" />
5 </component> 6 </component>
6 </project> 7 </project>
...\ No newline at end of file ...\ No newline at end of file
......
This diff is collapsed. Click to expand it.
...@@ -6,8 +6,10 @@ ...@@ -6,8 +6,10 @@
6 "@testing-library/jest-dom": "^5.15.0", 6 "@testing-library/jest-dom": "^5.15.0",
7 "@testing-library/react": "^11.2.7", 7 "@testing-library/react": "^11.2.7",
8 "@testing-library/user-event": "^12.8.3", 8 "@testing-library/user-event": "^12.8.3",
9 + "node-sass": "^6.0.1",
9 "react": "^17.0.2", 10 "react": "^17.0.2",
10 "react-dom": "^17.0.2", 11 "react-dom": "^17.0.2",
12 + "react-router-dom": "^6.0.2",
11 "react-scripts": "4.0.3", 13 "react-scripts": "4.0.3",
12 "web-vitals": "^1.1.2" 14 "web-vitals": "^1.1.2"
13 }, 15 },
......
1 -.App {
2 - text-align: center;
3 -}
4 -
5 -.App-logo {
6 - height: 40vmin;
7 - pointer-events: none;
8 -}
9 -
10 -@media (prefers-reduced-motion: no-preference) {
11 - .App-logo {
12 - animation: App-logo-spin infinite 20s linear;
13 - }
14 -}
15 -
16 -.App-header {
17 - background-color: #282c34;
18 - min-height: 100vh;
19 - display: flex;
20 - flex-direction: column;
21 - align-items: center;
22 - justify-content: center;
23 - font-size: calc(10px + 2vmin);
24 - color: white;
25 -}
26 -
27 -.App-link {
28 - color: #61dafb;
29 -}
30 -
31 -@keyframes App-logo-spin {
32 - from {
33 - transform: rotate(0deg);
34 - }
35 - to {
36 - transform: rotate(360deg);
37 - }
38 -}
1 -import logo from './logo.svg'; 1 +//import React, {useState} from "react";
2 -import './App.css'; 2 +import {BrowserRouter as Router, Route, Routes, Link} from "react-router-dom";
3 - 3 +import LandingPage from "./component/views/LandingPage/LandingPage";
4 -function App() { 4 +import LoginPage from "./component/views/LoginPage/LoginPage";
5 +import RegisterPage from "./component/views/RegisterPage/RegisterPage";
6 +import "./static/fonts/font.css";
7 +function App () {
5 return ( 8 return (
6 - <div className="App"> 9 + <Router>
7 - <header className="App-header"> 10 + <div>
8 - <img src={logo} className="App-logo" alt="logo" /> 11 + {}
9 - <p> 12 + <Routes>
10 - Edit <code>src/App.js</code> and save to reload. 13 + <Route exact path = "/" element={<LandingPage/>}/>
11 - </p> 14 + <Route exact path = "/login" element={<LoginPage/>}/>
12 - <a 15 + <Route exact path = "/register" element={<RegisterPage/>}/>
13 - className="App-link" 16 + </Routes>
14 - href="https://reactjs.org" 17 + </div>
15 - target="_blank" 18 + </Router>
16 - rel="noopener noreferrer"
17 - >
18 - Learn React
19 - </a>
20 - </header>
21 - </div>
22 ); 19 );
23 } 20 }
24 21
......
1 +// React, {useEffect} from 'react';
2 +//import axios from 'axios';
3 +function LandingPage() {
4 + return (
5 + <div>
6 + <input type="password"/>
7 + </div>
8 + );
9 +}
10 +
11 +export default LandingPage;
1 +import React, { useState } from "react";
2 +import "../style/LoginPage.scss";
3 +
4 +function LoginPage() {
5 + const [Id, setId] = useState("");
6 + const [Password, setPassword] = useState("");
7 +
8 + const onIdHandler = (event) => {
9 + setId(event.currentTarget.value);
10 + };
11 + const onPasswordHandler = (event) => {
12 + setPassword(event.currentTarget.value);
13 + };
14 + const onSubmitHandler = (event) => {
15 + event.preventDefault();
16 + console.log("Id", Id);
17 + console.log("Password", Password);
18 + };
19 + return (
20 + <div id="body">
21 + <div className="login-form">
22 + <form onSubmit={onSubmitHandler}>
23 + <h1>Tunnel</h1>
24 + <div className="input-area">
25 + <input type="id" value={Id} autoComplete="off" onChange={onIdHandler} />
26 + <label htmlFor="id">USER ID</label>
27 + </div>
28 + <div className="input-area">
29 + <input
30 + type="password"
31 + value={Password}
32 + onChange={onPasswordHandler}
33 + />
34 + <label htmlFor="password">USER PASSWORD</label>
35 + </div>
36 + <div className="btn-area">
37 + <button >Login</button>
38 + </div>
39 + </form>
40 + </div>
41 + </div>
42 + );
43 +}
44 +
45 +export default LoginPage;
1 +import React from "react";
2 +
3 +function RegisterPage() {
4 + return <div>Register</div>;
5 +}
6 +
7 +export default RegisterPage;
1 +* {
2 + margin: 0;
3 + padding: 0;
4 + box-sizing: border-box;
5 +}
6 +#body{
7 + display: flex;
8 + justify-content: center;
9 + align-items: center;
10 + height: 100vh;
11 + background-image: url("../images/register_background.jpg");
12 + background-repeat: no-repeat;
13 + background-size: cover;
14 + .login-form {
15 + display: flex;
16 + justify-content: space-around;
17 + align-items: center;
18 + flex-direction: row;
19 + width: 500px;
20 + height: 620px;
21 + box-shadow: 0px 0px 20px #000;
22 + }
23 + h1 {
24 + font-size: 32px;
25 + color: black;
26 + font-weight: bold;
27 + text-align: center;
28 + margin-bottom: 60px ;
29 + }
30 + .input-area {
31 + display: flex;
32 + justify-content: center;
33 + align-items: center;
34 + width: 250px;
35 + position: relative;
36 + margin-top: 20px;
37 + font-weight: bold;
38 + font-size: medium;
39 +
40 + &:first-child {
41 + margin-top: 0;
42 + }
43 +
44 + input {
45 + width: 100%;
46 + padding: 20px 10px 10px;
47 + background-color: transparent;
48 + border: none;
49 + border-bottom: 1px solid #999;
50 + font-size: 18px;
51 + color: white;
52 + outline: none;
53 + }
54 +
55 + label {
56 + position: absolute;
57 + left: 10px;
58 + top: -2px;
59 + font-size: 14px;
60 + color: white;
61 + }
62 + }
63 + .btn-area {
64 + display: flex;
65 + justify-content: center;
66 + margin-top: 20px;
67 +
68 + button {
69 + width: 50%;
70 + height: 40px;
71 + background: slateblue;
72 + font-size: 20px;
73 + color: white;
74 + font-weight: bold;
75 + border: none;
76 + border-radius: 25px;
77 + cursor: pointer;
78 + }
79 + }
80 +}
81 +
No preview for this file type
No preview for this file type
1 +@font-face {
2 + font-family: NotoSansKR-Black;
3 + src: url("./NotoSansKR-Black.eot");
4 +}
5 +
6 +@font-face {
7 + font-family: NotoSansKR-Bold;
8 + src: url("./NotoSansKR-Bold.eot");
9 +}
10 +
11 +@font-face {
12 + font-family: NotoSansKR-Light;
13 + src: url("./NotoSansKR-Light.eot");
14 +}
15 +
16 +@font-face {
17 + font-family: NotoSansKR-Medium;
18 + src: url("./NotoSansKR-Medium.eot");
19 +}
20 +
21 +@font-face {
22 + font-family: NotoSansKR-Regular;
23 + src: url("./NotoSansKR-Regular.eot");
24 +}
25 +
26 +@font-face {
27 + font-family: NotoSansKR-Thin;
28 + src: url("./NotoSansKR-Thin.eot");
29 +}
...\ No newline at end of file ...\ No newline at end of file