정의왕

Login UI ver1.0

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