-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactored frontend login and register pages
- Loading branch information
1 parent
2e9b6a9
commit 1181ad4
Showing
6 changed files
with
69 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,29 @@ | ||
{% extends "base.html" %} | ||
{% block title %}Login{% endblock %} | ||
{% block title %}ToDo List App{% endblock %} | ||
|
||
{% block content %} | ||
<h2>Login</h2> | ||
<form method="POST" action="{{ url_for('login') }}"> | ||
<div class="form-group"> | ||
<label for="username">Username</label> | ||
<input type="text" class="form-control" id="username" name="username" required> | ||
<div class="d-flex justify-content-center align-items-center" style="min-height: 100vh; background-color: #ffffff;"> | ||
<div class="card p-4" style="width: 400px; border-radius: 15px; box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);"> | ||
<div class="text-center mb-4"> | ||
<h2 class="mt-2" style="font-family: 'Brush Script MT', cursive; font-size: 2.5rem; color: #333;">ToDo List App</h2> | ||
<img src="{{ url_for('static', filename='img/to_do_list.png') }}" alt="ToDo List Icon" width="60"> | ||
</div> | ||
<form method="POST" action="{{ url_for('login') }}"> | ||
<div class="form-group"> | ||
<label for="username">Email</label> | ||
<input type="text" class="form-control" id="username" name="username" required> | ||
</div> | ||
<div class="form-group mt-3"> | ||
<label for="password">Password</label> | ||
<input type="password" class="form-control" id="password" name="password" required> | ||
</div> | ||
<button type="submit" class="btn btn-primary btn-block mt-4" style="background: linear-gradient(90deg, #6a11cb, #2575fc); border: none; border-radius: 20px;"> | ||
LOGIN | ||
</button> | ||
<p class="text-center mt-3"> | ||
Don't have an account? <a href="{{ url_for('register') }}">Sign Up</a> | ||
</p> | ||
</form> | ||
</div> | ||
<div class="form-group"> | ||
<label for="password">Password</label> | ||
<input type="password" class="form-control" id="password" name="password" required> | ||
</div> | ||
<button type="submit" class="btn btn-primary">Login</button> | ||
<p class="mt-3"> | ||
Don't have an account? <a href="{{ url_for('register') }}">Create new account</a> | ||
</p> | ||
</form> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,41 @@ | ||
{% extends "base.html" %} | ||
{% block title %}Register{% endblock %} | ||
{% block title %}ToDo List App - Register{% endblock %} | ||
|
||
{% block content %} | ||
<h2>Create an Account</h2> | ||
<form method="POST" action="{{ url_for('register') }}"> | ||
{{ form.hidden_tag() }} <!-- for CSRF token --> | ||
|
||
<div class="form-group"> | ||
{{ form.username.label }} | ||
{{ form.username(class="form-control") }} | ||
</div> | ||
|
||
<div class="form-group"> | ||
{{ form.password.label }} | ||
{{ form.password(class="form-control") }} | ||
</div> | ||
|
||
<div class="form-group"> | ||
{{ form.confirm_password.label }} | ||
{{ form.confirm_password(class="form-control") }} | ||
{% if form.confirm_password.errors %} | ||
<small class="text-danger"> | ||
{% for error in form.confirm_password.errors %} | ||
{{ error }} | ||
{% endfor %} | ||
</small> | ||
{% endif %} | ||
<div class="d-flex justify-content-center align-items-center" style="min-height: 100vh; background-color: #ffffff;"> | ||
<div class="card p-4" style="width: 400px; border-radius: 15px; box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);"> | ||
<div class="text-center mb-4"> | ||
<h2 class="mt-2" style="font-family: 'Brush Script MT', cursive; font-size: 2.5rem; color: #333;">ToDo List App</h2> | ||
<img src="{{ url_for('static', filename='img/to_do_list.png') }}" alt="ToDo List Icon" width="60"> | ||
</div> | ||
<form method="POST" action="{{ url_for('register') }}"> | ||
{{ form.hidden_tag() }} | ||
<div class="form-group"> | ||
{{ form.username.label }} | ||
{{ form.username(class="form-control") }} | ||
</div> | ||
<div class="form-group mt-3"> | ||
{{ form.password.label }} | ||
{{ form.password(class="form-control") }} | ||
</div> | ||
<div class="form-group mt-3"> | ||
{{ form.confirm_password.label }} | ||
{{ form.confirm_password(class="form-control") }} | ||
{% if form.confirm_password.errors %} | ||
<small class="text-danger"> | ||
{% for error in form.confirm_password.errors %} | ||
{{ error }} | ||
{% endfor %} | ||
</small> | ||
{% endif %} | ||
</div> | ||
<button type="submit" class="btn btn-primary btn-block mt-4" style="background: linear-gradient(90deg, #6a11cb, #2575fc); border: none; border-radius: 20px;"> | ||
SIGN UP | ||
</button> | ||
<p class="text-center mt-3"> | ||
Already have an account? <a href="{{ url_for('login') }}">Login</a> | ||
</p> | ||
</form> | ||
</div> | ||
|
||
{{ form.submit(class="btn btn-primary") }} | ||
</form> | ||
</div> | ||
{% endblock %} |