bo 로그인 퍼블 입히기

This commit is contained in:
주수현
2025-06-18 09:53:48 +09:00
parent 15a2eb7ccc
commit b4ca0b7ced
5 changed files with 102 additions and 107 deletions

View File

@@ -1,22 +1,15 @@
<!DOCTYPE html>
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<meta content="IE=edge" http-equiv="X-UA-Compatible">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<meta content="noindex, nofollow" name="robots"/>
<title>layout 타이틀</title>
<link rel="stylesheet" th:href="@{/static/library/bootstrap/bootstrap.min.css}"/>
<link rel="stylesheet" th:href="@{/static/library/bootstrap/bootstrap-icons.css}"/>
<script th:src="@{/static/library/jquery/jquery-3.6.0.min.js}"></script>
</head>
<head th:replace="~{common/components :: head}"></head>
<body>
<section class="container" layout:fragment="content">
<p>Page content goes here</p>
</section>
<div id="wrap">
<div class="login-wrap" id="container" layout:fragment="content">
<p>Page content goes here</p>
</div>
<div th:replace="~{common/components :: footer}"></div>
</div>
<section layout:fragment="script"></section>
</body>
</html>

View File

@@ -2,104 +2,80 @@
<html layout:decorate="~{layout/layout-login}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
xmlns:th="http://www.thymeleaf.org">
<head>
<title>Sign in</title>
<style>
.bd-placeholder-img {
font-size: 1.125rem;
text-anchor: middle;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
<div layout:fragment="content">
<div id="content" role="main">
<form method="post" th:action="@{/login}" name="loginForm">
@media (min-width: 768px) {
.bd-placeholder-img-lg {
font-size: 3.5rem;
}
}
html,
body {
height: 100%;
}
body {
display: flex;
align-items: center;
padding-top: 40px;
padding-bottom: 40px;
background-color: #f5f5f5;
}
.form-signin {
width: 100%;
max-width: 330px;
padding: 15px;
margin: auto;
}
.form-signin .checkbox {
font-weight: 400;
}
.form-signin .form-floating:focus-within {
z-index: 2;
}
.form-signin input[type="email"] {
margin-bottom: -1px;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.form-signin input[type="password"] {
margin-bottom: 10px;
border-top-left-radius: 0;
border-top-right-radius: 0;
}
</style>
</head>
<body class="text-center">
<section layout:fragment="content">
<main class="form-signin">
<form method="post" th:action="@{/login}">
<i class="bi bi-server fs-1"></i>
<h1 class="h3 mb-3 fw-normal">관리자 로그인</h1>
<div class="row" th:if="${session['SPRING_SECURITY_LAST_EXCEPTION']} != null">
<div class="inner">
<div class="logo">
<img th:src="@{/static/assets/images/common/logo_kri.svg}" class="profile-img" alt="kri 로고 이미지" />
</div>
<div class="content-inner">
<section class="form-area">
<div class="input-group">
<div class="input-label">
<p class="label-txt">
<label for="floatingInput">아이디</label>
</p>
</div>
<div class="component-input">
<div class="input-field">
<input type="text" id="floatingInput" name="username" placeholder="아이디 입력">
</div>
</div>
</div>
<div class="input-group">
<div class="input-label">
<p class="label-txt">
<label for="floatingPassword">비밀번호</label>
</p>
</div>
<div class="component-input">
<div class="input-field">
<input type="password" id="floatingPassword" name="password" placeholder="비밀번호 입력">
</div>
</div>
</div>
<div class="component-btns">
<button type="submit" class="btn btn-primary btn-full" >
<span class="btn-txt">로그인</span>
</button>
</div>
<ul class="info-bullet-list">
<li>정보시스템 보호 정책 강화로 IP접근 통제가 시행됩니다.</li>
<li><a href="">공식가입센터 관리자 바로가기</a></li>
</ul>
</section>
<ul class="logo-list">
<li>
<img th:src="@{/static/assets/images/common/logo_forest.svg}" class="profile-img" alt="kri 로고 이미지" />
</li>
<li>
<img th:src="@{/static/assets/images/common/logo_kofpi.svg}" class="profile-img" alt="kri 로고 이미지" />
</li>
</ul>
</div>
</div>
<!-- <div class="row" th:if="${session['SPRING_SECURITY_LAST_EXCEPTION']} != null">
<div class="alert alert-danger fw-bold"
th:utext="${session['SPRING_SECURITY_LAST_EXCEPTION'].message}">
</div>
</div>
</div>-->
<div class="form-floating">
<input autofocus class="form-control" id="floatingInput" name="username" placeholder="ID를 입력해주세요"
type="text">
<label for="floatingInput">ID</label>
</div>
<div class="form-floating">
<input class="form-control" id="floatingPassword" name="password" placeholder="Password"
type="password">
<label for="floatingPassword">Password</label>
</div>
<div class="checkbox mb-3">
<div aria-label="Basic checkbox toggle button group" class="btn-group" roleDto="group">
<input autocomplete="off" class="btn-check" id="btn_ck1" name="remember-me"
type="checkbox">
<label class="btn btn-outline-primary" for="btn_ck1">로그인 상태 유지하기</label>
</div>
</div>
<button class="w-100 btn btn-lg btn-primary" type="submit">Sign in</button>
</form>
</main>
</section>
</body>
</div>
</div>
<th:block layout:fragment="script">
<script th:inline="javascript">
document.addEventListener('DOMContentLoaded', function() {
const errorMessage = /*[[${session['SPRING_SECURITY_LAST_EXCEPTION']?.message}]]*/ null;
if (errorMessage) {
alert("입력하신 정보가 맞지 않습니다.\n 다시 확인해주세요.");
document.loginForm.reset();
}
});
</script>
</th:block>
</html>