Spaces:
Sleeping
Sleeping
Download templates/login.html from Sergidev/GrimvAult1: direct link, hf CLI and curl.
- Browser
- Download file 1.41 kB
-
https://huggingface.co/spaces/Sergidev/GrimvAult1/resolve/main/templates/login.html
- Command line
-
hf download hf://spaces/Sergidev/GrimvAult1/templates/login.html
-
curl -L -o login.html https://huggingface.co/spaces/Sergidev/GrimvAult1/resolve/main/templates/login.html
1.41 kB
| {% extends "base.html" %} {% block title %}Login - Grimvault{% endblock %} {% | |
| block content %} | |
| <div class="container"> | |
| <h1>Login</h1> | |
| <form id="login-form"> | |
| <div class="form-group"> | |
| <label for="username">Username:</label> | |
| <input type="text" id="username" name="username" required /> | |
| </div> | |
| <div class="form-group"> | |
| <label for="password">Password:</label> | |
| <input type="password" id="password" name="password" required /> | |
| </div> | |
| <button type="submit" class="btn btn-primary">Login</button> | |
| </form> | |
| <p id="login-message"></p> | |
| </div> | |
| {% endblock %} {% block scripts %} | |
| <script> | |
| document | |
| .getElementById("login-form") | |
| .addEventListener("submit", async (e) => { | |
| e.preventDefault(); | |
| const formData = new FormData(e.target); | |
| try { | |
| const response = await axios.post( | |
| '{{ url_for("auth.login") }}', | |
| formData, | |
| ); | |
| document.getElementById("login-message").textContent = | |
| response.data.message; | |
| window.location.href = response.data.redirect; | |
| } catch (error) { | |
| document.getElementById("login-message").textContent = | |
| error.response.data.error; | |
| } | |
| }); | |
| </script> | |
| {% endblock %} | |