Files
gh-christianlouis-leagueledger/app/templates/auth/login.html
T
Christian Krakau-Louis 6306abf6d9 Add comprehensive documentation for LeagueLedger
- Created architecture overview in development/architecture.md
- Added installation guide in getting-started/installation.md
- Developed user guide with detailed instructions in user-guide/overview.md, user-guide/teams.md, user-guide/qr-codes.md
- Implemented social login setup documentation in social_login_setup.md
- Updated index.md to include links to new documentation sections
- Configured mkdocs.yml for site structure and theme
- Added requirements.txt for documentation dependencies
2025-04-15 12:32:03 +02:00

123 lines
4.5 KiB
HTML

{% extends "base.html" %}
{% block content %}
<div class="max-w-md mx-auto my-8">
<div class="bg-white p-8 rounded-lg shadow-md">
<h1 class="text-2xl font-bold text-irish-green mb-6 text-center">Log In</h1>
<!-- Messages/Alerts -->
{% if error %}
<div class="mb-4 p-3 rounded bg-red-100 text-red-700">
{{ error }}
<!-- Display resend verification link if applicable -->
{% if unverified_user_id %}
<div class="mt-2 p-2 border-t border-red-200">
<p class="mb-2 text-sm">Didn't receive the verification email?</p>
<a href="/auth/resend-verification?user_id={{ unverified_user_id }}"
class="text-irish-green hover:underline text-sm font-medium">
Resend verification email to {{ unverified_email }}
</a>
</div>
{% endif %}
</div>
{% endif %}
{% if message %}
<div class="mb-4 p-3 rounded bg-green-100 text-green-700">
{{ message }}
</div>
{% endif %}
<form action="/auth/login" method="post" class="space-y-4">
<div>
<label for="username" class="block text-sm font-medium text-gray-700 mb-1">Username</label>
<input
type="text"
id="username"
name="username"
required
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-irish-green focus:border-irish-green"
>
</div>
<div>
<label for="password" class="block text-sm font-medium text-gray-700 mb-1">Password</label>
<input
type="password"
id="password"
name="password"
required
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-irish-green focus:border-irish-green"
>
</div>
<!-- Debug info -->
<div class="text-xs text-gray-500">
<p>Having trouble logging in? Make sure your browser accepts cookies.</p>
</div>
<div class="flex items-center">
<input
type="checkbox"
id="remember"
name="remember"
class="h-4 w-4 text-irish-green focus:ring-irish-green border-gray-300 rounded"
>
<label for="remember" class="ml-2 block text-sm text-gray-700">Remember me</label>
</div>
<div class="flex items-center justify-between">
<button
type="submit"
class="bg-irish-green text-white py-2 px-4 rounded-md hover:bg-opacity-90 transition focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-irish-green"
>
Log In
</button>
<a class="inline-block align-baseline font-bold text-sm text-irish-green hover:text-opacity-75" href="/auth/forgot-password">
Forgot Password?
</a>
</div>
</form>
<div class="mt-6 pt-6 border-t border-gray-200 text-center">
<p class="text-gray-600">Don't have an account?</p>
<a href="/auth/register" class="block mt-2 bg-cream-white text-irish-green border border-irish-green py-2 px-4 rounded-md hover:bg-irish-green hover:text-white transition">
Create an account
</a>
</div>
<!-- OAuth login options -->
{% if oauth_providers and oauth_providers|length > 0 %}
<div class="mt-6 pt-6 border-t border-gray-200">
<p class="text-center text-gray-600 mb-4">Or sign in with</p>
<!-- For 2 or fewer providers, show them side by side -->
{% if oauth_providers|length <= 2 %}
<div class="flex justify-center space-x-4">
{% for provider in oauth_providers %}
<a href="/auth/oauth-login/{{ provider.id }}"
class="flex items-center justify-center w-full py-2 px-4 rounded-md transition"
style="background-color: {{ provider.color }}; color: white;">
<i class="{{ provider.icon }} mr-2"></i> {{ provider.name }}
</a>
{% endfor %}
</div>
<!-- For more than 2 providers, stack them vertically -->
{% else %}
<div class="space-y-3">
{% for provider in oauth_providers %}
<a href="/auth/oauth-login/{{ provider.id }}"
class="flex items-center justify-center w-full py-2 px-4 rounded-md transition"
style="background-color: {{ provider.color }}; color: white;">
<i class="{{ provider.icon }} mr-2"></i> {{ provider.name }}
</a>
{% endfor %}
</div>
{% endif %}
</div>
{% endif %}
</div>
</div>
{% endblock %}