Commit b24884e5 authored by 한규민's avatar 한규민
Browse files

signup변경

parent eb5bd89d
...@@ -56,7 +56,7 @@ const Login = () => { ...@@ -56,7 +56,7 @@ const Login = () => {
<div className="d-flex flex-column "> <div className="d-flex flex-column ">
<input className={styles.input} type="text" name="id" placeholder="ID" onChange={handleLoginOnChange}/> <input className={styles.input} type="text" name="id" placeholder="ID" onChange={handleLoginOnChange}/>
<input className={styles.input} type="text" name="password" placeholder="Password" onChange={handleLoginOnChange} minlength="8" required /> <input className={styles.input} type="text" name="password" placeholder="Password" onChange={handleLoginOnChange} minlength="8" required />
<input className={`border-0 rounded-2 mt-2 ${styles.butterYellow} ${styles.btnHover}`} type="submit" value="Login" /> <input className={`rounded-2 mt-2 ${styles.butterYellowAndBtn} ${styles.btnHover}`} type="submit" value="Login" />
<span><a href="./signup" className={styles.intoSignupPage}>회원이 아니십니까?</a></span> <span><a href="./signup" className={styles.intoSignupPage}>회원이 아니십니까?</a></span>
</div> </div>
</div> </div>
...@@ -72,7 +72,7 @@ const Login = () => { ...@@ -72,7 +72,7 @@ const Login = () => {
<p className={`text-white ${styles.fontSizeTwo}`}> <p className={`text-white ${styles.fontSizeTwo}`}>
비회원 정보 입력 예매 내역 확인/취소 티켓 발권이 어려울 있으니 다시 한번 확인해 주시기 바랍니다. 비회원 정보 입력 예매 내역 확인/취소 티켓 발권이 어려울 있으니 다시 한번 확인해 주시기 바랍니다.
</p> </p>
<input className={`border-0 rounded-2 mt-2 ${styles.butterYellow} ${styles.btnHover}`} type="submit" value="비회원 예매 확인" /> <input className={`rounded-2 mt-2 ${styles.butterYellowAndBtn} ${styles.btnHover}`} type="submit" value="비회원 예매 확인" />
</div> </div>
</div> </div>
</div> </div>
......
...@@ -22,12 +22,14 @@ ...@@ -22,12 +22,14 @@
font-size: 11px; font-size: 11px;
} }
.butterYellow{ .butterYellowAndBtn{
background-color: #FEDC00; background-color: #FEDC00;
border: 1px solid black;
} }
.btnHover:hover{ .btnHover:hover{
background-color: black; background-color: black;
color: #FEDC00; color: #FEDC00;
transition: 1s ease-out; transition: ease-out;
border: 1px solid white ;
} }
\ No newline at end of file
...@@ -44,7 +44,7 @@ const MovieChart = () => { ...@@ -44,7 +44,7 @@ const MovieChart = () => {
<a href={`/movie/${movie.id}`}> <a href={`/movie/${movie.id}`}>
<img src={movie.src} className={`card-img-top rounded ${styles.poster}`} alt="Movie Poster" /> <img src={movie.src} className={`card-img-top rounded ${styles.poster}`} alt="Movie Poster" />
{/* <div className={`${styles.darkness}`}></div> */} {/* <div className={`${styles.darkness}`}></div> */}
{/* <div className={`${styles.description}`}>상세설명asdasd</div> */} <div className={`${styles.description}`}>상세설명asdasd</div>
</a> </a>
<div className="card-body text-light"> <div className="card-body text-light">
<h5 className="card-title text-center">{movie.title}</h5> <h5 className="card-title text-center">{movie.title}</h5>
......
...@@ -4,11 +4,12 @@ import { useState } from 'react'; ...@@ -4,11 +4,12 @@ import { useState } from 'react';
const Signup = () => { const Signup = () => {
const [userText, setUserState] = useState({ const [userText, setUserState] = useState({
userID: '',
userName: '', userName: '',
userBirthday: '', userBirthday: '',
userMbnum: '', userMbnum: '',
userPassword: '', userPassword: '',
userRePassword: '' userRePassword: '',
}) })
const handleUserOnChange = (e) => { const handleUserOnChange = (e) => {
...@@ -18,37 +19,77 @@ const Signup = () => { ...@@ -18,37 +19,77 @@ const Signup = () => {
}) })
} }
const onlyNumber = (e) => {
const text = e.target.value;
if(text !== typeof(1)){
e.preventDefault();
alert("숫자만 입력해주세요");
}
}
const comparePassword = (userPassword, userRePassword, e) => {
if (userPassword !== userRePassword) {
return alert("비밀번호가 같지 않습니다.")
}
}
return ( return (
<div className={`d-flex ${styles.signup} col-md-8 col-12 justify-content-center`}> <form className={`d-flex col-md-6 col-12 justify-content-center`}>
<div className="d-flex flex-column"> <div className="d-flex flex-column">
{console.log(userText)} {console.log(userText)}
<div className={styles.contents}> <div className={styles.inputContent}>
<label className={styles.signupLabel}>아이디</label> <label className={styles.signupLabel}>아이디</label>
<input className={styles.input} type="text" name="userName" id="userID" placeholder="8자리" onChange={handleUserOnChange} minlength="8" required /> <div className="d-flex col-md-auto">
<button className={` border-0 rounded-2 mt-2 ${styles.butterYellow} ${styles.btnHover}`}>중복확인</button> <input className={styles.input} type="text" name="userID" id="userID" placeholder="8자리입력" onChange={handleUserOnChange} maxLength="8" minlength="8" required />
<button type="button" className={`btn btn-primary rounded-2 mt-2 ${styles.butterYellowAndBtn} ${styles.btnHover}`} data-bs-toggle="modal" data-bs-target="#exampleModal">중복확인</button>
</div> </div>
<div className={styles.contents}> </div>
<div className={styles.inputContent}>
<label className={styles.signupLabel}>별명</label> <label className={styles.signupLabel}>별명</label>
<input className={styles.input} type="text" name="userName" id="userName" placeholder="별명" onChange={handleUserOnChange} minlength="8" required /> <input className={styles.input} type="text" name="userName" id="userName" placeholder="10자리이내" onChange={handleUserOnChange} maxLength="10" required />
</div> </div>
<div className={styles.contents}> <div className={styles.inputContent}>
<label className={styles.signupLabel}>생년월일</label> <label className={styles.signupLabel}>생년월일</label>
<input className={styles.input} type="number" name="userBirthday" id="userBirthday" placeholder="6자리" onChange={handleUserOnChange} minlength="6" required /> <input className={styles.input} type="type" name="userBirthday" id="userBirthday" placeholder="6자리(예시: 991225)" onChange={handleUserOnChange} maxLength="6" minlength="6" required />
</div> </div>
<div className={styles.contents}> <div className={styles.inputContent}>
<label className={styles.signupLabel}>휴대폰 번호</label> <label className={styles.signupLabel}>휴대폰 번호</label>
<input className={styles.input} type="number" name="userMbnum" id="userMbnum" placeholder="-없이 8자리 입력" onChange={handleUserOnChange} minlength="8" required /> <input className={`int ${styles.input}`} type="text" name="userMbnum" id="userMbnum" placeholder="-없이 11자리 입력" onChange={handleUserOnChange,onlyNumber} maxLength="11" minlength="11" required />
</div> </div>
<div className={styles.contents}> <div className={`${styles.inputContent}`}>
<label className={styles.signupLabel}>비밀번호</label> <label className={styles.signupLabel}>비밀번호</label>
<input className={styles.input} type="text" name="userPassword" id="password" placeholder="비밀번호" onChange={handleUserOnChange} minlength="8" required /> <input type="text" name="userPassword" id="password" placeholder="8자리 입력" onChange={handleUserOnChange} maxLength="8" minlength="8" required />
<input className={styles.input} type="text" name="userRePassword" id="password" placeholder="비밀번호 확인" onChange={handleUserOnChange} minlength="8" required /> </div>
<div className={styles.inputContent}>
<label className={styles.signupLabel}>비밀번호 확인</label>
<div className="d-flex col-md-auto">
<input className={styles.input} type="text" name="userRePassword" id="userRePassword" placeholder="8자리 입력" onChange={handleUserOnChange} maxLength="8" minlength="8" required />
<button className={`rounded-2 mt-2 ${styles.butterYellowAndBtn} ${styles.btnHover}`}>중복확인</button>
</div>
</div> </div>
<input className={` border-0 rounded-2 mt-2 ${styles.butterYellow} ${styles.btnHover}`} type="submit" value="가입하기" /> <input className={`rounded-2 mt-3 ${styles.butterYellowAndBtn} ${styles.btnHover}`} type="submit" value="가입하기" onClick={comparePassword} />
</div> </div>
{/* 아이디 중복 확인 모달창 */}
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">아이디 중복 확인</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div> </div>
<div class="modal-body">
아이디는 사용가능합니다.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
</div>
</div>
</div>
</div>
</form>
) )
} }
......
.contents{
display: flex;
width: 100%;
justify-content: spa;
align-items: center;
padding-top: 5px;
}
.signupLabel{
color: white;
padding-right: 8px;
}
.inputContent{
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 1rem;
}
.input { .input {
margin: 0.5rem 0 0 0; margin: 0.5rem 0 0 0;
padding: 0.5rem 0 0.5rem 0; padding: 0.5rem 0 0.5rem 0;
color:black; color:black;
border-radius: 3px; border-radius: 3px;
#userPassword{
padding: 0.7rem 0 0.7rem 0;
} }
}
.butterYellow{ .butterYellowAndBtn{
background-color: #FEDC00; background-color: #FEDC00;
border: 1px solid black;
} }
.btnHover:hover{ .btnHover:hover{
background-color: black; background-color: black;
color: #FEDC00; color: #FEDC00;
transition: 1s ease-out; transition: ease-out;
} border: 1px solid white ;
.contents{
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
padding-top: 5px;
} }
.signupLabel{
color: white; .btnHover:focus{
background-color: #f5e685;
color: black;
border-color: none;
box-shadow: none;
} }
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment