forked from hackrslab/studyolle
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
143 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.studyolle.account; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
public class SignUpForm { | ||
|
||
private String nickname; | ||
|
||
private String email; | ||
|
||
private String password; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,124 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<html lang="en" xmlns:th="http://www.thymeleaf.org"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Title</title> | ||
<title>StudyOlle</title> | ||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"> | ||
<style> | ||
.container { | ||
max-width: 100%; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
Sign Up page | ||
<body class="bg-light"> | ||
<nav class="navbar navbar-expand-sm navbar-dark bg-dark"> | ||
<a class="navbar-brand" href="/" th:href="@{/}"> | ||
<img src="/images/logo_sm.png" width="30" height="30"> | ||
</a> | ||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
|
||
<div class="collapse navbar-collapse" id="navbarSupportedContent"> | ||
<ul class="navbar-nav mr-auto"> | ||
<li class="nav-item"> | ||
<form th:action="@{/search/study}" class="form-inline" method="get"> | ||
<input class="form-control mr-sm-2" name="keyword" type="search" placeholder="스터디 찾기" aria-label="Search" /> | ||
</form> | ||
</li> | ||
</ul> | ||
|
||
<ul class="navbar-nav justify-content-end"> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="#" th:href="@{/login}">로그인</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="#" th:href="@{/signup}">가입</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</nav> | ||
|
||
<div class="container"> | ||
<div class="py-5 text-center"> | ||
<h2>계정 만들기</h2> | ||
</div> | ||
<div class="row justify-content-center"> | ||
<form class="needs-validation col-sm-6" action="#" | ||
th:action="@{/signup}" th:object="${signUpForm}" method="post" novalidate> | ||
<div class="form-group"> | ||
<label for="nickname">닉네임</label> | ||
<input id="nickname" type="text" th:field="*{nickname}" class="form-control" | ||
placeholder="whiteship" aria-describedby="nicknameHelp" required minlength="3" maxlength="20"> | ||
<small id="nicknameHelp" class="form-text text-muted"> | ||
공백없이 문자와 숫자로만 3자 이상 20자 이내로 입력하세요. 가입후에 변경할 수 있습니다. | ||
</small> | ||
<small class="invalid-feedback">닉네임을 입력하세요.</small> | ||
<small class="form-text text-danger" th:if="${#fields.hasErrors('nickname')}" th:errors="*{nickname}">Nickname Error</small> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label for="email">이메일</label> | ||
<input id="email" type="email" th:field="*{email}" class="form-control" | ||
placeholder="your@email.com" aria-describedby="emailHelp" required> | ||
<small id="emailHelp" class="form-text text-muted"> | ||
스터디올래는 사용자의 이메일을 공개하지 않습니다. | ||
</small> | ||
<small class="invalid-feedback">이메일을 입력하세요.</small> | ||
<small class="form-text text-danger" th:if="${#fields.hasErrors('email')}" th:errors="*{email}">Email Error</small> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label for="password">패스워드</label> | ||
<input id="password" type="password" th:field="*{password}" class="form-control" | ||
aria-describedby="passwordHelp" required minlength="8" maxlength="50"> | ||
<small id="passwordHelp" class="form-text text-muted"> | ||
8자 이상 50자 이내로 입력하세요. 영문자, 숫자, 특수기호를 사용할 수 있으며 공백은 사용할 수 없습니다. | ||
</small> | ||
<small class="invalid-feedback">패스워드를 입력하세요.</small> | ||
<small class="form-text text-danger" th:if="${#fields.hasErrors('password')}" th:errors="*{password}">Password Error</small> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<button class="btn btn-primary btn-block" type="submit" | ||
aria-describedby="submitHelp">가입하기</button> | ||
<small id="submitHelp" class="form-text text-muted"> | ||
<a href="#">약관</a>에 동의하시면 가입하기 버튼을 클릭하세요. | ||
</small> | ||
</div> | ||
</form> | ||
</div> | ||
|
||
<footer th:fragment="footer"> | ||
<div class="row justify-content-center"> | ||
<img class="mb-2" src="/images/logo_long_kr.jpg" alt="" width="100"> | ||
<small class="d-block mb-3 text-muted">© 2020</small> | ||
</div> | ||
</footer> | ||
</div> | ||
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script> | ||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script> | ||
<script type="application/javascript"> | ||
(function () { | ||
'use strict'; | ||
|
||
window.addEventListener('load', function () { | ||
// Fetch all the forms we want to apply custom Bootstrap validation styles to | ||
var forms = document.getElementsByClassName('needs-validation'); | ||
|
||
// Loop over them and prevent submission | ||
Array.prototype.filter.call(forms, function (form) { | ||
form.addEventListener('submit', function (event) { | ||
if (form.checkValidity() === false) { | ||
event.preventDefault(); | ||
event.stopPropagation(); | ||
} | ||
form.classList.add('was-validated') | ||
}, false) | ||
}) | ||
}, false) | ||
}()) | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters