Restyled Login Container and removed unnessecery code
This commit is contained in:
@ -2,19 +2,149 @@
|
||||
|
||||
{% block title %}Login{% endblock %}
|
||||
|
||||
{% block additional_styles %}
|
||||
<style>
|
||||
.container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-height: calc(100vh - 200px);
|
||||
}
|
||||
|
||||
.login-container {
|
||||
width: 90%;
|
||||
max-width: 400px;
|
||||
padding: 30px;
|
||||
background-color: #343434;
|
||||
border-radius: 20px;
|
||||
margin-top: -50px;
|
||||
}
|
||||
|
||||
.login-container h2 {
|
||||
font-size: 24px;
|
||||
font-weight: 500;
|
||||
margin-bottom: 8px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.login-description {
|
||||
font-size: 14px;
|
||||
color: #8f8f8f;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.form-group {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.form-group label {
|
||||
display: block;
|
||||
margin-bottom: 8px;
|
||||
color: rgb(255, 255, 255);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.form-group input {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
border: 1px solid #D9D9D9;
|
||||
border-radius: 6px;
|
||||
background-color: #D9D9D9;
|
||||
color: white;
|
||||
font-size: 16px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.form-group input:focus {
|
||||
border-color: FDEFA8;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
button[type="submit"] {
|
||||
width: 100%;
|
||||
padding: 12px;
|
||||
background-color: #97988C;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s ease;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
button[type="submit"]:hover {
|
||||
background-color: #6f6f6b;
|
||||
}
|
||||
|
||||
.password-input {
|
||||
letter-spacing: 3px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.login-container {
|
||||
width: 95%;
|
||||
padding: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.error-message p {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.signup-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.signup {
|
||||
font-size: 14px;
|
||||
color: #8f8f8f;
|
||||
margin-top: 14px;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container mt-4">
|
||||
<h2>Login</h2>
|
||||
<form method="POST" action="{{ url_for('main.login_route') }}">
|
||||
<div class="mb-3">
|
||||
<label for="username" class="form-label">Username</label>
|
||||
<input type="text" class="form-control" id="username" name="username" required>
|
||||
<div class="container">
|
||||
<div class="login-signup-container">
|
||||
|
||||
</div>
|
||||
<div class="login-container">
|
||||
<h2>Login</h2>
|
||||
<p class="login-description">Enter your credentials below to login to your account</p>
|
||||
|
||||
<form method="POST" action="{{ url_for('main.login_route') }}">
|
||||
<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 class="password-input">
|
||||
</div>
|
||||
|
||||
<button type="submit">Login</button>
|
||||
</form>
|
||||
<div class="signup-container">
|
||||
<p class="signup">Dont have an account? <u>Sign up</u></p>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="password" class="form-label">Password</label>
|
||||
<input type="password" class="form-control" id="password" name="password" required>
|
||||
|
||||
|
||||
{% with messages = get_flashed_messages() %}
|
||||
{% if messages %}
|
||||
<div class="error-message">
|
||||
{% for message in messages %}
|
||||
<p class="text-danger">{{ message }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Login</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user