Newer
Older
task-bldg / src / main / resources / templates / fragments / message.html
@haya4 haya4 on 11 Jul 2022 989 bytes ログイン画面の実装
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
</head>
<body>

  <!-- ログインメッセージ -->
  <div th:fragment="login">
    <div class="alert alert-danger" th:if="${param.error}">
      <small>ユーザ名またはパスワードが正しくありません</small>
    </div>
    <div class="alert alert-success" th:if="${param.register}">
      <small>ユーザを新規登録しました</small>
    </div>
    <div class="alert alert-success" th:if="${param.logout}">
      <small>ログアウトしました</small>
    </div>
  </div>

  <!-- エラーメッセージ(404 Not Foundなど) -->
  <div th:fragment="error">
    <div class="text-center">
      <div class="display-1" th:text="${status}"></div>
      <div class="text-muted mb-4" th:text="${error}"></div>

      <div class="text-muted">ページを表示できません</div>
      <a th:href="@{/}">&larr; ホームに戻る</a>
    </div>
  </div>

</body>
</html>