-
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.
[Fixes🛠️] errors in pagination and ui updates
- Loading branch information
[esekyi]
committed
Aug 31, 2024
1 parent
baed2ba
commit 816039d
Showing
6 changed files
with
248 additions
and
104 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
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
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,24 +1,71 @@ | ||
{% extends "base.html" %} | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
{% block title %} | ||
Login - SpiceShare | ||
{% endblock %} | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Sign In - SpiceShare</title> | ||
<link rel="stylesheet" href="{{url_for('static', filename='css/output.css')}}"> | ||
<style> | ||
.toggle-password { | ||
cursor: pointer; | ||
} | ||
</style> | ||
</head> | ||
|
||
{% block content %} | ||
<div class="max-w-md mx-auto bg-white p-8 rounded shadow-md"> | ||
<h2 class="text-2xl font-semibold text-text mb-6">Login</h2> | ||
<form action="{{ url_for('auth.login') }}" method="post"> | ||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"> | ||
<div class="mb-4"> | ||
<label for="email" class="block text-sm font-medium text-text">Email:</label> | ||
<input type="email" id="email" name="email" class="mt-1 p-2 w-full border rounded" required> | ||
</div> | ||
<div class="mb-4"> | ||
<label for="password" class="block text-sm font-medium text-text">Password:</label> | ||
<input type="password" id="password" name="password" class="mt-1 p-2 w-full border rounded" required> | ||
</div> | ||
<button type="submit" class="bg-primary text-white py-2 px-4 rounded hover:bg-primary-dark">Login</button> | ||
</form> | ||
</div> | ||
<body class="bg-gray-100 font-poppins flex items-center justify-center min-h-screen"> | ||
{% with messages = get_flashed_messages(with_categories=true) %} | ||
{% if messages %} | ||
{% for category, message in messages %} | ||
<div id="flashMessageBox" | ||
class="fixed top-4 left-1/2 transform -translate-x-1/2 p-4 w-96 bg-{{ category }} text-white text-center rounded-lg shadow-lg flash-message"> | ||
<p>{{ message }}</p> | ||
{% endfor %} | ||
</div> | ||
{% endif %} | ||
{% endwith %} | ||
|
||
{% endblock %} | ||
<!-- Login Form --> | ||
<div class="w-full max-w-md bg-white p-8 rounded-lg shadow-lg"> | ||
<h2 class="text-2xl font-bold text-gray-800 mb-6 text-center">Sign In</h2> | ||
|
||
<form action="{{ url_for('auth.login')}}" method="POST"> | ||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"> | ||
<div class="mb-4"> | ||
<label for="email" class="block text-sm font-medium text-gray-700">Email <span class="text-red-500">*</span></label> | ||
<input type="email" id="email" name="email" required placeholder="[email protected]" autocomplete="on" | ||
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500"> | ||
</div> | ||
|
||
<div class="mb-6 relative"> | ||
<label for="password" class="block text-sm font-medium text-gray-700">Password <span class="text-red-500">*</span></label> | ||
<div class="relative"> | ||
<input type="password" name="password" id="password" placeholder="Password" autocomplete="on" | ||
class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500"> | ||
<button type="button" class="absolute right-3 top-3 text-gray-600" | ||
onclick="togglePasswordVisibility('password', event)"> | ||
👁️ | ||
</button> | ||
</div> | ||
</div> | ||
<div class="flex items-center mb-6"> | ||
<label class="inline-flex items-center text-gray-700"> | ||
<input id="remember_me" name="remember_me" type="checkbox" class="form-checkbox text-blue-600"> | ||
<span class="ml-2 block text-sm text-gray-900">Remember me</span> | ||
</label> | ||
</div> | ||
|
||
<button type="submit" | ||
class="w-full bg-blue-600 hover:bg-blue-700 text-white py-3 rounded-lg font-semibold transition duration-300">Login</button> | ||
</form> | ||
<p class="mt-4 text-center text-sm text-gray-600"> | ||
Don't have an account? | ||
<a href="{{ url_for('user_routes.register') }}" class="text-blue-600 hover:underline">Sign Up</a> | ||
</p> | ||
</div> | ||
|
||
<script src="{{ url_for('static', filename='js/auth_script.js') }}"></script> | ||
|
||
</body> | ||
|
||
</html> |
Oops, something went wrong.