79 lines
No EOL
3.5 KiB
HTML
79 lines
No EOL
3.5 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}Login - NetViz{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="min-h-full flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8">
|
|
<div class="max-w-md w-full space-y-8">
|
|
<div>
|
|
<h2 class="mt-6 text-center text-3xl font-extrabold text-gray-900 dark:text-white">
|
|
Sign in to your account
|
|
</h2>
|
|
<p class="mt-2 text-center text-sm text-gray-600 dark:text-gray-400">
|
|
Or
|
|
<a href="{{ url_for('auth.register') }}" class="font-medium text-primary hover:text-blue-500">
|
|
register a new account
|
|
</a>
|
|
</p>
|
|
</div>
|
|
<form class="mt-8 space-y-6" method="POST" action="{{ url_for('auth.login') }}">
|
|
{{ form.csrf_token }}
|
|
<input type="hidden" name="remember" value="true">
|
|
<div class="rounded-md shadow-sm -space-y-px">
|
|
<div>
|
|
<label for="username" class="sr-only">Username</label>
|
|
{{ form.username(class="appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300
|
|
dark:border-gray-700 placeholder-gray-500 dark:placeholder-gray-400 text-gray-900 dark:text-white
|
|
dark:bg-gray-800 rounded-t-md focus:outline-none focus:ring-primary focus:border-primary focus:z-10
|
|
sm:text-sm", placeholder="Username") }}
|
|
{% if form.username.errors %}
|
|
<p class="text-red-500 text-xs mt-1">{{ form.username.errors[0] }}</p>
|
|
{% endif %}
|
|
</div>
|
|
<div>
|
|
<label for="password" class="sr-only">Password</label>
|
|
{{ form.password(class="appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300
|
|
dark:border-gray-700 placeholder-gray-500 dark:placeholder-gray-400 text-gray-900 dark:text-white
|
|
dark:bg-gray-800 rounded-b-md focus:outline-none focus:ring-primary focus:border-primary focus:z-10
|
|
sm:text-sm", placeholder="Password") }}
|
|
{% if form.password.errors %}
|
|
<p class="text-red-500 text-xs mt-1">{{ form.password.errors[0] }}</p>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="flex items-center justify-between">
|
|
<div class="flex items-center">
|
|
{{ form.remember_me(class="h-4 w-4 text-primary focus:ring-primary border-gray-300 dark:border-gray-700
|
|
rounded") }}
|
|
<label for="remember_me" class="ml-2 block text-sm text-gray-900 dark:text-gray-300">
|
|
Remember me
|
|
</label>
|
|
</div>
|
|
|
|
<div class="text-sm">
|
|
<a href="{{ url_for('auth.reset_password_request') }}" class="font-medium text-primary hover:text-blue-500">
|
|
Forgot your password?
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<button type="submit"
|
|
class="group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-primary hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary">
|
|
<span class="absolute left-0 inset-y-0 flex items-center pl-3">
|
|
<!-- Lock icon -->
|
|
<svg class="h-5 w-5 text-blue-500 group-hover:text-blue-400" xmlns="http://www.w3.org/2000/svg"
|
|
viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
|
<path fill-rule="evenodd"
|
|
d="M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z"
|
|
clip-rule="evenodd" />
|
|
</svg>
|
|
</span>
|
|
Sign in
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
{% endblock %} |