login_username.html 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. {% extends "layout.html" %}
  2. {% block title %}Login{% endblock %}
  3. {% block description %}Login to Kinbrio{% endblock %}
  4. {% block head %}
  5. <style>
  6. </style>
  7. {% endblock %}
  8. {% block content %}
  9. <div class="container">
  10. <div class="section">
  11. <div class="heading_div">
  12. <h1>Welcome back!</h1>
  13. <h2>Authenticate Securely Using Your <a href="https://matrix.org/about/">Matrix</a> Account</h2>
  14. <h3>(Or Register <a href="/register">Here</a>)</h3>
  15. </div>
  16. <div class="row justified">
  17. <div class="content">
  18. <form id="login_form" action="/login" method="post" enctype="multipart/form-data">
  19. <label for="uid">Matrix User ID</label>
  20. <input type="text" name="uid" id="uid" placeholder="@user:matrix.org" />
  21. <label for="secret">Password</label>
  22. <input type="password" name="secret" id="secret" placeholder="Password" />
  23. <input type="submit" class="add_button" value="Login" />
  24. </form>
  25. </div>
  26. </div>
  27. </div>
  28. </div>
  29. <script>
  30. window.addEventListener('load', function () {
  31. post_form("login_form", "/login", data => {
  32. data.homeserver = "https://matrix-client.matrix.org";
  33. return data
  34. }, () => { window.location.href = "/" });
  35. })
  36. </script>
  37. {% endblock %}