Skip to content

Commit fad9192

Browse files
authored
Merge pull request #25 from nfonjeannoel/layout/login
Modified Login form to look a little more beautiful
2 parents 49b0ab0 + 0b0610e commit fad9192

File tree

1 file changed

+28
-21
lines changed

1 file changed

+28
-21
lines changed
Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,41 @@
11
{% extends 'base.html' %}
22

33
{% block content %}
4-
<div class="container">
5-
<div class="row center">
6-
<div class="col-md-6 offset-md-3">
4+
<div class="vh-100 d-flex justify-content-center align-items-center p-5" id="login-content">
5+
<div class="col-md-5 p-5 shadow-sm border rounded-5 border-primary bg-white">
6+
<h2 class="text-center mb-4 text-primary">Login</h2>
77
{% if messages %}
8-
<div class="messages">
9-
{% for message in messages %}
10-
<div {% if message.tags %} class="{{ message.tags }}" {% endif %}>{{ message }}
11-
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
12-
<span aria-hidden="true">&times;</span>
13-
</button>
8+
<div class="messages">
9+
{% for message in messages %}
10+
<div {% if message.tags %} class="{{ message.tags }}" {% endif %}>{{ message }}
11+
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
12+
<span aria-hidden="true">&times;</span>
13+
</button>
14+
</div>
15+
{% endfor %}
1416
</div>
15-
{% endfor %}
16-
</div>
1717
{% endif %}
18-
<form action="" method="POST">
18+
<form action="" method="post">
1919
{% csrf_token %}
20-
<div class="form-group">
21-
<label for="username">Username</label>
22-
<input type="text" class="form-control" name="username" placeholder="Enter Username" required>
20+
<div class="mb-3">
21+
<label for="username" class="form-label">Username</label>
22+
<input type="text" class="form-control border border-primary" id="username"
23+
aria-describedby="username" name="username" placeholder="Enter Username" required>
24+
</div>
25+
<div class="mb-3">
26+
<label for="password" class="form-label">Password</label>
27+
<input type="password" class="form-control border border-primary" name="password"
28+
placeholder="Password" required>
2329
</div>
24-
<div class="form-group">
25-
<label for="password">Password</label>
26-
<input type="password" class="form-control" name="password" placeholder="Password" required>
30+
<div class="d-grid">
31+
<button class="btn btn-primary" type="submit">Login</button>
2732
</div>
28-
<button type="submit" class="btn btn-primary">Login</button>
29-
<p>Need an account? <a href="{% url 'accounts:register' %}">Register Here</a></p>
3033
</form>
34+
<div class="mt-3">
35+
<p class="mb-0 text-center">Don't have an account? <a href="{% url 'accounts:register' %}"
36+
class="text-primary fw-bold">Sign
37+
Up</a></p>
38+
</div>
3139
</div>
3240
</div>
33-
</div>
3441
{% endblock %}

0 commit comments

Comments
 (0)