Update web/templates/login.html

this is where I added the gradient and tried to fix the login stack
This commit is contained in:
Joshua Laymon 2025-08-13 12:49:49 +00:00
parent 26f2ea275e
commit ed76f94425

View File

@ -1,16 +1,52 @@
{% extends "base.html" %} {% load static %}
{% block title %}Sign in - Illustrations DB{% endblock %} <!DOCTYPE html>
{% block content %} <html lang="en">
<div class="panel" style="max-width:420px; margin:80px auto;"> <head>
<h2 style="margin-top:0; color: var(--blue);">Sign in</h2> <meta charset="utf-8" />
{% if error %}<div class="flash">{{ error }}</div>{% endif %} <title>Sign in · Illustrations</title>
<form method="post">{% csrf_token %} <meta name="viewport" content="width=device-width, initial-scale=1" />
<label>Username</label><input type="text" name="username" required /> <link rel="stylesheet" href="{% static 'app.css' %}">
<label style="margin-top:12px;">Password</label><input type="password" name="password" required /> </head>
<div style="margin-top:16px; display:flex; gap:10px; justify-content:flex-end;"> <body class="login-page">
<a class="btn" href="#">Cancel</a>
<button class="btn primary" type="submit">Sign in</button> <div class="login-hero">
<div class="login-card">
<h1 class="login-title">Sign in</h1>
{% if form.non_field_errors %}
<div class="login-alert">
{% for e in form.non_field_errors %}{{ e }}{% if not forloop.last %}<br>{% endif %}{% endfor %}
</div> </div>
{% endif %}
<form method="post" action="{% url 'login' %}" novalidate>
{% csrf_token %}
{% if next %}<input type="hidden" name="next" value="{{ next }}">{% endif %}
<label for="id_username" class="login-label">Username</label>
<input id="id_username" name="username" type="text" autocomplete="username"
value="{{ form.username.value|default:'' }}" required autofocus class="login-input">
{% if form.username.errors %}
<div class="login-field-error">
{% for e in form.username.errors %}{{ e }}{% if not forloop.last %}<br>{% endif %}{% endfor %}
</div>
{% endif %}
<label for="id_password" class="login-label">Password</label>
<input id="id_password" name="password" type="password" autocomplete="current-password"
required class="login-input">
{% if form.password.errors %}
<div class="login-field-error">
{% for e in form.password.errors %}{{ e }}{% if not forloop.last %}<br>{% endif %}{% endfor %}
</div>
{% endif %}
<button class="btn btn-primary btn-lg login-submit" type="submit">Sign in</button>
</form> </form>
</div> </div>
{% endblock %} </div>
</body>
</html>