| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 | 
							- <!-- 宣告我們要套用模板 -->
 
- {% extends "sign_in_base.html" %}
 
- {% block script %}
 
-     {% if errMsg=="Rest password success" %}
 
-     <script>
 
-     $(function(){
 
-                 alert("Rest password success");
 
-             });
 
-     </script>
 
-     {% endif %} 
 
-     {% if errMsg=="Sign up success" %}
 
-     <script>
 
-     $(function(){
 
-                 alert("Sign up success");
 
-             });
 
-     </script>
 
-     {% endif %} 
 
- {% endblock %}
 
- {% block style %}
 
-     <style>
 
-       .form-signin {
 
-          max-width: 330px;
 
-          padding: 15px;
 
-       }
 
-       .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>   
 
- {% endblock %}
 
- {% block main %}
 
-   <form  method="post" action="/login">
 
-     <img class="mb-4" src="../static/img/ALMIGHTY_RAY.jpg" alt="" >
 
-     <img class="mb-4" src="../static/img/SKYAI.jpg" alt="" >
 
-     <h1 class="h3 mb-3 fw-normal">Hello, Welcome to Smart Coffee</h1>
 
-   
 
-     <div class="form-floating">
 
-       <input type="text" class="form-control" id="username" name="username" placeholder="使用者名稱/Username" oninput="setCustomValidity('');" onchange="$.get('/check_username',   'username='+document.getElementById('username').value,function(resText){
 
-                     if(resText.pass){
 
-                         setCustomValidity('無此使用者');
 
-                     }
 
-                 },'json');"required>
 
-     <label for="floatingInput">使用者名稱/Username</label>
 
-     </div>
 
-     <div class="form-floating">
 
-       <input type="password" class="form-control" id="password" name="password" placeholder="密碼/Password" minlength="6"
 
-        maxlength="12" oninput="setCustomValidity('');" onchange="$.get('/check_login',{ username: document.getElementById('username').value, password: document.getElementById('password').value},function(resText){
 
-                     if(resText.errMsg=='Wrong password'){
 
-                         setCustomValidity('密碼錯誤');
 
-                     }
 
-                 },'json');" required>
 
-     <label for="floatingPassword">密碼/Password</label>
 
-     </div>
 
-     <div class="checkbox mb-3">
 
-       <label>
 
-         <input type="checkbox" name="rem"> Remember me
 
-         <br>
 
-         <a href="/reset_password">Reset password</a>
 
-       </label>
 
-     </div>
 
-     <button class="w-40 btn btn-lg btn-secondary" type="submit">Login</button>
 
-     <button class="w-40 btn btn-lg btn-secondary" type="button" onclick="Registration();">Sign up</button>
 
-   </form>
 
- {% endblock %}
 
 
  |