45 lines
2.6 KiB
HTML
45 lines
2.6 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}Sign in — hamprint{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="max-w-md mx-auto py-8">
|
|
<div class="bg-white border border-slate-200 rounded-lg p-8 shadow-sm">
|
|
<div class="text-center mb-6">
|
|
<div class="inline-grid place-items-center w-12 h-12 rounded-lg bg-amber-500 text-white font-bold text-xl mb-3">h</div>
|
|
<h1 class="text-2xl font-bold tracking-tight">Sign in to hamprint</h1>
|
|
<p class="text-slate-600 mt-2 text-sm">
|
|
Optional — you can also
|
|
<a href="{% url 'submissions:create' %}" class="text-amber-700 font-medium hover:underline">submit as a guest</a>.
|
|
</p>
|
|
</div>
|
|
|
|
{# POST (not GET) so allauth's LoginView skips its intermediate confirm page and 302s straight to Google. #}
|
|
<form method="post" action="{% url 'google_login' %}">
|
|
{% csrf_token %}
|
|
{% if request.GET.next %}<input type="hidden" name="next" value="{{ request.GET.next }}">{% endif %}
|
|
<button type="submit"
|
|
class="flex items-center justify-center gap-3 w-full px-4 py-3 rounded-md border border-slate-300 bg-white hover:bg-slate-50 text-slate-900 font-medium shadow-sm">
|
|
<svg class="w-5 h-5" viewBox="0 0 24 24" aria-hidden="true">
|
|
<path fill="#4285F4" d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.75h3.57c2.08-1.92 3.28-4.74 3.28-8.07z"/>
|
|
<path fill="#34A853" d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.75c-.99.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"/>
|
|
<path fill="#FBBC05" d="M5.84 14.12A6.97 6.97 0 015.46 12c0-.74.13-1.45.36-2.12V7.04H2.18A10.99 10.99 0 001 12c0 1.77.42 3.45 1.18 4.96l3.66-2.84z"/>
|
|
<path fill="#EA4335" d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.04l3.66 2.84C6.71 7.31 9.14 5.38 12 5.38z"/>
|
|
</svg>
|
|
Continue with Google
|
|
</button>
|
|
</form>
|
|
|
|
<div class="mt-6 text-center">
|
|
<a href="{% url 'submissions:create' %}" class="text-sm text-slate-600 hover:underline">No thanks, just submit as a guest →</a>
|
|
</div>
|
|
|
|
<div class="mt-8 pt-6 border-t border-slate-200 text-xs text-slate-500 space-y-2">
|
|
<p class="flex items-start gap-2"><span class="text-emerald-600 mt-0.5">✓</span> Signed-in prints skip email confirmation.</p>
|
|
<p class="flex items-start gap-2"><span class="text-emerald-600 mt-0.5">✓</span> See all your past prints in one place.</p>
|
|
<p class="flex items-start gap-2"><span class="text-emerald-600 mt-0.5">✓</span> We don't share your email, ever.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|